Recherche avancée

Médias (17)

Mot : - Tags -/wired

Autres articles (37)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

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

Sur d’autres sites (6726)

  • Why is ffmpeg taking up so much memory when I try to stop a livestream ?

    4 juillet 2019, par FiskFan1999

    When the ffmpeg function is running, there are no problems with memory and everything runs smoothly. However, when I attempt to stop the stream/ffmpeg by pressing q (or ctrl-c), ffmpeg freezes, doesn’t take any other inputs, and suddenly takes up an obscene amount of memory.

    I am using ffmpeg to livestream on youtube. I am using a MacBook Mid 2015 running macOS Mojave.

    here is the function I am using with ffmpeg.

    ffmpeg -re -f lavfi -i testsrc2=s=1280x720:r=60 -re -i "INPUT FILE.mp3" -vcodec libx264 -pix_fmt yuv420p -preset "ultrafast" -r 60 -g 120 -b:v 6168000 -filter_complex "[0]scale=1280:720;[1]aloop=start=0:size=202*44100:loop=-1" -acodec libmp3lame -ar 44100 -threads 3 -b:a 640000 -qscale:a 5 -bufsize 512k -f flv ${YOUTUBE_URL}/${KEY}

    The command runs perfectly and as expected while it is running. At this point, in Activity Monitor I can see that ffmpeg seems to peak to about 101 MB. When I press q, which is the button to end the encoding, if the stream had been going for about ten minutes ffmpeg freezes and in Activity monitor the ffmpeg command appears to climb to several gigabytes of memory without any sign of stopping. The most I have noticed is about 6 GB before I killed the command. Ffmpeg seems to be writing almost a gigabyte of data into memory a second. In fact, this slows down my computer when it occurs and threatens to completely fill up my memory.

    When this occurs, there are no error messages (except for warnings about running out of memory) and the terminal running ffmpeg seems to not respond to any kill commands, and the only way to alleviate the situation is to force close the terminal window itself.

    I’m wondering if somehow I am creating a memory leak issue or if I wrote something wrong or didn’t include something that would be necessary for live-streaming with ffmpeg.

  • When I use Fluent-Ffmpeg to access Ffmpeg, there are two different threads but I dont want it

    25 mars 2019, par Ahmet Hakan Billur

    I try to broadcast with rtsp live stream from IP camera on web app that is improved with node.js-jsmpeg([a link]https://www.npmjs.com/package/fluent-ffmpeg !), web socket, html5(canvas).Everything ok that live streaming works but missing frame and high CPU usaged by streaming on web app and I try to reduce so I can intervene ffmpeg with fluent-ffmpeg but when I monitor CPU usaged I can see there 2 different threads following as and look at screenshot of CPU ;
    enter image description here

    ffmpeg -rtsp_trasport tcp -i rtsp ://10.6.0.225 -f mpeg1video - is worked by jsmpeg and canvas/html5
    index.html

       

       
       
       
       

       <div><canvas width="640" height="360"></canvas></div>
       div><canvas width="640" height="360"></canvas>  
       <code class="echappe-js">&lt;script type=&quot;text/javascript&quot; src='http://stackoverflow.com/feeds/tag/jsLib/jsmpeg.js'&gt;&lt;/script&gt;

    &lt;script type=&quot;text/javascript&quot; src='http://stackoverflow.com/feeds/tag/jsLib/ffmpegUtil.js'&gt;&lt;/script&gt;

    &lt;script type=&quot;text/javascript&quot;&gt;<br />
         var canvas = document.getElementById('videoCanvas');<br />
         var ws = new WebSocket(&quot;ws://10.6.0.206:9999&quot;)<br />
         var player = new jsmpeg(ws, {canvas:canvas, autoplay:true,audio:false,loop: true});<br />
       &lt;/script&gt;

    other one /usr/bin/ffmpeg -i rtsp ://10.6.0.225 -y out.ts is work by following piece of code in app.js

    Stream = require('node-rtsp-stream');
    stream = new Stream({
       name: 'name',
       streamUrl: 'rtsp://10.6.0.225',
       wsPort: 9999
    });

    var ffmpeg = require('fluent-ffmpeg');
    var proc = new ffmpeg();

    proc
    .addInput('rtsp://10.6.0.225')
    .on('start', function(ffmpegCommand) {
       /// log something maybe
       console.log('start-->'+ffmpegCommand)
    })
    .on('progress', function(data) {
       /// do stuff with progress data if you want
       console.log('progress-->'+data)
    })
    .on('end', function() {
       /// encoding is complete, so callback or move on at this point
       console.log('end-->')
    })
    .on('error', function(error) {
       /// error handling
       console.log('error-->'+error)

    })
    .output('out.ts')
    .run();

    and then I don’t want to get two different ffmpeg command threads in there.
    Does anyone have an idea ?
    Thanks in advice.

  • Inotifywait giving wrong file path after running ffmpeg

    23 mars 2019, par Morpheus

    So im running a little inotifywait script to monitor a folder for new files and transcode them if they are mxf and contain a video stream. But for some weird reason if the script does call ffmpeg the next fileevent by inotify is giving me a wrong path seemingly random cutting the filepath at any position.

    So far i tried moving the call to an external script, resetting the file variable which shouldnt matter anyway and adding a sleep to the script. I also tried using normal filepaths without whitespaces or - which shouldnt matter but that also didnt help.

    inotifywait -m -r -e close_write -e moved_to --format "%w%f"  "$dir" | while read f

    do
               if ffprobe "$file" 2>&amp;1 | egrep 'Stream #0:0: Video' &amp;&amp; ffprobe "$file" 2>&amp;1 | egrep 'MXF' ; then
                   mkdir -vp "$movepath" &amp;&amp; mkdir -vp "$trans$path3"  &amp;&amp; mkdir -vp "$trans2$path3" &amp;&amp; mv -fu "$f" "$trans2$path" &amp;&amp; \
                   ffmpeg -y -i "$file" -map_metadata 0 -c:v h264_nvenc -b:v 2m -bufsize 2m -profile:v baseline -level:v 3.0 -pix_fmt yuv420p -vf yadif,scale="iw/4:ih/4" -an "$transpath" 2>> copy_ffmpeg_log.txt
    done

    expected :

    /media/raid/TMO_Media/INGEST-HP.1/WacinS1_19V01.5C935C93A3B4V.mxf

    example for an result after transcode :

    cinS1_19A06.5C935C93A088A.mxf

    do while normal mv commands work and inotify does work as expected when stopped for transcoding a file the next path given by inotify is getting messed up

    link to the entire script : https://pastebin.com/aRNG4rqz