Recherche avancée

Médias (1)

Mot : - Tags -/3GS

Autres articles (46)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

Sur d’autres sites (8964)

  • Launching ffmpeg from inside my C code doesn't convert video stream from fifo

    13 mai 2017, par abraxas1

    (Beaglebone Black, ubuntu 16.04 linux 4.4.62-ti-r99)

    I have a raw h264 feed coming into my C program (into a callback from a custom API) and then I named-piped the raw h264 to a file and this CLI command converts that file successfully.

    ffmpeg -report -re -framerate 30 -y -f h264 -i orbi_0148.cam1.h264 -c:v copy -an -video_size 1920x1080 -f mp4 orbi_0148.cam1-1.mp4

    I then try to launch this command from my program with the same options using execv(),

    first mkfifo the fifo’s,

    then launch ffmpeg (shown below) starts the streaming form the cameras to my callback function, and out to the fifos.

    I close the fifos at the end of video recording, and don’t get any file created and get this output, which I don’t understand at all.
    (the successful command line output follows below this output generated from execv())
    thanks, any help much appreciated.
    hardware has come in now and the spot light is on me.

    (execv output with options -report -y -i /tmp/fifocam3.h264 -c:v copy -an -video_size 1920x1080 -f mp4 /media/sd-card/orbi_0140.cam3.mp4)

    root@arm:/home/orbi# cat ffmpeg-20170511-001941.log
    ffmpeg started on 2017-05-11 at 00:19:41
    Report written to "ffmpeg-20170511-001941.log"
    Command line:
    /usr/bin/ffmpeg -report -y -i /tmp/fifocam3.h264 -c:v copy -an -video_size 1920x1080 -f mp4 /media/sd-card/orbi_0140.cam3.mp4
    ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers

     built with gcc 5.4.0 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 20160609
     configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11gr  libavutil      54. 31.100 / 54. 31.100
     libavcodec     56. 60.100 / 56. 60.100
     libavformat    56. 40.101 / 56. 40.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 40.101 /  5. 40.101
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.101 /  1.  2.101
     libpostproc    53.  3.100 / 53.  3.100
    Splitting the commandline.
    Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
    Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
    Reading option '-i' ... matched as input url with argument '/tmp/fifocam3.h264'.
    Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'copy'.
    Reading option '-an' ... matched as option 'an' (disable audio) with argument '1'.
    Reading option '-video_size' ... matched as AVOption 'video_size' with argument '1920x1080'.
    Reading option '-f' ... matched as option 'f' (force format) with argument 'mp4'.
    Reading option '/media/sd-card/orbi_0140.cam3.mp4' ... matched as output url.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option report (generate a report) with argument 1.
    Applying option y (overwrite output files) with argument 1.

    Successfully parsed a group of options.
    Parsing a group of options: input url /tmp/fifocam3.h264.

    Successfully parsed a group of options.
    Opening an input file: /tmp/fifocam3.h264.
    [h264 @ 0xf249a0] Format h264 probed with size=2048 and score=51
    [h264 @ 0xf249a0] Before avformat_find_stream_info() pos: 0 bytes read:32768 seeks:0
    [h264 @ 0xf25460] Current profile doesn't provide more RBSP data in PPS, skipping
    [h264 @ 0xf25460] bytestream overread -4
    [h264 @ 0xf25460] bytestream overread -4
    [h264 @ 0xf25460] bytestream overread -4
    [h264 @ 0xf25460] bytestream overread -4
    [h264 @ 0xf25460] bytestream overread -10
    [h264 @ 0xf25460] error while decoding MB 112 28, bytestream -10
    [h264 @ 0xf25460] concealing 4737 DC, 4737 AC, 4737 MV errors in P frame
    [h264 @ 0xf25460] Frame num gap 7 5


    /////// successful command line run  \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    root@arm:/home/orbi# ffmpeg -report -re -framerate 30 -y -f h264 -i orbi_0148.cam1.h264 -c:v copy -an -video_size 1920x1080 -f mp4 orbi_0148.cam1-1.mp4

    root@arm:/home/orbi# cat ffmpeg-20170511-002629.log
    ffmpeg started on 2017-05-11 at 00:26:29
    Report written to "ffmpeg-20170511-002629.log"
    Command line:
    ffmpeg -report -re -framerate 30 -y -f h264 -i orbi_0148.cam1.h264 -c:v copy -an -video_size 1920x1080 -f mp4 orbi_0148.cam1-1.mp4
    ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 5.4.0 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 20160609
     configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11gr  libavutil      54. 31.100 / 54. 31.100
     libavcodec     56. 60.100 / 56. 60.100
     libavformat    56. 40.101 / 56. 40.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 40.101 /  5. 40.101
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.101 /  1.  2.101
     libpostproc    53.  3.100 / 53.  3.100
    Splitting the commandline.
    Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
    Reading option '-re' ... matched as option 're' (read input at native frame rate) with argument '1'.
    Reading option '-framerate' ... matched as AVOption 'framerate' with argument '30'.
    Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
    Reading option '-f' ... matched as option 'f' (force format) with argument 'h264'.
    Reading option '-i' ... matched as input url with argument 'orbi_0148.cam1.h264'.
    Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'copy'.
    Reading option '-an' ... matched as option 'an' (disable audio) with argument '1'.
    Reading option '-video_size' ... matched as AVOption 'video_size' with argument '1920x1080'.
    Reading option '-f' ... matched as option 'f' (force format) with argument 'mp4'.
    Reading option 'orbi_0148.cam1-1.mp4' ... matched as output url.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option report (generate a report) with argument 1.
    Applying option y (overwrite output files) with argument 1.

    Successfully parsed a group of options.
    Parsing a group of options: input url orbi_0148.cam1.h264.
    Applying option re (read input at native frame rate) with argument 1.
    Applying option f (force format) with argument h264.

    Successfully parsed a group of options.
    Opening an input file: orbi_0148.cam1.h264.
    [h264 @ 0x848a20] Before avformat_find_stream_info() pos: 0 bytes read:32768 seeks:0
    [h264 @ 0x8515b0] Current profile doesn't provide more RBSP data in PPS, skipping
    [h264 @ 0x8515b0] Current profile doesn't provide more RBSP data in PPS, skipping
    [h264 @ 0x848a20] max_analyze_duration 5000000 reached at 5005000 microseconds st:0
    [h264 @ 0x848a20] After avformat_find_stream_info() pos: 3773440 bytes read:3801088 seeks:0 frames:152
    Input #0, h264, from 'orbi_0148.cam1.h264':
     Duration: N/A, bitrate: N/A
       Stream #0:0, 152, 1/1200000: Video: h264 (Main), yuv420p(tv), 1920x1080, 29.97 fps, 29.97 tbr, 1200k tbn, 59.94 tbc
    Successfully opened the file.
    Parsing a group of options: output url orbi_0148.cam1-1.mp4.

    Applying option c:v (codec name) with argument copy.
    Applying option an (disable audio) with argument 1.
    Applying option f (force format) with argument mp4.
    Successfully parsed a group of options.
    Opening an output file: orbi_0148.cam1-1.mp4.
    Successfully opened the file.
    [mp4 @ 0x8fb230] Codec for stream 0 does not use global headers but container format requires global headers
    Output #0, mp4, to 'orbi_0148.cam1-1.mp4':
     Metadata:
       encoder         : Lavf56.40.101
       Stream #0:0, 0, 1/1200000: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1920x1080, q=2-31, 29.97 fps, 29.97 tbr, 1200k tbn, 1200k tbc

    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    [NULL @ 0x8515b0] Current profile doesn't provide more RBSP data in PPS, skipping    
    No more output streams to write to, finishing.e=00:00:08.64 bitrate=5887.7kbits/s    
    frame=  270 fps= 30 q=-1.0 Lsize=    6443kB time=00:00:08.97 bitrate=5880.6kbits/s    
    video:6440kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.056839%
    Input file #0 (orbi_0148.cam1.h264):
     Input stream #0:0 (video): 270 packets read (6594052 bytes);
     Total: 270 packets (6594052 bytes) demuxed
    Output file #0 (orbi_0148.cam1-1.mp4):
     Output stream #0:0 (video): 270 packets muxed (6594052 bytes);
     Total: 270 packets (6594052 bytes) muxed
    0 frames successfully decoded, 0 decoding errors
    [AVIOContext @ 0x931650] Statistics: 34 seeks, 308 writeouts
    [AVIOContext @ 0x851190] Statistics: 6594052 bytes read, 0 seeks
  • How can ffmpeg be made as efficient as Android's built-in video viewer ?

    6 janvier 2016, par Nicholas

    I have a project based off of https://ikaruga2.wordpress.com/2011/06/15/video-live-wallpaper-part-1/, which uses an older copy of the ffmpeg libraries from http://bambuser.com/opensource. Within the C++ code in this project we have the following lines of code :

           unsigned long long current = GetCurrentTimeInNanoseconds();
           avcodec_decode_video(pCodecCtx, pFrame, &frameFinished, packet.data, packet.size);
           __android_log_print(ANDROID_LOG_DEBUG, "getFrame>>>>", "decode video time: %llu", (GetCurrentTimeInNanoseconds() - current)/1000000);

    This code continually reports between 60 and 90 ms to decode each frame on an Xperia Ion, using a 1280x720 h264 source video file. Other processing to get the frame out to the screen takes an average of 30ms more with very little variation. This leads to frame rates of 10-11fps.

    Ignoring that other processing, a decode that takes an average of 75ms would result in 13fps. However, when I browse my SD card and click on that mp4 file to open it in the native viewer, it shows at a full 30fps. Further, when I open a 1920x1080 version of the same mp4 in the native viewer it also runs at a full 30fps without stutter or lag. This implies (to my novice eye) that something is very very wrong, as the hardware is obviously capable of decoding many times faster.

    What flags or options can be passed to avcode_decode_video to optimize decode speed to match that of the native viewer ? Can optimizations be made elsewhere to optimize speed further ? Is there a reason that the native viewer can decode almost an order of magnitude faster (taking into account the 1920x1080 source results) ?

    EDIT

    The answer below is very helpful, but is not practical for me at this time. In the mean time I have managed to decrease decoding time by 70% with some optimal encoding flags found through many many hours of trial and error. Here are the ffmpeg arguments I’m using for encoding in case it helps anyone else who stumbles across this post :

           ffmpeg.exe -i "#inputFilePath#" -c:v libx264 -preset veryslow -g 2 -y -s 910x512 -b 5000k -minrate 2000k -maxrate 8000k -pix_fmt yuv420p -tune fastdecode -coder 0 -flags -loop -profile:v main -x264-params subme=5:ref=4 "#ouputFilePath#"

    With these settings ffmpeg is decoding frames in 20-25 seconds, though with the sws_scale and then writing out to the texture I’m still hovering at 22 FPS on an Xperia Ion at a lower resolution than I’d like.

  • How to parse ffmpeg -list_options output to get complete list of formats ?

    9 octobre 2024, par gaamaa

    On my Windows 10, application I use VB6 and ffmpeg.exe to capture video from USB capture device.
I need to show complete list of supported formats by this capture card.

    


    When I use below command I get some list.
But its looks incomplete for me.

    


    
    ffmpeg -f dshow -list_options true -i video="USB3. 0 capture"



    


    Result :

    


    USB3. 0 capture:
 Q:\FFMpeg VB6\f2>ffmpeg -f dshow -list_options true -i video="USB3. 0 capture"
[dshow @ 087d7480] DirectShow video device options (from video devices)
[dshow @ 087d7480]  Pin "Capture" (alternative pin name "0")
vcodec=mjpeg  min s=1920x1080 fps=10 max s=1920x1080 fps=60.0002
vcodec=mjpeg  min s=1920x1080 fps=10 max s=1920x1080 fps=60.0002
vcodec=mjpeg  min s=1600x1200 fps=10 max s=1600x1200 fps=60.0002
vcodec=mjpeg  min s=1600x1200 fps=10 max s=1600x1200 fps=60.0002
vcodec=mjpeg  min s=1360x768 fps=10 max s=1360x768 fps=60.0002
vcodec=mjpeg  min s=1360x768 fps=10 max s=1360x768 fps=60.0002
vcodec=mjpeg  min s=1280x1024 fps=10 max s=1280x1024 fps=60.0002
vcodec=mjpeg  min s=1280x1024 fps=10 max s=1280x1024 fps=60.0002
vcodec=mjpeg  min s=1280x960 fps=10 max s=1280x960 fps=60.0002
vcodec=mjpeg  min s=1280x960 fps=10 max s=1280x960 fps=60.0002
vcodec=mjpeg  min s=1280x720 fps=10 max s=1280x720 fps=60.0002
vcodec=mjpeg  min s=1280x720 fps=10 max s=1280x720 fps=60.0002
vcodec=mjpeg  min s=1024x768 fps=10 max s=1024x768 fps=60.0002
vcodec=mjpeg  min s=1024x768 fps=10 max s=1024x768 fps=60.0002
vcodec=mjpeg  min s=800x600 fps=10 max s=800x600 fps=60.0002
vcodec=mjpeg  min s=800x600 fps=10 max s=800x600 fps=60.0002
vcodec=mjpeg  min s=720x576 fps=10 max s=720x576 fps=60.0002
vcodec=mjpeg  min s=720x576 fps=10 max s=720x576 fps=60.0002
vcodec=mjpeg  min s=720x480 fps=10 max s=720x480 fps=60.0002
vcodec=mjpeg  min s=720x480 fps=10 max s=720x480 fps=60.0002
vcodec=mjpeg  min s=640x480 fps=10 max s=640x480 fps=60.0002
vcodec=mjpeg  min s=640x480 fps=10 max s=640x480 fps=60.0002
pixel_format=yuyv422  min s=1280x720 fps=10 max s=1280x720 fps=10
pixel_format=yuyv422  min s=1280x720 fps=10 max s=1280x720 fps=10
pixel_format=yuyv422  min s=1920x1080 fps=5 max s=1920x1080 fps=5
pixel_format=yuyv422  min s=1920x1080 fps=5 max s=1920x1080 fps=5
pixel_format=yuyv422  min s=1600x1200 fps=5 max s=1600x1200 fps=5
pixel_format=yuyv422  min s=1600x1200 fps=5 max s=1600x1200 fps=5
pixel_format=yuyv422  min s=1360x768 fps=8 max s=1360x768 fps=8
pixel_format=yuyv422  min s=1360x768 fps=8 max s=1360x768 fps=8
pixel_format=yuyv422  min s=1280x1024 fps=8 max s=1280x1024 fps=8
pixel_format=yuyv422  min s=1280x1024 fps=8 max s=1280x1024 fps=8
pixel_format=yuyv422  min s=1280x960 fps=8 max s=1280x960 fps=8
pixel_format=yuyv422  min s=1280x960 fps=8 max s=1280x960 fps= 8
pixel_format=yuyv422  min s=1024x768 fps=10 max s=1024x768 fps=10
pixel_format=yuyv422  min s=1024x768 fps=10 max s=1024x768 fps=10
pixel_format=yuyv422  min s=800x600 fps=5 max s=800x600 fps=20
pixel_format=yuyv422  min s=800x600 fps=5 max s=800x600 fps=20
pixel_format=yuyv422  min s=720x576 fps=5 max s=720x576 fps=25
pixel_format=yuyv422  min s=720x576 fps=5 max s=720x576 fps=25
pixel_format=yuyv422  min s=720x480 fps=5 max s=720x480 fps=30
pixel_format=yuyv422  min s=720x480 fps=5 max s=720x480 fps=30
pixel_format=yuyv422  min s=640x480 fps=5 max s=640x480 fps=30
pixel_format=yuyv422  min s=640x480 fps=5 max s=640x480 fps=30


    


    My question is :

    


    How to get the proper list in-between min and max ?

    


    Eg :
Please see the below 4 lines.

    


     vcodec=mjpeg  min s=1920x1080 fps=10 max s=1920x1080 fps=60.0002
 vcodec=mjpeg  min s=1920x1080 fps=10 max s=1920x1080 fps=60.0002
 vcodec=mjpeg  min s=1600x1200 fps=10 max s=1600x1200 fps=60.0002
 vcodec=mjpeg  min s=1600x1200 fps=10 max s=1600x1200 fps=60.0002


    


    It says
min fps=10
max fps=60.0002

    


    Actually it supports below fps :

    


    fps=10.00,
fps=20.00,
fps=25.00,
fps=30.00,
fps=50.00,
fps=60.00


    


    How to guess and get the hidden list like : 20, 25, 30 and 50 ?
If I blindly make a list from guessed values,
Some format doesn't have fps=25 on the list and ffmpeg throw error !

    


    Note :
I can not use C++ or .NET to dig further.
Please suggest me some trick to get the proper list from ffmpeg commands only.
Or any universal guess !

    


    enter image description here