Recherche avancée

Médias (0)

Mot : - Tags -/images

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

Autres articles (88)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (4236)

  • How to reinsert edited metadata stream information from the FFMETADATAFILE file ? [closed]

    6 septembre 2024, par SENYCH

    I'm working on simplifying and speeding up the process of editing video metadata for user convenience. I've successfully edited metadata streams using console commands, such as :

    


    ffmpeg -i INPUT.mp4 -map 0 -metadata:s:0 "handler_name=An other video" -metadata:s:1 "handler_name=An other audio recording in russian" -metadata:s:2 "handler_name=An other audio recording in english" -metadata:s:3 "handler_name=An other audio recording in japanese" -c copy OUTPUT.mp4


    


    However, I'd like to accomplish this through a ffmetadata file. Here's the approach I've taken :

    


    ffmpeg -t 0 -i INPUT.mp4 -map 0 -c copy -f ffmetadata ffmetadata.txt -hide_banner


    


    Original ffmetadata.txt is :

    


    ;FFMETADATA1
major_brand=isom
minor_version=512
compatible_brands=isomiso2avc1mp41
encoder=Lavf61.5.101
[STREAM]
language=und
handler_name=The best video
vendor_id=[0][0][0][0]
[STREAM]
language=rus
handler_name=The best russian language
vendor_id=[0][0][0][0]
[STREAM]
language=eng
handler_name=The best english language
vendor_id=[0][0][0][0]
[STREAM]
language=jpn
handler_name=The best japanese language
vendor_id=[0][0][0][0]


    


    Edit the ffmetadata.txt file to update the handler_name values :

    


    ;FFMETADATA1
major_brand=isom
minor_version=512
compatible_brands=isomiso2avc1mp41
encoder=Lavf61.5.101
[STREAM]
language=und
handler_name=An other video
vendor_id=[0][0][0][0]
[STREAM]
language=rus
handler_name=An other audio recording in russian
vendor_id=[0][0][0][0]
[STREAM]
language=eng
handler_name=An other audio recording in english
vendor_id=[0][0][0][0]
[STREAM]
language=jpn
handler_name=An other audio recording in japanese
vendor_id=[0][0][0][0]


    


    Attempt to apply the updated metadata from ffmetadata2.txt :

    


    C:\Users\Alexander\Videos>ffmpeg -i INPUT.mp4 -i ffmetadata2.txt -map 0:v -map 0:a -map_metadata 1 -c copy OUTPUT2.mp4 -hide_banner


    


    Despite these steps, I've noticed that only the global metadata is updated, while the metadata for each stream remains unchanged. The console output shows that metadata for each stream is not updated as expected.

    


    What am I missing ? How can I ensure that the stream-specific metadata is also updated correctly when using a ffmetadata file ?

    


    Additional Information :

    


      

    • FFmpeg version : 2024-08-26-git-98610fe95f-full_build
    • 


    • The ffmetadata file format and the approach I've used should be correct according to the FFmpeg documentation.
    • 


    


    I would greatly appreciate any recommendations or suggestions on how to solve this problem !

    


    I found a bad solution for my problem, but it still isn't ideal as it requires specifying -map_metadata:s:N 1:s:N for each stream individually, which is quite cumbersome. Is there a way to simplify this process and avoid having to set metadata for each stream separately ?

    


    The command I’m using is :

    


    C:\Users\Alexander\Videos>ffmpeg -i INPUT.mp4 -i ffmetadata2.txt -map 0 -map_metadata:s:0 1:s:0 -map_metadata:s:1 1:s:1 -map_metadata:s:2 1:s:2 -map_metadata:s:3 1:s:3 -c copy OUTPUT2.mp4 -hide_banner


    


    This works, but having to specify -map_metadata:s:N for each stream creates extra work, especially as the number of streams increases. Is there a more efficient way to handle this ?

    


  • Stream H264 raw data on RTSP server

    1er janvier, par Aitazaz

    I have H264 hex string data saved in a list.
The data is in correct format as it is being received, I am trying to stream it to RTSP server.

    


    I have stream the data in realtime as it is from a dashcam.

    


    The RTSP server is deployed but when I stream frames to it, the connection is created and then ends in an instant (does not last for a second)

    


    The code is mentioned below which performs this streaming task.

    


    def h264_stream_to_rtsp(data_list, rtsp_url):
    try:
        ffmpeg_command = [
            "ffmpeg", 
            "-f", "h264",
            "-i", "-",
            "-vcodec", "libx264",
            "-preset", "fast",
            "-f", "rtsp",
            "-analyzeduration", "5000000",
            "-probesize", "5000000", 
            rtsp_url  # The RTSP URL to stream to
        ]
        
        ffmpeg_process = subprocess.Popen(ffmpeg_command, stdin=subprocess.PIPE)

        for index, hex_data in enumerate(data_list):
            # print(f"Processing hex data {index + 1}/{len(data_list)}...")

            if len(hex_data) % 2 != 0:
                hex_data = '0' + hex_data  # Append a leading zero if length is odd

            binary_data = binascii.unhexlify(hex_data)

            ffmpeg_process.stdin.write(binary_data)

        ffmpeg_process.stdin.close()

        ffmpeg_process.wait()
        print("Stream completed.")

    except KeyboardInterrupt:
        print("Stopping live stream.")
    except Exception as e:
        print(f"Error: {e}")


    


    Logs from the RTSP server are mentioned below :

    


    2025/01/01 10:56:04 INF [RTSP] [conn 20.174.9.78:35474] opened
2025/01/01 10:56:04 INF [RTSP] [session 1d2bb871] created by 20.174.9.78:35474
2025/01/01 10:56:04 INF [RTSP] [session 1d2bb871] is publishing to path 'live', 1 track (H264)
2025/01/01 10:56:04 INF [RTSP] [session 1d2bb871] destroyed: torn down by 20.174.9.78:35474
2025/01/01 10:56:04 INF [RTSP] [conn 20.174.9.78:35474] closed: EOF
2025/01/01 10:56:48 INF [RTSP] [conn 20.174.9.78:54448] opened
2025/01/01 10:56:48 INF [RTSP] [session b6a95e71] created by 20.174.9.78:54448
2025/01/01 10:56:48 INF [RTSP] [session b6a95e71] is publishing to path 'live', 1 track (H264)
2025/01/01 10:56:48 INF [RTSP] [session b6a95e71] destroyed: torn down by 20.174.9.78:54448


    


    How can I stream continuously ?

    


  • avformat/iamf_parse : reject ambisonics mode > 1

    29 novembre 2024, par Michael Niedermayer
    avformat/iamf_parse : reject ambisonics mode > 1
    

    ambisonics mode > 1 does not initialize any layer but layer 0
    is unconditionally dereferenced

    Fixes : poc-2024-11
    Fixes : null pointer dereference
    Found-by : 苏童 <220235212@seu.edu.cn>
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavformat/iamf_parse.c