Recherche avancée

Médias (0)

Mot : - Tags -/performance

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

Autres articles (14)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

Sur d’autres sites (5634)

  • ffmpeg fluent 'Error initializing complex filters'

    15 février 2018, par Ricky

    I am trying to create a complex filter based on the images the user has chosen in the app however ffmpeg fluent is outputting

    "ffmpeg exited with code 1 : Error initializing complex filters."

    This is the code in question :

    let streamYT = (YTrtmp) => {
     let L = logosInUse.length
     let location = logoHorizontal + ":" + logoHeight
     let scale = imgScale

     let formula = null
     let accr = altTime*2
     let accr2 = accr
     for(var i=0; i<(L + 1); i++) {
         if(i === 1){
             formula = "["+ i +"]scale="+ scale+"[ovrl" + i +"], [v"+ (i - 1) +"][ovrl" + i + "] overlay=" + location +":enable='lt(mod(t,"+ (L * altTime)+"),"+ altTime+")'[v"+i+"];"
         }
         if(i === 2){
             formula = formula + "["+ i +"]scale="+ scale+"[ovrl" + i +"], [v"+ (i - 1) +"][ovrl" + i + "] overlay=" + location +":enable='between(mod(t,"+ (L * altTime)+"),"+ altTime+","+accr+")'[v"+i+"];"
         }
         if(i === 3){
             formula = formula + "["+ i +"]scale="+ scale+"[ovrl" + i +"], [v"+ (i - 1) +"][ovrl" + i + "] overlay=" + location +":enable='gt(mod(t,"+ (L * altTime)+"),"+ accr +")'[v"+i+"];"
         }
         if(i > 3){
             accr2 = accr2 + altTime
             formula = formula + "["+ i +"]scale="+ scale+"[ovrl" + i +"], [v"+ (i - 1) +"][ovrl" + i + "] overlay=" + location +":enable='gt(mod(t,"+ (L * altTime)+"),"+ accr2 +")'[v"+i+"];"
         }
     }
     if(formula !==  null){
       formula = formula.slice(0, -5)
       }
     let listOfLogos = ''
     for(n in logosInUse){
     listOfLogos = listOfLogos + ".input('./public/images/" + logosInUse[n] + ")"
     }

     console.log("streaming to youtube")
     var proc3 = new ffmpeg({ source: inputURL, timeout: 0 })
       .addOption('-vcodec', 'libx264')
       .addOption('-acodec', 'aac')
       // .addOption('-crf', 26)
       .addOption('-f', 'flv')
       // .addOption('-vf', "scale=" +  resolution)
       .complexFilter('"' + formula + '"')
       .on('start', function(commandLine) {
       console.log('Query : ' + commandLine);
       })
       .on('error', function(err) {
       console.log('Error: ' + err.message);
       })
       .output('rtmp://a.rtmp.youtube.com/live2/' + YTrtmp, function(stdout, stderr) {
         console.log('Convert complete' +stdout)
       })

       for(n in logosInUse){
         proc3 = proc3.input('./public/images/' + logosInUse[n])
         }
       // proc3 =  proc3.input("./public/images/red.jpg")
       proc3.run()
     }

    formula outputs

    [1]scale=40:40[ovrl1], [v0][ovrl1]
    overlay=580:10:enable='lt(mod(t,40),10)'[v1];[2]scale=40:40[ovrl2], [v1]
    [ovrl2] overlay=580:10:enable='between(mod(t,40),10,20)'[v2];
    [3]scale=40:40[ovrl3], [v2][ovrl3]
    overlay=580:10:enable='gt(mod(t,40),20)'[v3];[4]scale=40:40[ovrl4], [v3]
    [ovrl4] overlay=580:10:enable='gt(mod(t,40),30)'[v4];

    and the query outputs

    ffmpeg -i https://mnmedias.api.telequebec.tv/m3u8/29880.m3u8 -i
    ./public/images/crunchy.png -i ./public/images/logo2.jpg -i
    ./public/images/red.jpg -i ./public/images/ACE.png -filter_complex "
    [1]scale=40:40[ovrl1], [v0][ovrl1]
    overlay=580:10:enable='lt(mod(t,40),10)'[v1];[2]scale=40:40[ovrl2], [v1]
    [ovrl2] overlay=580:10:enable='between(mod(t,40),10,20)'[v2];
    [3]scale=40:40[ovrl3], [v2][ovrl3]
    overlay=580:10:enable='gt(mod(t,40),20)'[v3];[4]scale=40:40[ovrl4], [v3]
    [ovrl4] overlay=580:10:enable='gt(mod(t,40),30)'" -vcodec libx264 -acodec
    aac -f flv rtmp://a.rtmp.youtube.com/live2/2222-2222-2222-2222

    Which runs fine when I plug it into my console directly. Can’t understand where I am going wrong here.

  • OpenCV Multi-camera handling issue

    19 janvier 2013, par user1797582

    1) I get this errors while handling two logitech c310 cameras with OpenCV(updated Kubuntu Linux)

    VIDIOC_STREAMON : No space left on device

    Whole error log is as below

    **IDIOC_QUERYMENU: Invalid argument
    VIDIOC_QUERYMENU: Invalid argument**
    VIDIOC_QUERYMENU: Invalid argument
    VIDIOC_QUERYMENU: Invalid argument
    VIDIOC_QUERYMENU: Invalid argument
    VIDIOC_QUERYMENU: Invalid argument
    VIDIOC_QUERYMENU: Invalid argument
    **libv4l2: error turning on stream: No space left on device**
    **VIDIOC_STREAMON: No space left on device**
    OpenCV Error: Bad flag (parameter or structure field) (Unrecognized or unsupported array type) in cvGetMat, file /home/rjdp/Computer_Vision/0_Installers/OpenCV-2.4.2/modules/core/src/array.cpp, line 2482
    terminate called after throwing an instance of 'cv::Exception'
     what():  /home/rjdp/Computer_Vision/0_Installers/OpenCV-2.4.2/modules/core/src/array.cpp:2482: error: (-206) Unrecognized or unsupported array type in function cvGetMat

    2) It happens only when Handling two cameras, Even at default low res 640x480. I still tried to lower resolution in code to 320x240 which also did not work.

    3) I searched in lot of other posts here & on other sites. Which told me there is not enough USB cam bandwidth available. So I tried to plug one cam in front USB & one in the back side which also failed :(

    My Question is :

    Is it possible to solve this issue of bandwith/memory & run two or
    more cameras together on opencv 2.4.2 ??
    OpenCV uses ffmpeg to handle I/O so can i tell my camera hardware with some ffmpeg command to take input stream with compressed MPEG mode instead of bandwidth consuming normal mode.

    CODE IS AS BELOW :

    #include "opencv2/opencv.hpp"
    #include
    using namespace cv;

    int main(int, char**)
    {
       VideoCapture cap01(0); // open the default camera
       cap01.set(CV_CAP_PROP_FRAME_WIDTH,320);
       cap01.set(CV_CAP_PROP_FRAME_HEIGHT,240);
       //sleep(1);
       if(!cap01.isOpened())  // check if we succeeded
           return -1;
       namedWindow("Camera01",1);

       VideoCapture cap02(1); // open the default camera
       cap02.set(CV_CAP_PROP_FRAME_WIDTH,320);
       cap02.set(CV_CAP_PROP_FRAME_HEIGHT,240);
      if(!cap02.isOpened())  // check if we succeeded
           return -1;
       namedWindow("Camera02",1);

       for(;;)
       {
           Mat frame, frame_1;
           //Mat frame02;
           cap02 >> frame;
           imshow("Camera01", frame);
           if(waitKey(30) >= 0) break;
           Mat frame_1;
           cap02 >> frame_1;
           imshow("Camera02", frame_1);
           if(waitKey(30) >= 0) break;
       }

       return 0;
    }
  • FFMPEG No such filter : 'format=nv12|vaapi,hwupload'

    14 novembre 2022, par Devin Dixon

    I'm on a AWS g4ad instance and I am trying to get hardware accelleration with the GPU to work. with ffmpeg. A base line test is this :

    


     ffmpeg -y -vaapi_device /dev/dri/renderD128 -v info -thread_queue_size 10000  -i video.mp4 -c:v h264_vaapi -vf 'format=nv12|vaapi,hwupload' -crf 25 -tune zerolatency -g 120  -r 60 -pix_fmt yuv420p -preset faster -maxrate 14000k -bufsize 14000k -strict -2 -ar 44100 -b:a 128k -af aresample=async=1 -acodec aac file_out.mp4


    


    The above works, GPU is installed and working correctly. In my actual use case, I am grabbing the screen from an X11Grab, which works without the GPU and normal libx264 but fails when I add try to use h264_vaapi. The command I use is below :

    


    /usr/bin/ffmpeg -vaapi_device /dev/dri/renderD128 -y -v info -f x11grab -draw_mouse 0 -r 60 -s 1920x1080 -thread_queue_size 10000 -i :0.0+0,0 -f alsa -thread_queue_size 10000 -i plug:bsnoop -acodec aac -strict -2 -ar 44100 -b:a 128k -af aresample=async=1 -c:v h264_vaapi -vf 'format=nv12|vaapi,hwupload' -preset faster -maxrate 14000k -bufsize 14000k -pix_fmt yuv420p -r 60 -crf 25 -g 120 -tune zerolatency -f flv rtmp://[to_an_rtmp source]

And my output is this:

2022-11-14 02:08:30.928 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: ffmpeg version 5.1.2-0ubuntu1~18.04.sav1.1 Copyright (c) 2000-2022 the FFmpeg developers
2022-11-14 02:08:30.928 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   built with gcc 7 (Ubuntu 7.5.0-6ubuntu2~18.04.sav0)
2022-11-14 02:08:31.105 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   configuration: --prefix=/usr --extra-version='0ubuntu1~18.04.sav1.1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-lcms2 --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libjxl --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-sndio --enable-pocketsphinx --enable-librsvg --enable-crystalhd --enable-libmfx --enable-libsvtav1 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
2022-11-14 02:08:31.105 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   libavutil      57. 28.100 / 57. 28.100
2022-11-14 02:08:31.105 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   libavcodec     59. 37.100 / 59. 37.100
2022-11-14 02:08:31.105 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   libavformat    59. 27.100 / 59. 27.100
2022-11-14 02:08:31.105 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   libavdevice    59.  7.100 / 59.  7.100
2022-11-14 02:08:31.105 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   libavfilter     8. 44.100 /  8. 44.100
2022-11-14 02:08:31.105 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   libswscale      6.  7.100 /  6.  7.100
2022-11-14 02:08:31.105 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   libswresample   4.  7.100 /  4.  7.100
2022-11-14 02:08:31.105 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   libpostproc    56.  6.100 / 56.  6.100
2022-11-14 02:08:31.105 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: [x11grab @ 0x56155ee70ac0] Stream #0: not enough frames to estimate rate; consider increasing probesize
2022-11-14 02:08:31.105 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: Input #0, x11grab, from ':0.0+0,0':
2022-11-14 02:08:31.105 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   Duration: N/A, start: 1668391710.975066, bitrate: 3981312 kb/s
2022-11-14 02:08:31.105 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1920x1080, 3981312 kb/s, 60 fps, 1000k tbr, 1000k tbn
2022-11-14 02:08:31.105 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: Guessed Channel Layout for Input Stream #1.0 : stereo
2022-11-14 02:08:31.105 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: Input #1, alsa, from 'plug:bsnoop':
2022-11-14 02:08:31.105 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   Duration: N/A, start: 1668391710.731953, bitrate: 1536 kb/s
2022-11-14 02:08:31.106 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
2022-11-14 02:08:31.106 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: Codec AVOption crf (Select the quality for constant quality mode) specified for output file #0 (rtmp://ingest.bingewave.com/live/ce98c9bb-78b0-4ee5-8a8e-af35160da695-broadcast?sign=1668996507-c340acfb5219383f660d41057a050de6) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
2022-11-14 02:08:31.106 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: Codec AVOption preset (Encoding preset) specified for output file #0 (rtmp://ingest.bingewave.com/live/ce98c9bb-78b0-4ee5-8a8e-af35160da695-broadcast?sign=1668996507-c340acfb5219383f660d41057a050de6) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
2022-11-14 02:08:31.237 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: Codec AVOption tune (The metric that the encoder tunes for. Automatically chosen by the encoder by default) specified for output file #0 (rtmp://ingest.bingewave.com/live/ce98c9bb-78b0-4ee5-8a8e-af35160da695-broadcast?sign=1668996507-c340acfb5219383f660d41057a050de6) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
2022-11-14 02:08:31.237 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: Stream mapping:
2022-11-14 02:08:31.237 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_vaapi))
2022-11-14 02:08:31.237 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42:   Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (native))
2022-11-14 02:08:31.237 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: Press [q] to stop, [?] for help
2022-11-14 02:08:31.237 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: [AVFilterGraph @ 0x56155ee5d880] No such filter: 'format=nv12|vaapi,hwupload'
2022-11-14 02:08:31.237 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: Error reinitializing filters!
2022-11-14 02:08:31.237 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: Failed to inject frame into filter network: Invalid argument
2022-11-14 02:08:31.237 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: Error while processing the decoded data for stream #0:0
2022-11-14 02:08:31.237 INFO: [557] LoggingUtils$Companion$OutputLogger$1.invoke$lambda-0#42: Conversion failed!
root@ip-172-31-90-180:~# 


    


    I see that is failing because No such filter : 'format=nv12|vaapi,hwupload', which I don't get when I run the other command. What am I doing wrong here ?