Recherche avancée

Médias (0)

Mot : - Tags -/page unique

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (18)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

Sur d’autres sites (5920)

  • Flash block/timeout handling improvements. Cleaner CSS, updated demo and main demos include handling now

    20 mars 2010, par Scott Schiller

    m demo/360-player/360player.css m demo/360-player/canvas-visualization-basic.html m demo/360-player/canvas-visualization.html m demo/360-player/index.html m demo/api/index.html + demo/flashblock/flashblock.css m demo/flashblock/index.html m demo/index.css m (...)

  • Decoding the h.264 stream from a serial port

    18 mars, par Peter

    I would like to know if there is a reliable way to decode an H.264 NAL stream coming through a serial port using software.

    


    So far, I have managed to decode a single frame using a python script. In this script, I first write the incoming data to a file, and when the end-of-frame marker 00_00_00_01 appears, I display the frame using ffplay.

    


    import serial
import subprocess
import os
import time

ser = serial.Serial('COM3', 115200, timeout=1)
output_file = "output.264"

# Variable to store the ffplay process
ffplay_process = None

# Open the file for writing in binary mode
with open(output_file, "wb") as file:

    print("Writing bytes to output.264. Waiting for the end-of-frame marker 0x00000001.")

    buffer = bytearray()
    marker = b'\x00\x00\x00\x01'

    try:
        while True:
            if ser.in_waiting:  # If there is data in the buffer
                data = ser.read(ser.in_waiting)  # Read all available bytes
                buffer.extend(data)

                # Check if the end-of-frame marker is in the buffer
                while marker in buffer:
                    index = buffer.index(marker) + len(marker)  # Position after the marker
                    frame = buffer[:index]  # Extract the frame
                    buffer = buffer[index:]  # Keep the remaining data

                    print(f"Frame recorded: {len(frame)} bytes")
                    file.write(frame)  # Write the frame to the file
                    file.flush()  # Force writing to disk

                    # Close the ffplay window if it is already open
                    if ffplay_process and ffplay_process.poll() is None:
                        ffplay_process.terminate()
                        ffplay_process.wait()  # Wait for the process to terminate

                    # Play the recorded frame, reopening the window
                    ffplay_process = subprocess.Popen(["ffplay", "-f", "h264", "-i", output_file])

    except KeyboardInterrupt:
        print("\nRecording stopped.")
    finally:
        # Close the serial port and the ffplay process
        ser.close()


    


    However, each time a new end-of-frame marker is detected, the ffplay window closes and reopens to show the next frame. It will flicker when transferring the video. Is there a way to display the frames in the same window for seamless playback when streaming video ?

    


    Or is there a better approach or software that is more suited for this task ? I do not know where to start, so I will be glad for any hints.

    


  • How to create video by stitching together images (.png) where the serial on each image file increases by 6

    10 avril 2024, par DataStatsExplorer

    I am trying to create a video (preferably mp4) from a series of png images. However, the name of each image file increases by 6 every frame. For example, I would have depthframe_0000 as the first frame, and depthframe_0001 for the next frame.

    


    There are a few answers that have answered a similar question but I am unable to process the video when the image files are not increasing by 1.

    


    I would like to keep the fps at 5. I am using ffmpeg as the suggested in the answers above but am open to any other suggestion.

    


    The collab code that I have put together is as follows :

    


    import subprocess

# Define the frame rate and the input/output paths
output_fps = 5
input_path = "/content/drive/MyDrive/depth/depthframe_%04d.png"
output_path = "/content/drive/MyDrive/depth.mp4"

# Create a list of the frames
frames = [input_path % i for i in range(0, 2671, 6)]  # Update range as needed

# Write the list of frames to a temporary text file
with open('frames.txt', 'w') as f:
    for frame in frames:
        f.write(f"file '{frame}'\n")

# Create the command
command = [
    "ffmpeg",
    "-f", "concat",
    "-safe", "0",
    "-i", "frames.txt",
    "-c:v", "libx264",
    "-pix_fmt", "yuv420p",
    output_path
]

# Run the command
subprocess.run(command, check=True)