Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (58)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Sélection de projets utilisant MediaSPIP

    29 avril 2011, par

    Les exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
    Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
    Ferme MediaSPIP @ Infini
    L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)

Sur d’autres sites (3345)

  • 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)


    


  • Stream video over serial port using FFmpeg [closed]

    13 septembre 2020, par Rasoul Sharifian

    I am using the FFmpeg library to stream videos by UDP and LAN cables, something like this :

    


    What we have now

    


    But as our embedding systems just have serial ports the data must stream over the serial ports.
something like this :

    


    What we are trying to achieve

    


    So the question is : Is it possible to stream videos over the serial port using the FFmpeg library ? Or is there any other library that can compress and stream videos over serial ports ?

    


    I also used a kind of Uart to ethernet converter hardware module to solve the problem and hopefully, this worked for me. But the project goal is to send video data over serial ports originally and not using some hardware converters.

    


    Any suggestions would be helpful.