Recherche avancée

Médias (91)

Autres articles (47)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

Sur d’autres sites (9437)

  • MediaRecorder - FFMPEG - RTMP issue

    5 octobre 2017, par Bear10

    Currently I’m working on streaming Audio and Video from a video captured in Chrome 61.0.3163.100 with the MediaRecorder API.

    The backend is running on node and it spawns a child process which runs ffmpeg :

    ffmpeg -threads 4 -i udp://127.0.0.1:41234 -t 5400 -ar 44100
    -b:a 128k -c:v libx264 -c:a libfdk_aac -pix_fmt yuv420p -r 30 -g 60 -vb 2048k -preset slow -minrate 2000k -maxrate 4000k test.mp4

    On the client side I send the raw Blob from Chrome to the Node server via web socket :

    var mediaStream = new MediaStream([videoOutput.getVideoTracks()[0], audioOutput.getAudioTracks()[0]]),
               recorder = new MediaRecorder(mediaStream, {
                   mimeType: 'video/webm;codecs=vp8'
               });

           socket = io('http://localhost:' + port);

           recorder.addEventListener('dataavailable', function (evt) {
               socket.emit('video:data', evt.data);
           });

    And in Node we simply resend via udp to the ffmpeg process :

    let client = dgram.createSocket('udp4'),

    client.send(chunk, 0, chunk.length, 41234, '127.0.0.1', function (err, bytes) {
               if (err) {
                   throw err;
               }
           });

    The resulting mp4 is viewable on VLC without any issues, despite many of the following warnings showing up in the FFMPEG console :

    stderr: frame= 1751 fps= 31 q=17.0 size=   15997kB time=00:00:58.39 bitrate=2244.3kbits/s dup=449 drop=32 speed=1.03x
    stderr: [mp4 @ 0x7fefe6019000] Non-monotonous DTS in output stream 0:1; previous: 2573919, current: 2573792; changing to 2573920. This may result in incorrect timestamps in the output file.

    stderr: frame= 1767 fps= 31 q=17.0 size=   16166kB time=00:00:58.90 bitrate=2248.4kbits/s dup=452 drop=32 speed=1.03x
    stderr: [libmp3lame @ 0x7fefe7004c00] Queue input is backward in time

    stderr: [mp4 @ 0x7fefe6019000] Non-monotonous DTS in output stream 0:1; previous: 2614768, current: 2614686; changing to 2614769. This may result in incorrect timestamps in the output file.

    However when I try to re stream this specific video on Youtube or any other RTMP platform (ex : Facebook) the audio is choppy, the command I use :

    ffmpeg -i ./test.mp4 -f flv rtmp://a.rtmp.youtube.com/live2/MYAPIKEY

    On the other hand any other "good" video not made from the aforementioned process re streams just fine and I suspect it might be from the warnings I’m getting.

    As an added bit of information streaming directly from my PC with avfoundation to youtube also works fine, and writing from avfoundation to a file and then streaming to youtube also works ok.

    The goal is to stream from my browser to the node server and directly to the Youtube RTMP without the choppy audio issue.

    If someone knows how to get rid of the warning to ensure ffmpeg isn’t the issue or can point me in the direction to achieve the desired result that’d be great.

  • NodeJS spawn ffmpeg thumb %t in filename

    7 septembre 2017, par asafg

    I’m creating screenshots at 15 fps with this NodeJS code :

    var spawn   = require('child_process').spawn;
    var args    = ['-ss', '00:00:07.86', '-i', 'filename.mp4', '-vf', 'fps=15', '/out%d.png'];
    var ffmpeg  = spawn('ffmpeg', args);

    This works fine, but I want the time stamp of each screenshot in the filename.

    from FFMPEG docs :

    %t is expanded to a timestamp

    But putting ... ,'/out%t.png'] fails and prints :

    grep stderr: [image2 @ 0x7f828c802c00] Could not get frame filename
    number 2 from pattern '/Users/***/projects/out%t.png' (either set updatefirst or use a pattern like %03d within the filename pattern)
    av_interleaved_write_frame(): Invalid argument
    ...
    grep stderr: Conversion failed!

    child process exited with code 1

    So that doesn’t look like the way to go.

    How do i get the timestamp for each screenshot ?

    Thanks

  • lavfi : add a preinit callback to filters.

    31 juillet 2017, par Nicolas George
    lavfi : add a preinit callback to filters.
    

    It is necessary for filters with child objects, to set the class
    and default options values.

    • [DH] libavfilter/avfilter.c
    • [DH] libavfilter/avfilter.h