Recherche avancée

Médias (1)

Mot : - Tags -/ogg

Autres articles (6)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

Sur d’autres sites (3465)

  • FFMPEG : how to wrap h264 stream into FLV container ?

    6 juillet 2017, par jiandingzhe

    What I want is straightforward : wrap H.264 video stream into a FLV container. However, ffmpeg just decode the input stream and pack raw video stream into FLV. The details are described below :

    The input stream is captured from a hardware-encoder video camera, and the FLV will be sent to some video server. Firstly I used following command :

    $ ffmpeg -framerate 15 -s 320x240 -i /dev/video1 -f flv "rtmp://some.website.com/receive/path"

    However, the resultant stream is suspicious. The watching side don’t get any H.264 thing. Then I made a test by writing output to local files.

    1 : Read raw stream, encode by h264_omx, write to FLV file :

    $ ffmpeg -framerate 15 -s 320x240 -i /dev/video0 -codec h264_omx -f flv raw_input_h264_omx.flv

    ......
    Input #0, video4linux2,v4l2, from '/dev/video0':
     Duration: N/A, start: 194017.870905, bitrate: 18432 kb/s
       Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 320x240, 18432 kb/s, 15 fps, 15 tbr, 1000k tbn, 1000k tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_omx))
    ......

    2 : Read H264 stream, write to FLV file :

    $ ffmpeg -framerate 15 -s 320x240 -i /dev/video1  -f flv h264_input.flv

    ......
    Input #0, video4linux2,v4l2, from '/dev/video1':
     Duration: N/A, start: 194610.307096, bitrate: N/A
       Stream #0:0: Video: h264 (Main), yuv420p(progressive), 320x240, 15 fps, 15 tbr, 1000k tbn, 2000k tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> flv1 (flv))
    ......

    Then read the two files correspondingly :

    $ ffmpeg -i raw_input_h264_omx.flv
    ......
       Stream #0:0: Video: h264 (High), yuv420p(progressive), 320x240, 200 kb/s, 15 fps, 15 tbr, 1k tbn

    $ ffmpeg -i h264_input.flv
    ......
       Stream #0:0: Video: flv1, yuv420p, 320x240, 200 kb/s, 15 fps, 15 tbr, 1k tbn

    It is clear when I give a H.264 stream, ffmpeg firstly decodes it, then pack the raw video into FLV. How to avoid that happen, and have the H.264 stream packed directly ?

    Supplement : I will eventually pushing multiple video streams, so don’t ask me to allow ffmpeg’s silent decoding, and encode the stream again.

  • No audio output using FFmpeg

    26 mars 2022, par John Mergene Arellano

    I am having problem on Live stream output. I am streaming from mobile app to Node JS server to RTMP. Video output of the live stream is working but not the audio. There is no audio output from live stream.

    


    From my client side, I am sending a stream using the Socket.IO library. I captured the video and audio using getUserMedia API.

    


    navigator.mediaDevices.getUserMedia(constraints).then((stream) => {
    window.videoStream = video.srcObject = stream;
    let mediaRecorder = new MediaRecorder(stream, {
        videoBitsPerSecond : 3 * 1024 * 1024
    });
    mediaRecorder.addEventListener('dataavailable', (e) => {
        let data = e.data;
        socket.emit('live', data);
    });
    mediaRecorder.start(1000);
});


    


    Then my server will receive the stream and write it to FFmpeg.

    


    client.on('live', (stream)=>{
   if(ffmpeg)
       ffmpeg.stdin.write(stream);
});


    


    I tried watching the live video in VLC media player. There is a 5 seconds delay and no audio output.

    


    Please see below for FFmpeg options I used :

    


    ffmpeg = this.CHILD_PROCESS.spawn("ffmpeg", [
   '-f',
   'lavfi',
   '-i', 'anullsrc',
   '-i','-',
   '-c:v', 'libx264', '-preset', 'veryfast', '-tune', 'zerolatency',
   '-c:a', 'aac', '-ar', '44100', '-b:a', '64k',
   '-y', //force to overwrite
   '-use_wallclock_as_timestamps', '1', // used for audio sync
   '-async', '1', // used for audio sync
   '-bufsize', '1000',
   '-f',
   'flv',
   `rtmp://127.0.0.1:1935/live/stream` ]);


    


    What is wrong with my setup ? I need to fix the command so that the live stream will output both video and audio.

    


    I tried streaming to youtube RTMP but still no audio. I am expecting to have an output of video and audio from the getUserMedia API.

    


    What is wrong with my setup ? I need to fix the command so that the live stream will output both video and audio.

    


    I tried streaming to youtube RTMP but still no audio. I am expecting to have an output of video and audio from the getUserMedia API.

    


  • Use ffmpeg to match an image to source frames in video [closed]

    25 mai 2024, par user22335954

    I'm trying to write an application to split a single video into multiple pieces based on the appearance of a specific image. (Think title cards). I have video files that may have more than one episode or content inside of a single file and I want them split anywhere I find that title card or image.

    


    My application works by the user providing a timestamp in the format of 00:00:00 to specify the title card image which is then used like this :

    


    ffmpeg -i FILE -qmin 1 -qscale:v 1 -vframes 00:00:00 -f image2 img.png


    


    Now I want to compare that image (img.png) to the source video file using the following example command I've found :

    


    ffmpeg -i FILE -loop 1 -i img.png -an -filter_complex "blend=difference:shortest=1,blackframe=90:20" -f null


    


    I've had to play around with the blackframe=90:20 values to get what I think are correct matches, but I don't understand what these values and/or the blackframe filter is actually controlling. The blend documentation : https://ffmpeg.org/ffmpeg-filters.html#Examples-46 doesn't seem to go into much detail about what is actually happening. I do understand the difference blend means I'm essentially looking for the smallest difference, indicating a frame match to my img, but beyond that I'm sort of just guessing.

    


    Additionally, the output shows a bunch of :

    


    [Parsed_blackframe_1 @ 0x5c1183081880] frame:195 pblack:99 pts:6506 t:6.506000 type:B last_keyframe:135


    


    Based on the frames I can parse those out to find the non-sequential frames and find how how many segments I expect in the video, but when I go to split them, I don't know how to translate the frame or the t value into a timestamp format of 00:00:00. Even for matches that I'm 100% sure of, the frame values don't seem to line up with what I expect. For example, from watching the video, I know that a perfect match occurs at exactly 00:01:45, but the blackframe data says the match occurs at frame 1471 or t:49.08 (the video has a framerate of 29.97). 1471 / 29.97 is indeed 49.08, but that does not correlate to the actual time of 1:45 (105 seconds). How can I convert these values into timestamps (or just show the timestamps of the frames) ?