Recherche avancée

Médias (3)

Mot : - Tags -/spip

Autres articles (22)

  • 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

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

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

Sur d’autres sites (7341)

  • ffmpeg output separate channel from an input with multiple channels

    11 octobre 2017, par tiras muturi

    i run this command to be able to stream a udp live stream to a http live stream that is playable using a mobile application that am building.
    its just a stream with audio streams only.

    ffmpeg -i udp ://@localhost:1111 -map 0:a http://localhost:8090/feed1.ffm

    Input #0, mpegts, from 'udp://@localhost:1111':
     Duration: N/A, start: 54616.264622, bitrate: 768 kb/s
     Program 1
       Metadata:
     service_name    : Service 1
     service_provider: TLK
       Stream #0:0[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
     Program 2
    Metadata:
     service_name    : Service 2
     service_provider: TLK
    Stream #0:1[0x111]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 3
    Metadata:
     service_name    : Service 3
     service_provider: TLK
    Stream #0:2[0x121]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 4
    Metadata:
     service_name    : Service 4
     service_provider: TLK
    Stream #0:3[0x131]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
     Program 5
    Metadata:
     service_name    : Service 5
     service_provider: TLK
    Stream #0:4[0x141]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
     Program 6
    Metadata:
     service_name    : Service 6
     service_provider: TLK
    Stream #0:5[0x151]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
     Program 7
    Metadata:
     service_name    : Service 7
     service_provider: TLK
    Stream #0:6[0x161]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 8
    Metadata:
     service_name    : Service 1
     service_provider: TLK
    Stream #0:7[0x171]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s

    i get this output

    Stream mapping:
     Stream #0:0 -> #0:0 (mp2 (native) -> mp2 (native))
     Stream #0:0 -> #0:1 (mp2 (native) -> mp2 (native))
    Press [q] to stop, [?] for help
    size=     100kB time=00:00:07.19 bitrate= 113.8kbits/s speed=3.01x
    video:0kB audio:84kB subtitle:0kB other streams:0kB global headers:0kB  muxing overhead: 18.358242%

    i really want a way i can be able to map every input stream to have an output stream that can be accessed separately from the other like maybe if i need the first stream maybe i will just

    ffplay http://localhost:8090/feed1.ffm

    and if i need the 7th stream i will just

    ffplay http://localhost:8090/feed7.ffm

    Please can someone help me crack this issue. FFmpeg dont have complex examples for my current situation.

    this is my header information

    ubuntu@ip-localhost:~$ \
    ffmpeg -i udp://@localhost:4000 \
     -map 0:a:0     http://localhost:8090/feed1.ffm
     -map 0:a:1 http://localhost:8090/feed2.ffm
     -map 0:a:2 http://localhost:8090/feed3.ffm
     -map 0:a:3 http://localhost:8090/feed4.ffm
     -map 0:a:4 http://localhost:8090/feed5.ffm
     -map 0:a:5 http://localhost:8090/feed6.ffm
     -map 0:a:6 http://localhost:8090/feed7.ffm
     -map 0:a:7 http://localhost:8090/feed8.ffm

    ffmpeg version 3.2.4-1 16.04.york0 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.1 (Ubuntu 5.4.1-5ubuntu2 16.04.york1) 20170210
    configuration : —prefix=/usr —extra-version=’1 16.04.york0’ — toolchain=hardened —libdir=/usr/lib/x86_64-linux-gnu —incdir=/usr/include/x86_64-linux-gnu —enable-gpl —disable-stripping —enable-avresample —enable-avisynth —enable-gnutls —enable-ladspa —enable-libass —enable-libbluray —enable-libbs2b —enable-libcaca —enable-libcdio —enable-libebur128 —enable-libflite —enable-libfontconfig —enable-libfreetype —enable-libfribidi —enable-libgme —enable-libgsm —enable-libmp3lame —enable-libopenjpeg —enable-libopenmpt —enable-libopus —enable-libpulse —enable-librubberband —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-libzmq —enable-libzvbi —enable-omx —enable-openal —enable-opengl —enable-sdl2 —enable-libdc1394 —enable-libiec61883 —enable-chromaprint —enable-frei0r —enable-libopencv —enable-libx264 —enable-shared
    libavutil 55. 34.101 / 55. 34.101
    libavcodec 57. 64.101 / 57. 64.101
    libavformat 57. 56.101 / 57. 56.101
    libavdevice 57. 1.100 / 57. 1.100
    libavfilter 6. 65.100 / 6. 65.100
    libavresample 3. 1. 0 / 3. 1. 0
    libswscale 4. 2.100 / 4. 2.100
    libswresample 2. 3.100 / 2. 3.100
    libpostproc 54. 1.100 / 54. 1.100

    Input #0, mpegts, from 'udp://@localhost:1111':
     Duration: N/A, start: 60047.944622, bitrate: 768 kb/s
     Program 1
       Metadata:
     service_name    : Service 1
     service_provider: TKL
    Stream #0:0[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 2
    Metadata:
     service_name    : Service 2
     service_provider: TKL
    Stream #0:1[0x111]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 3
    Metadata:
     service_name    : Service 3
     service_provider: TKL
    Stream #0:2[0x121]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 4
    Metadata:
     service_name    : Service 4
     service_provider: TKL
    Stream #0:3[0x131]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 5
    Metadata:
     service_name    : Service 5
     service_provider: TKL
    Stream #0:4[0x141]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 6
    Metadata:
     service_name    : Service 6
     service_provider: TKL
    Stream #0:5[0x151]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 7
    Metadata:
     service_name    : Service 7
     service_provider: TKL
    Stream #0:6[0x161]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 8
    Metadata:
     service_name    : Service 8
     service_provider: TKL
    Stream #0:7[0x171]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #0:0: Audio: mp2, 44100 Hz, mono, s16, 32 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Stream #0:1: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #1, ffm, to 'http://localhost:8090/feed2.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #1:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #2, ffm, to 'http://localhost:8090/feed3.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #2:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #3, ffm, to 'http://localhost:8090/feed4.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #3:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #4, ffm, to 'http://localhost:8090/feed5.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #4:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #5, ffm, to 'http://localhost:8090/feed6.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #5:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #6, ffm, to 'http://localhost:8090/feed7.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #6:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #7, ffm, to 'http://localhost:8090/feed8.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #7:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Stream mapping:
    Stream #0:0 -> #0:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #0:1 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #1:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #2:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #3:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #4:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #5:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #6:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #7:0 (mp2 (native) -> mp2 (native))
    Press [q] to stop, [?] for help

    thats my full console.

  • FFmpeg on Azure Function call running slowly and producing an empty output file

    7 novembre 2017, par The Lemon

    I’m trying to make a function which uses ffmpeg, so far I haven’t been able to get anything other than the -version command to work properly. When I try to run a simple ffmpeg -i {input file path} {output file path} command, the function seems to get stuck for 3-4 minutes (in the process creating an empty output file), then try again and produce the error ’file already exists’. I’ve tried switching between the 64 bit ffmpeg.exe and the 32 bit ffmpeg.exe with the function running as both a 32 and 64 bit function. My code and the associated logs from trying to run the code are included below, if anyone can tell me what I’m doing wrong or how to get the process to work it would be greatly appreciated. Thanks in advance, Cuan

    edit : The process works on kudu with the same files, the output is shown at the bottom. On kudu the process ran in under half a minute, clearly something is causing the function process to hang, if anyone has advice it would be greatly appreciated. Thanks again, Cuan.

    second edit : I tried adding the -y to the end of my command, this works in that it no longer complains about overwriting, but alas it now just hangs twice due to timeout. (output at the bottom)

    edit the third : azure has a way to let you run functions locally, my function ran into the same issues on the local version but : as it turns out the actual processing is done within a few seconds, it just takes forever to decide to write to a file - if you terminate the process manually after the process had been running for 10 seconds the file immediately gets written. Again, any help is appreciated. Cuan.

    Run.csx :

    using System.Net;
    using System;
    using System.Diagnostics;
    using System.ComponentModel;
    public static async Task<httpresponsemessage> Run(HttpRequestMessage req, TraceWriter log)
    {
       log.Info("C# HTTP trigger function processed a request.");
       Process process = new Process();
       process.StartInfo.FileName = @"D:\home\site\wwwroot\HttpTestFunction\ffmpeg64.exe";
       string tmp = String.Format("-i \"" + "Airdocs Background Video.mp4" + "\" \"" + "tmpOut2.mp4" + "\"");
       log.Info("ffmpeg argument is: "+tmp);
       process.StartInfo.Arguments = tmp;
       process.StartInfo.UseShellExecute = false;
       process.StartInfo.RedirectStandardOutput = true;
       process.StartInfo.RedirectStandardError = true;
       process.StartInfo.WorkingDirectory = @"D:\home\site\wwwroot\HttpTestFunction";
       process.Start();
       log.Info("process started");
       string output = process.StandardOutput.ReadToEnd();
       string err = process.StandardError.ReadToEnd();
       log.Info("output:" + output);
       log.Info("error:"+err);
       process.WaitForExit();
    }
    </httpresponsemessage>

    Logs :

    2017-10-14T02:17:10.514 Function started (Id=e4ec7d1e-2bcb-4b74-8af2-15124f1576fb)
    2017-10-14T02:17:10.639 C# HTTP trigger function processed a request.
    2017-10-14T02:17:10.639 ffmpeg argument is: -i "Airdocs Background Video.mp4" "tmpOut2.mp4"
    2017-10-14T02:17:10.779 process started
    2017-10-14T02:18:15  No new trace in the past 1 min(s).
    2017-10-14T02:19:15  No new trace in the past 2 min(s).
    2017-10-14T02:20:15  No new trace in the past 3 min(s).
    2017-10-14T02:21:02.188 Function started (Id=b2ae9b59-8933-42e3-986c-fd26a6886285)
    2017-10-14T02:21:02.188 C# HTTP trigger function processed a request.
    2017-10-14T02:21:02.188 ffmpeg argument is: -i "Airdocs Background Video.mp4" "tmpOut2.mp4"
    2017-10-14T02:21:02.252 process started
    2017-10-14T02:21:02.377 output:
    2017-10-14T02:21:02.377 error:ffmpeg version N-87353-g183fd30 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 7.2.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib
     libavutil      55. 76.100 / 55. 76.100
     libavcodec     57.106.101 / 57.106.101
     libavformat    57. 82.101 / 57. 82.101
     libavdevice    57.  8.101 / 57.  8.101
     libavfilter     6.105.100 /  6.105.100
     libswscale      4.  7.103 /  4.  7.103
     libswresample   2.  8.100 /  2.  8.100
     libpostproc    54.  6.100 / 54.  6.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Airdocs Background Video.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp41isom
       creation_time   : 2017-09-08T11:55:11.000000Z
     Duration: 00:00:24.02, start: 0.000000, bitrate: 105 kb/s
       Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 104 kb/s, 30.30 fps, 30.30 tbr, 30k tbn, 60 tbc (default)
       Metadata:
         creation_time   : 2017-09-08T11:55:11.000000Z
         handler_name    : VideoHandler
         encoder         : AVC Coding
    File 'tmpOut2.mp4' already exists. Overwrite ? [y/N] Not overwriting - exiting
    2017-10-14T02:21:02.392 Function completed (Success, Id=b2ae9b59-8933-42e3-986c-fd26a6886285, Duration=205ms)
    2017-10-14T02:22:10.563 Function completed (Failure, Id=e4ec7d1e-2bcb-4b74-8af2-15124f1576fb, Duration=300047ms)
    2017-10-14T02:22:10.610 Microsoft.Azure.WebJobs.Host: Timeout value of 00:05:00 was exceeded by function: Functions.HttpTestFunction.

    Kudu code (just running the ffmpeg command directly, not the run.csx file) :

    D:\home\site\wwwroot\HttpTestFunction>ffmpeg -i "Airdocs Background Video.mp4" tmpout3.mp4


    ffmpeg version N-87196-g6cadbb1 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 7.1.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
     libavutil      55. 74.100 / 55. 74.100
     libavcodec     57.105.100 / 57.105.100
     libavformat    57. 81.100 / 57. 81.100
     libavdevice    57.  8.100 / 57.  8.100
     libavfilter     6.101.100 /  6.101.100
     libswscale      4.  7.103 /  4.  7.103
     libswresample   2.  8.100 /  2.  8.100
     libpostproc    54.  6.100 / 54.  6.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Airdocs Background Video.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp41isom
       creation_time   : 2017-09-08T11:55:11.000000Z
     Duration: 00:00:24.02, start: 0.000000, bitrate: 105 kb/s
       Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 104 kb/s, 30.30 fps, 30.30 tbr, 30k tbn, 60 tbc (default)
       Metadata:
         creation_time   : 2017-09-08T11:55:11.000000Z
         handler_name    : VideoHandler
         encoder         : AVC Coding
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    [libx264 @ 00000000005fc5a0] using SAR=1/1
    [libx264 @ 00000000005fc5a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 00000000005fc5a0] profile High, level 3.2
    [libx264 @ 00000000005fc5a0] 264 - core 152 r2851 ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'tmpout3.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp41isom
       encoder         : Lavf57.81.100
       Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 30.30 fps, 16k tbn, 30.30 tbc (default)
       Metadata:
         creation_time   : 2017-09-08T11:55:11.000000Z
         handler_name    : VideoHandler
         encoder         : Lavc57.105.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    frame=  728 fps= 39 q=29.0 Lsize=      62kB time=00:00:23.92 bitrate=  21.1kbits/s speed=1.28x    
    video:52kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 17.915474%
    [libx264 @ 00000000005fc5a0] frame I:4     Avg QP:12.46  size:  6102
    [libx264 @ 00000000005fc5a0] frame P:184   Avg QP:16.94  size:    45
    [libx264 @ 00000000005fc5a0] frame B:540   Avg QP:20.50  size:    37
    [libx264 @ 00000000005fc5a0] consecutive B-frames:  1.1%  0.0%  0.0% 98.9%
    [libx264 @ 00000000005fc5a0] mb I  I16..4: 66.3% 30.4%  3.3%
    [libx264 @ 00000000005fc5a0] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.0%  0.0%  0.0%  0.0%  0.0%    skip:100.0%
    [libx264 @ 00000000005fc5a0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.0%  0.0%  0.0%  direct: 0.0%  skip:100.0%  L0:12.3% L1:87.7% BI: 0.0%
    [libx264 @ 00000000005fc5a0] 8x8 transform intra:30.5% inter:14.3%
    [libx264 @ 00000000005fc5a0] coded y,uvDC,uvAC intra: 2.3% 2.2% 2.1% inter: 0.0% 0.0% 0.0%
    [libx264 @ 00000000005fc5a0] i16 v,h,dc,p: 93%  6%  2%  0%
    [libx264 @ 00000000005fc5a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 41% 31%  0%  0%  0%  0%  0%  0%
    [libx264 @ 00000000005fc5a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 39% 17% 16%  5%  4%  5%  6%  3%  5%
    [libx264 @ 00000000005fc5a0] i8c dc,h,v,p: 93%  6%  1%  0%
    [libx264 @ 00000000005fc5a0] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 00000000005fc5a0] ref B L1: 98.2%  1.8%
    [libx264 @ 00000000005fc5a0] kb/s:17.57



    D:\home\site\wwwroot\HttpTestFunction>

    Output on azure with the -y command

    2017-10-25T04:34:45.519 Compilation succeeded.
    2017-10-25T04:34:46.160 Function started (Id=18880991-c93a-42a3-96b6-7df283e3bdb4)
    2017-10-25T04:34:46.300 C# HTTP trigger function processed a request.
    2017-10-25T04:34:46.300 ffmpeg argument is: -i "Airdocs Background Video.mp4" "tmpOut2.mp4" -y
    2017-10-25T04:34:46.394 process started
    2017-10-25T04:36:46  No new trace in the past 1 min(s).
    2017-10-25T04:37:46  No new trace in the past 2 min(s).
    2017-10-25T04:38:37.947 Function started (Id=c7f7f768-c53b-4074-a0c2-8391848bbd80)
    2017-10-25T04:38:37.963 C# HTTP trigger function processed a request.
    2017-10-25T04:38:37.963 ffmpeg argument is: -i "Airdocs Background Video.mp4" "tmpOut2.mp4" -y
    2017-10-25T04:38:38.025 process started
    2017-10-25T04:39:46  No new trace in the past 1 min(s).
    2017-10-25T04:39:46.258 Function completed (Failure, Id=18880991-c93a-42a3-96b6-7df283e3bdb4, Duration=300079ms)
    2017-10-25T04:39:46.321 Microsoft.Azure.WebJobs.Host: Timeout value of 00:05:00 was exceeded by function: Functions.HttpTestFunction.
  • What flags should enable to get maximum performance using ffpeg ?

    19 octobre 2017, par Sam

    I am using windows, my application is using opencv and for codecs, we have used ffmpeg. We see the performance is very slow, we want to improve it by compiling ffmpeg with all flags which could take hardware and GPU acceleation into consideration.
    I did ./configure --help inside the ffmpeg source, I see below list option, can you please tell which all can really imporve the performance. Note that we would like to take advantage of hardware and gpu capabilities.

    $ ./configure —help
    Usage : configure [options]
    Options : [defaults in brackets after descriptions]

    Help options :
    —help print this message
    —quiet Suppress showing informative output
    —list-decoders show all available decoders
    —list-encoders show all available encoders
    —list-hwaccels show all available hardware accelerators
    —list-demuxers show all available demuxers
    —list-muxers show all available muxers
    —list-parsers show all available parsers
    —list-protocols show all available protocols
    —list-bsfs show all available bitstream filters
    —list-indevs show all available input devices
    —list-outdevs show all available output devices
    —list-filters show all available filters

    Standard options :
    —logfile=FILE log tests and output to FILE [ffbuild/config.log]
    —disable-logging do not log configure debug information
    —fatal-warnings fail if any configure warning is generated
    —prefix=PREFIX install in PREFIX [/usr/local]
    —bindir=DIR install binaries in DIR [PREFIX/bin]
    —datadir=DIR install data files in DIR [PREFIX/share/ffmpeg]
    —docdir=DIR install documentation in DIR [PREFIX/share/doc/ffmpeg ]
    —libdir=DIR install libs in DIR [PREFIX/lib]
    —shlibdir=DIR install shared libs in DIR [LIBDIR]
    —incdir=DIR install includes in DIR [PREFIX/include]
    —mandir=DIR install man page in DIR [PREFIX/share/man]
    —pkgconfigdir=DIR install pkg-config files in DIR [LIBDIR/pkgconfig]
    —enable-rpath use rpath to allow installing libraries in paths
    not part of the dynamic linker search path
    use rpath when linking programs (USE WITH CARE)
    —install-name-dir=DIR Darwin directory name for installed targets

    Licensing options :
    —enable-gpl allow use of GPL code, the resulting libs
    and binaries will be under GPL [no]
    —enable-version3 upgrade (L)GPL to version 3 [no]
    —enable-nonfree allow use of nonfree code, the resulting libs
    and binaries will be unredistributable [no]

    Configuration options :
    —disable-static do not build static libraries [no]
    —enable-shared build shared libraries [no]
    —enable-small optimize for size instead of speed
    —disable-runtime-cpudetect disable detecting CPU capabilities at runtime (sma ller binary)
    —enable-gray enable full grayscale support (slower color)
    —disable-swscale-alpha disable alpha channel support in swscale
    —disable-all disable building components, libraries and programs
    —disable-autodetect disable automatically detected external libraries [no ]

    Program options :
    —disable-programs do not build command line programs
    —disable-ffmpeg disable ffmpeg build
    —disable-ffplay disable ffplay build
    —disable-ffprobe disable ffprobe build
    —disable-ffserver disable ffserver build

    Documentation options :
    —disable-doc do not build documentation
    —disable-htmlpages do not build HTML documentation pages
    —disable-manpages do not build man documentation pages
    —disable-podpages do not build POD documentation pages
    —disable-txtpages do not build text documentation pages

    Component options :
    —disable-avdevice disable libavdevice build
    —disable-avcodec disable libavcodec build
    —disable-avformat disable libavformat build
    —disable-swresample disable libswresample build
    —disable-swscale disable libswscale build
    —disable-postproc disable libpostproc build
    —disable-avfilter disable libavfilter build
    —enable-avresample enable libavresample build [no]
    —disable-pthreads disable pthreads [autodetect]
    —disable-w32threads disable Win32 threads [autodetect]
    —disable-os2threads disable OS/2 threads [autodetect]
    —disable-network disable network support [no]
    —disable-dct disable DCT code
    —disable-dwt disable DWT code
    —disable-error-resilience disable error resilience code
    —disable-lsp disable LSP code
    —disable-lzo disable LZO decoder code
    —disable-mdct disable MDCT code
    —disable-rdft disable RDFT code
    —disable-fft disable FFT code
    —disable-faan disable floating point AAN (I)DCT code
    —disable-pixelutils disable pixel utils in libavutil

    Individual component options :
    —disable-everything disable all components listed below
    —disable-encoder=NAME disable encoder NAME
    —enable-encoder=NAME enable encoder NAME
    —disable-encoders disable all encoders
    —disable-decoder=NAME disable decoder NAME
    —enable-decoder=NAME enable decoder NAME
    —disable-decoders disable all decoders
    —disable-hwaccel=NAME disable hwaccel NAME
    —enable-hwaccel=NAME enable hwaccel NAME
    —disable-hwaccels disable all hwaccels
    —disable-muxer=NAME disable muxer NAME
    —enable-muxer=NAME enable muxer NAME
    —disable-muxers disable all muxers
    —disable-demuxer=NAME disable demuxer NAME
    —enable-demuxer=NAME enable demuxer NAME
    —disable-demuxers disable all demuxers
    —enable-parser=NAME enable parser NAME
    —disable-parser=NAME disable parser NAME
    —disable-parsers disable all parsers
    —enable-bsf=NAME enable bitstream filter NAME
    —disable-bsf=NAME disable bitstream filter NAME
    —disable-bsfs disable all bitstream filters
    —enable-protocol=NAME enable protocol NAME
    —disable-protocol=NAME disable protocol NAME
    —disable-protocols disable all protocols
    —enable-indev=NAME enable input device NAME
    —disable-indev=NAME disable input device NAME
    —disable-indevs disable input devices
    —enable-outdev=NAME enable output device NAME
    —disable-outdev=NAME disable output device NAME
    —disable-outdevs disable output devices
    —disable-devices disable all devices
    —enable-filter=NAME enable filter NAME
    —disable-filter=NAME disable filter NAME
    —disable-filters disable all filters
    —disable-v4l2_m2m disable V4L2 mem2mem code [autodetect]

    External library support :

    Using any of the following switches will allow FFmpeg to link to the
    corresponding external library. All the components depending on that library
    will become enabled, if all their other dependencies are met and they are not
    explicitly disabled. E.g. —enable-libwavpack will enable linking to
    libwavpack and allow the libwavpack encoder to be built, unless it is
    specifically disabled with —disable-encoder=libwavpack.

    Note that only the system libraries are auto-detected. All the other external
    libraries must be explicitly enabled.

    Also note that the following help text describes the purpose of the libraries
    themselves, not all their features will necessarily be usable by FFmpeg.

    —disable-alsa disable ALSA support [autodetect]
    —disable-appkit disable Apple AppKit framework [autodetect]
    —disable-avfoundation disable Apple AVFoundation framework [autodetect]
    —enable-avisynth enable reading of AviSynth script files [no]
    —disable-bzlib disable bzlib [autodetect]
    —disable-coreimage disable Apple CoreImage framework [autodetect]
    —enable-chromaprint enable audio fingerprinting with chromaprint [no]
    —enable-frei0r enable frei0r video filtering [no]
    —enable-gcrypt enable gcrypt, needed for rtmp(t)e support
    if openssl, librtmp or gmp is not used [no]
    —enable-gmp enable gmp, needed for rtmp(t)e support
    if openssl or librtmp is not used [no]
    —enable-gnutls enable gnutls, needed for https support
    if openssl is not used [no]
    —disable-iconv disable iconv [autodetect]
    —disable-jack disable libjack support [autodetect]
    —enable-jni enable JNI support [no]
    —enable-ladspa enable LADSPA audio filtering [no]
    —enable-libass enable libass subtitles rendering,
    needed for subtitles and ass filter [no]
    —enable-libbluray enable BluRay reading using libbluray [no]
    —enable-libbs2b enable bs2b DSP library [no]
    —enable-libcaca enable textual display using libcaca [no]
    —enable-libcelt enable CELT decoding via libcelt [no]
    —enable-libcdio enable audio CD grabbing with libcdio [no]
    —enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
    and libraw1394 [no]
    —enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
    —enable-libflite enable flite (voice synthesis) support via libflite [ no]
    —enable-libfontconfig enable libfontconfig, useful for drawtext filter [no]
    —enable-libfreetype enable libfreetype, needed for drawtext filter [no]
    —enable-libfribidi enable libfribidi, improves drawtext filter [no]
    —enable-libgme enable Game Music Emu via libgme [no]
    —enable-libgsm enable GSM de/encoding via libgsm [no]
    —enable-libiec61883 enable iec61883 via libiec61883 [no]
    —enable-libilbc enable iLBC de/encoding via libilbc [no]
    —enable-libkvazaar enable HEVC encoding via libkvazaar [no]
    —enable-libmodplug enable ModPlug via libmodplug [no]
    —enable-libmp3lame enable MP3 encoding via libmp3lame [no]
    —enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no ]
    —enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
    —enable-libopencv enable video filtering via libopencv [no]
    —enable-libopenh264 enable H.264 encoding via OpenH264 [no]
    —enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no]
    —enable-libopenmpt enable decoding tracked files via libopenmpt [no]
    —enable-libopus enable Opus de/encoding via libopus [no]
    —enable-libpulse enable Pulseaudio input via libpulse [no]
    —enable-librsvg enable SVG rasterization via librsvg [no]
    —enable-librubberband enable rubberband needed for rubberband filter [no]
    —enable-librtmp enable RTMP[E] support via librtmp [no]
    —enable-libshine enable fixed-point MP3 encoding via libshine [no]
    —enable-libsmbclient enable Samba protocol via libsmbclient [no]
    —enable-libsnappy enable Snappy compression, needed for hap encoding [n o]
    —enable-libsoxr enable Include libsoxr resampling [no]
    —enable-libspeex enable Speex de/encoding via libspeex [no]
    —enable-libssh enable SFTP protocol via libssh [no]
    —enable-libtesseract enable Tesseract, needed for ocr filter [no]
    —enable-libtheora enable Theora encoding via libtheora [no]
    —enable-libtwolame enable MP2 encoding via libtwolame [no]
    —enable-libv4l2 enable libv4l2/v4l-utils [no]
    —enable-libvidstab enable video stabilization using vid.stab [no]
    —enable-libvmaf enable vmaf filter via libvmaf [no]
    —enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no]
    —enable-libvorbis enable Vorbis en/decoding via libvorbis,
    native implementation exists [no]
    —enable-libvpx enable VP8 and VP9 de/encoding via libvpx [no]
    —enable-libwavpack enable wavpack encoding via libwavpack [no]
    —enable-libwebp enable WebP encoding via libwebp [no]
    —enable-libx264 enable H.264 encoding via x264 [no]
    —enable-libx265 enable HEVC encoding via x265 [no]
    —enable-libxavs enable AVS encoding via xavs [no]
    —enable-libxcb enable X11 grabbing using XCB [autodetect]
    —enable-libxcb-shm enable X11 grabbing shm communication [autodetect]
    —enable-libxcb-xfixes enable X11 grabbing mouse rendering [autodetect]
    —enable-libxcb-shape enable X11 grabbing shape rendering [autodetect]
    —enable-libxvid enable Xvid encoding via xvidcore,
    native MPEG-4/Xvid encoder exists [no]
    —enable-libxml2 enable XML parsing using the C library libxml2 [no]
    —enable-libzimg enable z.lib, needed for zscale filter [no]
    —enable-libzmq enable message passing via libzmq [no]
    —enable-libzvbi enable teletext support via libzvbi [no]
    —disable-lzma disable lzma [autodetect]
    —enable-decklink enable Blackmagic DeckLink I/O support [no]
    —enable-libndi_newtek enable Newteck NDI I/O support [no]
    —enable-mediacodec enable Android MediaCodec support [no]
    —enable-libmysofa enable libmysofa, needed for sofalizer filter [no]
    —enable-openal enable OpenAL 1.1 capture support [no]
    —enable-opencl enable OpenCL code
    —enable-opengl enable OpenGL rendering [no]
    —enable-openssl enable openssl, needed for https support
    if gnutls is not used [no]
    —disable-sndio disable sndio support [autodetect]
    —disable-schannel disable SChannel SSP, needed for TLS support on
    Windows if openssl and gnutls are not used [autodetec t]
    —disable-sdl2 disable sdl2 [autodetect]
    —disable-securetransport disable Secure Transport, needed for TLS support
    on OSX if openssl and gnutls are not used [autodetect ]
    —disable-xlib disable xlib [autodetect]
    —disable-zlib disable zlib [autodetect]

    The following libraries provide various hardware acceleration features :
    —disable-audiotoolbox disable Apple AudioToolbox code [autodetect]
    —disable-cuda disable dynamically linked Nvidia CUDA code [autodete ct]
    —enable-cuda-sdk enable CUDA features that require the CUDA SDK [no]
    —disable-cuvid disable Nvidia CUVID support [autodetect]
    —disable-d3d11va disable Microsoft Direct3D 11 video acceleration code [autodetect]
    —disable-dxva2 disable Microsoft DirectX 9 video acceleration code [ autodetect]
    —enable-libdrm enable DRM code (Linux) [no]
    —enable-libmfx enable Intel MediaSDK (AKA Quick Sync Video) code via libmfx [no]
    —enable-libnpp enable Nvidia Performance Primitives-based code [no]
    —enable-mmal enable Broadcom Multi-Media Abstraction Layer (Raspbe rry Pi) via MMAL [no]
    —disable-nvenc disable Nvidia video encoding code [autodetect]
    —enable-omx enable OpenMAX IL code [no]
    —enable-omx-rpi enable OpenMAX IL code for Raspberry Pi [no]
    —enable-rkmpp enable Rockchip Media Process Platform code [no]
    —disable-vaapi disable Video Acceleration API (mainly Unix/Intel) co de [autodetect]
    —disable-vda disable Apple Video Decode Acceleration code [autodet ect]
    —disable-vdpau disable Nvidia Video Decode and Presentation API for Unix code [autodetect]
    —disable-videotoolbox disable VideoToolbox code [autodetect]

    Toolchain options :
    —arch=ARCH select architecture []
    —cpu=CPU select the minimum required CPU (affects
    instruction selection, may crash on older CPUs)
    —cross-prefix=PREFIX use PREFIX for compilation tools []
    —progs-suffix=SUFFIX program name suffix []
    —enable-cross-compile assume a cross-compiler is used
    —sysroot=PATH root of cross-build tree
    —sysinclude=PATH location of cross-build system headers
    —target-os=OS compiler targets OS []
    —target-exec=CMD command to run executables on target
    —target-path=DIR path to view of build directory on target
    —target-samples=DIR path to samples directory on target
    —tempprefix=PATH force fixed dir/prefix instead of mktemp for checks
    —toolchain=NAME set tool defaults according to NAME
    —nm=NM use nm tool NM [nm -g]
    —ar=AR use archive tool AR [ar]
    —as=AS use assembler AS []
    —ln_s=LN_S use symbolic link tool LN_S [ln -s -f]
    —strip=STRIP use strip tool STRIP [strip]
    —windres=WINDRES use windows resource compiler WINDRES [windres]
    —x86asmexe=EXE use nasm-compatible assembler EXE [nasm]
    —cc=CC use C compiler CC [gcc]
    —cxx=CXX use C compiler CXX [g++]
    —objcc=OCC use ObjC compiler OCC [gcc]
    —dep-cc=DEPCC use dependency generator DEPCC [gcc]
    —nvcc=NVCC use Nvidia CUDA compiler NVCC [nvcc]
    —ld=LD use linker LD []
    —pkg-config=PKGCONFIG use pkg-config tool PKGCONFIG [pkg-config]
    —pkg-config-flags=FLAGS pass additional flags to pkgconf []
    —ranlib=RANLIB use ranlib RANLIB [ranlib]
    —doxygen=DOXYGEN use DOXYGEN to generate API doc [doxygen]
    —host-cc=HOSTCC use host C compiler HOSTCC
    —host-cflags=HCFLAGS use HCFLAGS when compiling for host
    —host-cppflags=HCPPFLAGS use HCPPFLAGS when compiling for host
    —host-ld=HOSTLD use host linker HOSTLD
    —host-ldflags=HLDFLAGS use HLDFLAGS when linking for host
    —host-libs=HLIBS use libs HLIBS when linking for host
    —host-os=OS compiler host OS []
    —extra-cflags=ECFLAGS add ECFLAGS to CFLAGS []
    —extra-cxxflags=ECFLAGS add ECFLAGS to CXXFLAGS []
    —extra-objcflags=FLAGS add FLAGS to OBJCFLAGS []
    —extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS []
    —extra-ldexeflags=ELDFLAGS add ELDFLAGS to LDEXEFLAGS []
    —extra-ldlibflags=ELDFLAGS add ELDFLAGS to LDLIBFLAGS []
    —extra-libs=ELIBS add ELIBS []
    —extra-version=STRING version string suffix []
    —optflags=OPTFLAGS override optimization-related compiler flags
    —nvccflags=NVCCFLAGS override nvcc flags [-gencode arch=compute_30,code=sm _30 -O2]
    —build-suffix=SUFFIX library name suffix []
    —enable-pic build position-independent code
    —enable-thumb compile for Thumb instruction set
    —enable-lto use link-time optimization
    —env="ENV=override" override the environment variables

    Advanced options (experts only) :
    —malloc-prefix=PREFIX prefix malloc and related names with PREFIX
    —custom-allocator=NAME use a supported custom allocator
    —disable-symver disable symbol versioning
    —enable-hardcoded-tables use hardcoded tables instead of runtime generation
    —disable-safe-bitstream-reader
    disable buffer boundary checking in bitreaders
    (faster, but may crash)
    —sws-max-filter-size=N the max filter size swscale uses [256]

    Optimization options (experts only) :
    —disable-asm disable all assembly optimizations
    —disable-altivec disable AltiVec optimizations
    —disable-vsx disable VSX optimizations
    —disable-power8 disable POWER8 optimizations
    —disable-amd3dnow disable 3DNow ! optimizations
    —disable-amd3dnowext disable 3DNow ! extended optimizations
    —disable-mmx disable MMX optimizations
    —disable-mmxext disable MMXEXT optimizations
    —disable-sse disable SSE optimizations
    —disable-sse2 disable SSE2 optimizations
    —disable-sse3 disable SSE3 optimizations
    —disable-ssse3 disable SSSE3 optimizations
    —disable-sse4 disable SSE4 optimizations
    —disable-sse42 disable SSE4.2 optimizations
    —disable-avx disable AVX optimizations
    —disable-xop disable XOP optimizations
    —disable-fma3 disable FMA3 optimizations
    —disable-fma4 disable FMA4 optimizations
    —disable-avx2 disable AVX2 optimizations
    —disable-aesni disable AESNI optimizations
    —disable-armv5te disable armv5te optimizations
    —disable-armv6 disable armv6 optimizations
    —disable-armv6t2 disable armv6t2 optimizations
    —disable-vfp disable VFP optimizations
    —disable-neon disable NEON optimizations
    —disable-inline-asm disable use of inline assembly
    —disable-x86asm disable use of standalone x86 assembly
    —disable-mipsdsp disable MIPS DSP ASE R1 optimizations
    —disable-mipsdspr2 disable MIPS DSP ASE R2 optimizations
    —disable-msa disable MSA optimizations
    —disable-mipsfpu disable floating point MIPS optimizations
    —disable-mmi disable Loongson SIMD optimizations
    —disable-fast-unaligned consider unaligned accesses slow

    Developer options (useful when working on FFmpeg itself) :
    —disable-debug disable debugging symbols
    —enable-debug=LEVEL set the debug level []
    —disable-optimizations disable compiler optimizations
    —enable-extra-warnings enable more compiler warnings
    —disable-stripping disable stripping of executables and shared libraries
    —assert-level=level 0(default), 1 or 2, amount of assertion testing,
    2 causes a slowdown at runtime.
    —enable-memory-poisoning fill heap uninitialized allocated space with arbitra ry data
    —valgrind=VALGRIND run "make fate" tests through valgrind to detect memo ry
    leaks and errors, using the specified valgrind binary .
    Cannot be combined with —target-exec
    —enable-ftrapv Trap arithmetic overflows
    —samples=PATH location of test samples for FATE, if not set use
    $FATE_SAMPLES at make invocation time.
    —enable-neon-clobber-test check NEON registers for clobbering (should be
    used only for debugging purposes)
    —enable-xmm-clobber-test check XMM registers for clobbering (Win64-only ;
    should be used only for debugging purposes)
    —enable-random randomly enable/disable components
    —disable-random
    —enable-random=LIST randomly enable/disable specific components or
    —disable-random=LIST component groups. LIST is a comma-separated list
    of NAME[:PROB] entries where NAME is a component
    (group) and PROB the probability associated with
    NAME (default 0.5).
    —random-seed=VALUE seed value for —enable/disable-random
    —disable-valgrind-backtrace do not print a backtrace under Valgrind
    (only applies to —disable-optimizations builds)
    —enable-osfuzz Enable building fuzzer tool
    —libfuzzer=PATH path to libfuzzer
    —ignore-tests=TESTS comma-separated list (without "fate-" prefix
    in the name) of tests whose result is ignored
    —enable-linux-perf enable Linux Performance Monitor API

    NOTE : Object files are built at the place where configure is launched.