Recherche avancée

Médias (91)

Autres articles (78)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (11541)

  • h264 inside AVI, MP4 and "Raw" h264 streams. Different format of NAL units (or ffmpeg bug)

    24 octobre 2019, par bukkojot

    TL ;DR : I want to read raw h264 streams from AVI/MP4 files, even broken/incomplete.

    Almost every document about h264 tells me that it consists of NAL packets. Okay. Almost everywhere told to me that the packet should start with a signature like 00 00 01 or 00 00 00 01. For example, https://stackoverflow.com/a/18638298/8167678, https://stackoverflow.com/a/17625537/8167678

    The format of H.264 is that it’s made up of NAL Units, each starting
    with a start prefix of three bytes with the values 0x00, 0x00, 0x01
    and each unit has a different type depending on the value of the 4th
    byte right after these 3 starting bytes. One NAL Unit IS NOT one frame
    in the video, each frame is made up of a number of NAL Units.

    Okay.

    I downloaded random_youtube_video.mp4 and strip out one frame from it :

    ffmpeg -ss 10 -i random_youtube_video.mp4 -frames 1 -c copy pic.avi

    And got :
    hexdump of AVI
    Red part - this is part of AVI container, other - actual data.
    As you can see, here I have 00 00 24 A9 instead of 00 00 00 01

    This AVI file plays perfectly

    I do same for mp4 container :
    hexdump of mp4

    As you can see, here exact same bytes.
    This MP4 file plays perfectly

    I try to strip out raw data :
    ffmpeg -i pic.avi -c copy pic.h264
    Raw data

    This file can’t play in VLC or even ffmpeg, which produced this file, can’t parse it :
    ffmpeg error

    I downloaded mp4 stream analyzer and got :
    Analysis

    MP4Box tells me :

    Cannot find H264 start code
    Error importing pic.h264: BitStream Not Compliant

    It very hard to learn internals of h264, when nothing works.

    So, I have questions :

    1. What actual data inside mp4 ?
    2. What I must read to decode that data (I mean different annex-es)
    3. How to read stream and get decoded image (even with ffmpeg) from this "broken" raw stream ?

    UPDATE :

    It seems bug in ffmpeg :

    When I do double conversion :

            ffmpeg -ss 10 -i random_youtube_video.mp4 -frames 1 -c copy pic.mp4
            ffmpeg pic.mp4 -c copy pic.h264

    enter image description here

    But when I convert file directly :

    ffmpeg -ss 10 -i random_youtube_video.mp4 -frames 1 -c copy pic.h264
    with NALs

    I have NALs signatures and one extra NAL unit. Other bytes are same (selected).

    This is bug ?

    UPDATE

    Not, this is not bug, U must use option -bsf h264_mp4toannexb to save stream as "Annex B" format (with prefixes)

  • How to convert messed-up .vtt sub file from youtube-dl —write-auto-sub download ?

    27 septembre 2023, par perry_the_python

    My goal is to download a YouTube video with auto-generated subtitles in a separate file like .vtt,.srt, etc.

    


    I am currently trying to achieve this with youtube-dl but I am open to other solutions if needed.

    


    When I run the following command, it downloads the video as .mp4 (which is fine) and a separate .vtt file, but the .vtt seems to be messed-up somehow and displays all the text for the whole clip at once instead of the specified times.

    


    Command I am running :

    


    youtube-dl --write-auto-sub https://www.youtube.com/watch?v=Roc89oOZOF4&list=PLJBo3iyb1U0eNNN4Dij3N-d0rCJpMyAKQ&index=45


    


    Downloads this .vtt :

    


    WEBVTT&#xA;Kind: captions&#xA;Language: en&#xA;&#xA;00:00:05.960 --> 00:00:08.290 align:start position:0%&#xA; &#xA;thank &lt;00:00:06.003><c>you  </c>&lt;00:00:06.046><c>ah </c>&lt;00:00:06.089><c>crap  </c>&lt;00:00:06.132><c>well </c>&lt;00:00:06.175><c>looks </c>&lt;00:00:06.218><c>like </c>&lt;00:00:06.261><c>the </c>&lt;00:00:06.304><c>good </c>&lt;00:00:06.347><c>Lord </c>&lt;00:00:06.390><c>just </c>&lt;00:00:06.433><c>sent  </c>&lt;00:00:06.476><c>me </c>&lt;00:00:06.519><c>a </c>&lt;00:00:06.562><c>conversation </c>&lt;00:00:06.605><c>starter </c>&lt;00:00:06.648><c>come </c>&lt;00:00:06.691><c>here  </c>&lt;00:00:06.734><c>Jesse </c>&lt;00:00:06.777><c>come </c>&lt;00:00:06.820><c>get </c>&lt;00:00:06.863><c>the </c>&lt;00:00:06.906><c>ball  </c>&lt;00:00:06.949><c>hmm</c>&#xA;&#xA;00:00:08.290 --> 00:00:10.549 align:start position:0%&#xA;thank you  ah crap  well looks like the good Lord just sent  me a conversation starter come here  Jesse come get the ball  hmm&#xA; &#xA;&#xA;00:00:10.549 --> 00:00:13.070 align:start position:0%&#xA; &#xA; &#xA;&#xA;00:00:13.070 --> 00:00:15.470 align:start position:0%&#xA; &#xA; &#xA;&#xA;00:00:15.470 --> 00:00:23.750 align:start position:0%&#xA; &#xA; &#xA;&#xA;00:00:23.750 --> 00:00:23.760 align:start position:0%&#xA; &#xA; &#xA;&#xA;00:00:23.760 --> 00:00:26.480 align:start position:0%&#xA; &#xA;&#xA;&#xA;&#xA;

    &#xA;

    I have read that this may be done on purpose by YouTube.

    &#xA;

    Even if this is true, is there any way to convert this .vtt to a usable format or simply download correctly-formatted auto-generated subtitles from YouTube ?

    &#xA;

    Python, FFMPEG, cmd-line preferred, but anything is helpful !

    &#xA;

    Thanks ! Any and all assistance is greatly appreciated !

    &#xA;

  • ffmpeg streaming to youtube becomes slow and starts buffering

    13 août 2022, par Syphax

    I'm using FFmpeg to broadcast to YouTube via rtmp.

    &#xA;

    I'm using a cloud computing instance.

    &#xA;

    Whether I put an HD video or low quality to broadcast, at the beginning it says that all is good and connection is Excellent, but after about 3 hours it becomes slow and starts to cut.

    &#xA;

    I don't understand why this is happening, and if you know guys any tips to fix that.&#xA;Thanks...

    &#xA;