Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (31)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

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

  • Quick stream from file which exists

    4 mai 2017, par parsa

    I implement live streaming from mp4 video file which exists on the path with ffmpeg under hls format.
    When my video file have the quality greater than hd720 , in encoding there are so many delays for creating .ts fragments.
    I mean the .ts fragments slowly produced on my path,and because of it I have so many delays in showing the stream.
    Here is my ffmpeg code for streaming :

    ffmpeg -re -i 123.mp4 -s cga -f hls -hls_list_size 0 -c:v libx264 -c:a aac 200p/out.m3u8
                 -s nhd -f hls -hls_list_size 0 -c:v libx264 -c:a aac 360p/out.m3u8
                 -s hd480 -f hls -hls_list_size 0 -c:v libx264 -c:a aac 480p/out.m3u8
                 -s hd720 -f hls -hls_list_size 0 -c:v libx264 -c:a aac 720p/out.m3u8
                 -s hd1080 -f hls -hls_list_size 0 -c:v libx264 -c:a aac 1080p/out.m3u8

    And here is the console output :

       ffmpeg -re -i ../files/412-887123464/video/412-887123464.mp4 -s cga -f hls -hls_list_size 0 -c:v libx264 -c:a aac ../fil
           es/412-887123464/video/200p/out.m3u8  -s nhd -f hls -hls_list_size 0 -c:v libx264 -c:a aac ../files/412-887123464/video/360p/out.m3u8 -s hd480 -f hls -
           hls_list_size 0 -c:v libx264 -c:a aac ../files/412-887123464/video/480p/out.m3u8 -s hd720 -f hls -hls_list_size 0 -c:v libx264 -c:a aac ../files/412-88
           7123464/video/720p/out.m3u8 -s hd1080 -f hls -hls_list_size 0 -c:v libx264 -c:a aac ../files/412-887123464/video/1080p/out.m3u8
           ffmpeg version N-82225-gb4e9252 Copyright (c) 2000-2016 the FFmpeg developers
             built with gcc 5.4.0 (GCC)
             configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --e
           nable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcac
           a --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-lib
           opencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr
            --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwa
           vpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zl
           ib
             libavutil      55. 35.100 / 55. 35.100
             libavcodec     57. 66.101 / 57. 66.101
             libavformat    57. 57.100 / 57. 57.100
             libavdevice    57.  2.100 / 57.  2.100
             libavfilter     6. 66.100 /  6. 66.100
             libswscale      4.  3.100 /  4.  3.100
             libswresample   2.  4.100 /  2.  4.100
             libpostproc    54.  2.100 / 54.  2.100
           Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../files/412-887123464/video/412-887123464.mp4':
             Metadata:
               major_brand     : isom
               minor_version   : 512
               compatible_brands: isomiso2avc1mp41
               encoder         : Lavf57.31.100
             Duration: 00:05:04.07, start: 0.000000, bitrate: 3108 kb/s
               Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 2976 kb/s, 25 fps, 25 tbr, 90k tbn, 50
           tbc (default)
               Metadata:
                 handler_name    : VideoHandler
               Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
               Metadata:
                 handler_name    : SoundHandler
           [libx264 @ 0000000001c53f00] using SAR=10/9
           [libx264 @ 0000000001c53f00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
           [libx264 @ 0000000001c53f00] profile High, level 1.3
           Output #0, hls, to '../files/412-887123464/video/200p/out.m3u8':
             Metadata:
               major_brand     : isom
               minor_version   : 512
               compatible_brands: isomiso2avc1mp41
               encoder         : Lavf57.57.100
               Stream #0:0(und): Video: h264 (libx264), yuv420p, 320x200 [SAR 10:9 DAR 16:9], q=-1--1, 25 fps, 90k tbn, 25 tbc (default)
               Metadata:
                 handler_name    : VideoHandler
                 encoder         : Lavc57.66.101 libx264
               Side data:
                 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
               Stream #0:1(und): Audio: aac (LC), 44100 Hz, stereo, fltp, 128 kb/s (default)
               Metadata:
                 handler_name    : SoundHandler
                 encoder         : Lavc57.66.101 aac
           [libx264 @ 0000000001f87180] using SAR=1/1
           [libx264 @ 0000000001f87180] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
           [libx264 @ 0000000001f87180] profile High, level 3.0
           Output #1, hls, to '../files/412-887123464/video/360p/out.m3u8':
             Metadata:
               major_brand     : isom
               minor_version   : 512
               compatible_brands: isomiso2avc1mp41
               encoder         : Lavf57.57.100
               Stream #1:0(und): Video: h264 (libx264), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 90k tbn, 25 tbc (default)
               Metadata:
                 handler_name    : VideoHandler
                 encoder         : Lavc57.66.101 libx264
               Side data:
                 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
               Stream #1:1(und): Audio: aac (LC), 44100 Hz, stereo, fltp, 128 kb/s (default)
               Metadata:
                 handler_name    : SoundHandler
                 encoder         : Lavc57.66.101 aac
           [libx264 @ 0000000001c55ba0] using SAR=640/639
           [libx264 @ 0000000001c55ba0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
           [libx264 @ 0000000001c55ba0] profile High, level 3.0
           Output #2, hls, to '../files/412-887123464/video/480p/out.m3u8':
             Metadata:
               major_brand     : isom
               minor_version   : 512
               compatible_brands: isomiso2avc1mp41
               encoder         : Lavf57.57.100
               Stream #2:0(und): Video: h264 (libx264), yuv420p, 852x480 [SAR 640:639 DAR 16:9], q=-1--1, 25 fps, 90k tbn, 25 tbc (default)
               Metadata:
                 handler_name    : VideoHandler
                 encoder         : Lavc57.66.101 libx264
               Side data:
                 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
               Stream #2:1(und): Audio: aac (LC), 44100 Hz, stereo, fltp, 128 kb/s (default)
               Metadata:
                 handler_name    : SoundHandler
                 encoder         : Lavc57.66.101 aac
           [libx264 @ 0000000001ca0220] using SAR=1/1
           [libx264 @ 0000000001ca0220] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
           [libx264 @ 0000000001ca0220] profile High, level 3.1
           Output #3, hls, to '../files/412-887123464/video/720p/out.m3u8':
             Metadata:
               major_brand     : isom
               minor_version   : 512
               compatible_brands: isomiso2avc1mp41
               encoder         : Lavf57.57.100
               Stream #3:0(und): Video: h264 (libx264), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 90k tbn, 25 tbc (default)
               Metadata:
                 handler_name    : VideoHandler
                 encoder         : Lavc57.66.101 libx264
               Side data:
                 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
               Stream #3:1(und): Audio: aac (LC), 44100 Hz, stereo, fltp, 128 kb/s (default)
               Metadata:
                 handler_name    : SoundHandler
                 encoder         : Lavc57.66.101 aac
           [libx264 @ 0000000001ca23e0] using SAR=1/1
           [libx264 @ 0000000001ca23e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
           [libx264 @ 0000000001ca23e0] profile High, level 4.0
           Output #4, hls, to '../files/412-887123464/video/1080p/out.m3u8':
             Metadata:
               major_brand     : isom
               minor_version   : 512
               compatible_brands: isomiso2avc1mp41
               encoder         : Lavf57.57.100
               Stream #4:0(und): Video: h264 (libx264), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 90k tbn, 25 tbc (default)
               Metadata:
                 handler_name    : VideoHandler
                 encoder         : Lavc57.66.101 libx264
               Side data:
                 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
               Stream #4:1(und): Audio: aac (LC), 44100 Hz, stereo, fltp, 128 kb/s (default)
               Metadata:
                 handler_name    : SoundHandler
                 encoder         : Lavc57.66.101 aac
           Stream mapping:
             Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
             Stream #0:1 -> #0:1 (aac (native) -> aac (native))
             Stream #0:0 -> #1:0 (h264 (native) -> h264 (libx264))
             Stream #0:1 -> #1:1 (aac (native) -> aac (native))
             Stream #0:0 -> #2:0 (h264 (native) -> h264 (libx264))
             Stream #0:1 -> #2:1 (aac (native) -> aac (native))
             Stream #0:0 -> #3:0 (h264 (native) -> h264 (libx264))
             Stream #0:1 -> #3:1 (aac (native) -> aac (native))
             Stream #0:0 -> #4:0 (h264 (native) -> h264 (libx264))
             Stream #0:1 -> #4:1 (aac (native) -> aac (native))
           Press [q] to stop, [?] for help
    frame= 7600 fps= 21 q=-1.0 Lq=-1.0 q=-1.0 q=-1.0 q=-1.0 size=N/A time=00:05:04.06 bitrate=N/A speed=0.835x
    video:294980kB audio:23995kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    [libx264 @ 0000000001d33f00] frame I:33    Avg QP:19.93  size: 11412
    [libx264 @ 0000000001d33f00] frame P:2281  Avg QP:23.72  size:  3112
    [libx264 @ 0000000001d33f00] frame B:5286  Avg QP:28.59  size:   446
    [libx264 @ 0000000001d33f00] consecutive B-frames:  4.3%  6.9%  5.9% 82.8%
    [libx264 @ 0000000001d33f00] mb I  I16..4: 12.9% 42.9% 44.2%
    [libx264 @ 0000000001d33f00] mb P  I16..4:  1.3%  4.4%  2.3%  P16..4: 41.4% 22.0% 15.5%  0.0%  0.0%    skip:13.1%
    [libx264 @ 0000000001d33f00] mb B  I16..4:  0.0%  0.1%  0.0%  B16..8: 35.2%  5.9%  2.1%  direct: 3.0%  skip:53.6%  L0:35.3% L1:48.0% BI:16.8%
    [libx264 @ 0000000001d33f00] 8x8 transform intra:53.4% inter:57.9%
    [libx264 @ 0000000001d33f00] coded y,uvDC,uvAC intra: 70.6% 89.7% 67.6% inter: 18.1% 20.3% 7.2%
    [libx264 @ 0000000001d33f00] i16 v,h,dc,p: 24% 24%  6% 45%
    [libx264 @ 0000000001d33f00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 14% 19%  5%  5%  7%  5% 10%  7%
    [libx264 @ 0000000001d33f00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 15% 15%  6%  6%  7%  6%  8%  6%
    [libx264 @ 0000000001d33f00] i8c dc,h,v,p: 42% 17% 28% 14%
    [libx264 @ 0000000001d33f00] Weighted P-Frames: Y:26.3% UV:12.9%
    [libx264 @ 0000000001d33f00] ref P L0: 58.7% 24.7% 10.9%  4.8%  1.0%
    [libx264 @ 0000000001d33f00] ref B L0: 92.6%  5.8%  1.6%
    [libx264 @ 0000000001d33f00] ref B L1: 96.3%  3.7%
    [libx264 @ 0000000001d33f00] kb/s:258.68
    [aac @ 00000000005fc9e0] Qavg: 686.637
    [libx264 @ 0000000002017180] frame I:31    Avg QP:19.77  size: 29228
    [libx264 @ 0000000002017180] frame P:2040  Avg QP:23.08  size:  8765
    [libx264 @ 0000000002017180] frame B:5529  Avg QP:27.28  size:  1471
    [libx264 @ 0000000002017180] consecutive B-frames:  1.3%  4.2%  2.4% 92.1%
    [libx264 @ 0000000002017180] mb I  I16..4:  8.3% 58.8% 32.9%
    [libx264 @ 0000000002017180] mb P  I16..4:  3.2%  9.5%  2.6%  P16..4: 41.5% 19.5% 11.4%  0.0%  0.0%    skip:12.2%
    [libx264 @ 0000000002017180] mb B  I16..4:  0.2%  0.3%  0.1%  B16..8: 34.5%  5.8%  1.7%  direct: 2.7%  skip:54.7%  L0:35.9% L1:49.5% BI:14.6%
    [libx264 @ 0000000002017180] 8x8 transform intra:61.2% inter:67.3%
    [libx264 @ 0000000002017180] coded y,uvDC,uvAC intra: 55.8% 84.8% 51.3% inter: 15.6% 19.3% 3.9%
    [libx264 @ 0000000002017180] i16 v,h,dc,p: 24% 29%  8% 39%
    [libx264 @ 0000000002017180] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 17% 21%  5%  5%  7%  5%  8%  6%
    [libx264 @ 0000000002017180] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 18% 15%  6%  7%  7%  6%  7%  5%
    [libx264 @ 0000000002017180] i8c dc,h,v,p: 42% 18% 27% 13%
    [libx264 @ 0000000002017180] Weighted P-Frames: Y:22.3% UV:12.2%
    [libx264 @ 0000000002017180] ref P L0: 58.5% 23.4% 12.2%  5.2%  0.8%
    [libx264 @ 0000000002017180] ref B L0: 93.1%  5.3%  1.6%
    [libx264 @ 0000000002017180] ref B L1: 96.6%  3.4%
    [libx264 @ 0000000002017180] kb/s:708.47
    [aac @ 0000000001d35200] Qavg: 686.637
    [libx264 @ 0000000001d35ba0] frame I:31    Avg QP:19.63  size: 41522
    [libx264 @ 0000000001d35ba0] frame P:2025  Avg QP:22.86  size: 13415
    [libx264 @ 0000000001d35ba0] frame B:5544  Avg QP:26.52  size:  2471
    [libx264 @ 0000000001d35ba0] consecutive B-frames:  1.1%  3.9%  2.8% 92.2%
    [libx264 @ 0000000001d35ba0] mb I  I16..4: 10.6% 62.4% 26.9%
    [libx264 @ 0000000001d35ba0] mb P  I16..4:  4.7% 12.4%  2.6%  P16..4: 41.1% 17.8%  9.4%  0.0%  0.0%    skip:11.9%
    [libx264 @ 0000000001d35ba0] mb B  I16..4:  0.3%  0.5%  0.1%  B16..8: 34.0%  5.5%  1.4%  direct: 2.9%  skip:55.3%  L0:36.7% L1:50.2% BI:13.1%
    [libx264 @ 0000000001d35ba0] 8x8 transform intra:61.7% inter:71.6%
    [libx264 @ 0000000001d35ba0] coded y,uvDC,uvAC intra: 48.0% 81.9% 43.3% inter: 14.7% 19.7% 2.6%
    [libx264 @ 0000000001d35ba0] i16 v,h,dc,p: 27% 29%  9% 35%
    [libx264 @ 0000000001d35ba0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 19% 22%  5%  5%  6%  5%  7%  5%
    [libx264 @ 0000000001d35ba0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 25% 16%  5%  6%  7%  6%  6%  4%
    [libx264 @ 0000000001d35ba0] i8c dc,h,v,p: 42% 20% 26% 12%
    [libx264 @ 0000000001d35ba0] Weighted P-Frames: Y:18.1% UV:10.8%
    [libx264 @ 0000000001d35ba0] ref P L0: 59.5% 22.6% 12.6%  4.8%  0.5%
    [libx264 @ 0000000001d35ba0] ref B L0: 93.6%  5.0%  1.4%
    [libx264 @ 0000000001d35ba0] ref B L1: 97.1%  2.9%
    [libx264 @ 0000000001d35ba0] kb/s:1109.23
    [aac @ 0000000001d828a0] Qavg: 686.637
    [libx264 @ 0000000001d7f880] frame I:32    Avg QP:19.45  size: 64737
    [libx264 @ 0000000001d7f880] frame P:2104  Avg QP:22.44  size: 23985
    [libx264 @ 0000000001d7f880] frame B:5464  Avg QP:25.65  size:  4999
    [libx264 @ 0000000001d7f880] consecutive B-frames:  1.2%  7.7%  3.2% 87.8%
    [libx264 @ 0000000001d7f880] mb I  I16..4: 12.5% 70.0% 17.5%
    [libx264 @ 0000000001d7f880] mb P  I16..4:  6.7% 17.1%  1.8%  P16..4: 40.7% 14.9%  6.6%  0.0%  0.0%    skip:12.2%
    [libx264 @ 0000000001d7f880] mb B  I16..4:  0.6%  0.9%  0.1%  B16..8: 32.5%  4.7%  1.0%  direct: 2.9%  skip:57.4%  L0:37.6% L1:51.6% BI:10.8%
    [libx264 @ 0000000001d7f880] 8x8 transform intra:65.7% inter:77.5%
    [libx264 @ 0000000001d7f880] coded y,uvDC,uvAC intra: 39.5% 76.4% 32.4% inter: 13.2% 19.8% 1.5%
    [libx264 @ 0000000001d7f880] i16 v,h,dc,p: 32% 27% 10% 31%
    [libx264 @ 0000000001d7f880] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 18% 23%  4%  5%  5%  4%  5%  4%
    [libx264 @ 0000000001d7f880] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 20% 15%  5%  7%  7%  6%  6%  4%
    [libx264 @ 0000000001d7f880] i8c dc,h,v,p: 42% 19% 27% 12%
    [libx264 @ 0000000001d7f880] Weighted P-Frames: Y:10.5% UV:6.7%
    [libx264 @ 0000000001d7f880] ref P L0: 62.3% 20.4% 12.7%  4.3%  0.3%
    [libx264 @ 0000000001d7f880] ref B L0: 93.4%  5.2%  1.4%
    [libx264 @ 0000000001d7f880] ref B L1: 97.7%  2.3%
    [libx264 @ 0000000001d7f880] kb/s:2101.26
    [aac @ 0000000001d81560] Qavg: 686.637
    [libx264 @ 0000000001d7fd60] frame I:33    Avg QP:18.36  size: 98904
    [libx264 @ 0000000001d7fd60] frame P:3180  Avg QP:21.67  size: 33377
    [libx264 @ 0000000001d7fd60] frame B:4387  Avg QP:24.61  size:  7729
    [libx264 @ 0000000001d7fd60] consecutive B-frames:  2.7% 55.9% 15.6% 25.9%
    [libx264 @ 0000000001d7fd60] mb I  I16..4: 22.4% 66.9% 10.7%
    [libx264 @ 0000000001d7fd60] mb P  I16..4:  9.9% 17.8%  0.7%  P16..4: 40.4%  9.2%  3.0%  0.0%  0.0%    skip:19.0%
    [libx264 @ 0000000001d7fd60] mb B  I16..4:  0.8%  1.3%  0.1%  B16..8: 30.2%  2.6%  0.4%  direct: 1.7%  skip:63.0%  L0:38.1% L1:54.9% BI: 7.0%
    [libx264 @ 0000000001d7fd60] 8x8 transform intra:62.5% inter:82.9%
    [libx264 @ 0000000001d7fd60] coded y,uvDC,uvAC intra: 25.4% 59.5% 11.6% inter: 9.6% 16.3% 0.7%
    [libx264 @ 0000000001d7fd60] i16 v,h,dc,p: 33% 28% 15% 24%
    [libx264 @ 0000000001d7fd60] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 34% 20% 29%  3%  3%  4%  3%  3%  3%
    [libx264 @ 0000000001d7fd60] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 25% 16%  4%  6%  6%  5%  5%  4%
    [libx264 @ 0000000001d7fd60] i8c dc,h,v,p: 39% 21% 28% 12%
    [libx264 @ 0000000001d7fd60] Weighted P-Frames: Y:5.7% UV:3.6%
    [libx264 @ 0000000001d7fd60] ref P L0: 70.0% 18.6%  8.3%  3.1%  0.1%
    [libx264 @ 0000000001d7fd60] ref B L0: 91.4%  7.6%  1.0%
    [libx264 @ 0000000001d7fd60] ref B L1: 99.0%  1.0%
    [libx264 @ 0000000001d7fd60] kb/s:3771.31
    [aac @ 0000000001d823e0] Qavg: 686.637

    But I don’t have any problem for streaming files with creating resolutions from a file which have lower orginal quality than hd1080
    What I can to do ?

  • FFmpeg error : ratecontrol_init : can't open stats file

    18 décembre 2015, par oldo.nicho

    I’ve setup an AWS EC2 instance running Ubuntu 14.04 and have installed FFmpeg so that I can compress and transcode video.

    I’m trying to do a two pass conversion with the following code :

    ffmpeg -i input-file.avi -codec:v libx264 -profile:v high -preset slow -b:v 500k -maxrate 500k -bufsize 1000k -vf scale=702:-1 -threads 0 -pass 1 -an -f mp4 ~/encoded/null

    and second pass :

    ffmpeg -i input-file.avi -codec:v libx264 -profile:v high -preset slow -b:v 500k -maxrate 500k -bufsize 1000k -vf scale=702:-1 -threads 0 -pass 2 -codec:a libfdk_aac -b:a 128k -f mp4 output-file.mp4

    However I get the following error :

    ffmpeg version N-77283-g91c2a33 Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
     configuration: --prefix=/home/ubuntu/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/ubuntu/ffmpeg_build/include --extra-ldflags=-L/home/ubuntu/ffmpeg_build/lib --bindir=/home/ubuntu/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree
     libavutil      55. 11.100 / 55. 11.100
     libavcodec     57. 17.100 / 57. 17.100
     libavformat    57. 20.100 / 57. 20.100
     libavdevice    57.  0.100 / 57.  0.100
     libavfilter     6. 21.100 /  6. 21.100
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, avi, from 'input-file.avi':
     Duration: 01:18:05.29, start: 0.000000, bitrate: 2025 kb/s
       Stream #0:0: Video: mpeg4 (Simple Profile) (XVID / 0x44495658), yuv420p, 720x480 [SAR 1:1 DAR 3:2], 1789 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc
       Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 224 kb/s
    [libx264 @ 0x1e04240] using SAR=1/1
    [libx264 @ 0x1e04240] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
    [libx264 @ 0x1e04240] ratecontrol_init: can't open stats file
    Output #0, mp4, to '/home/ubuntu/encoded/null':
       Stream #0:0: Video: h264, none, q=2-31, 128 kb/s, SAR 1:1 DAR 0:0, 29.97 fps
       Metadata:
         encoder         : Lavc57.17.100 libx264
    Stream mapping:
     Stream #0:0 -> #0:0 (mpeg4 (native) -> h264 (libx264))
    Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

    The command as written above works fine on my local computer (running OSX). Would anyone have any suggestions as to how to fix this problem ?

  • Error converting .flv to .avi with ffmpeg

    5 juillet 2012, par user1504396

    When i try the 2d code, with a 5 minutes 7 second video, I get a 28 minutes 29 seconds video, What did I do wrong ?

    Here is the ffmpeg output :

    [Me@Hewlett-Packard Downloads]$ ffmpeg -i "0042473.flv" -s 400x240 -aspect 2:1 -r 20 -vcodec mjpeg -qscale 1 -acodec adpcm_ima_wav -ac 2 "VID_0001.AVI"
    ffmpeg version 0.8.10, Copyright © 2000-2011 the FFmpeg developers
    built on Feb 29 2012 16:30:44 with gcc 4.6.2 20111027 (Red Hat 4.6.2-1)
    configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-bzlib --enable-libcelt --enable-libdc1394 --enable-libdirac --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
    libavutil 51. 9. 1 / 51. 9. 1
    libavcodec 53. 8. 0 / 53. 8. 0
    libavformat 53. 5. 0 / 53. 5. 0
    libavdevice 53. 1. 1 / 53. 1. 1
    libavfilter 2. 23. 0 / 2. 23. 0
    libswscale 2. 0. 0 / 2. 0. 0
    libpostproc 51. 2. 0 / 51. 2. 0
    [flv @ 0x2165600] Estimating duration from bitrate, this may be inaccurate

    Seems stream 0 codec frame rate differs from container frame rate: 59.94 (2997/50) -> 29.97 (30000/1001)
    Input #0, flv, from '0042473.flv':
    Metadata:
    minor_version : 1
    stereo : true
    videocodecid : 7
    audiodatarate : 62
    audiosamplerate : 44100
    audiosize : 2476815
    canSeekToEnd : true
    creation_time : 2011-05-01 18:06:43
    copyright :
    compatible_brands: isomavc1
    datasize : 16589374
    duration : 308
    copyright-eng :
    encoder : Lavf52.104.0
    videodatarate : 351
    hasAudio : true
    hasCuePoints : false
    hasKeyframes : true
    hasMetadata : true
    hasVideo : true
    width : 480
    lasttimestamp : 308
    audiocodecid : 10
    metadatacreator : flvtool++ (Facebook, Motion project, dweatherford)
    major_brand : isom
    audiosamplesize : 16
    totalframes : 9225
    framerate : 30
    height : 272
    videosize : 13863389
    filesize : 16587742
    Duration: 00:05:07.94, start: 0.000000, bitrate: 423 kb/s
    Stream #0.0: Video: h264 (High), yuv420p, 480x272 [PAR 1:1 DAR 30:17], 359 kb/s, 29.97 tbr, 1k tbn, 59.94 tbc
    Stream #0.1: Audio: aac, 44100 Hz, stereo, s16, 63 kb/s
    Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting format 'yuvj420p'
    [buffer @ 0x216b180] w:480 h:272 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
    [scale @ 0x216bf40] w:480 h:272 fmt:yuv420p -> w:400 h:240 fmt:yuvj420p flags:0x4
    Output #0, avi, to 'VID_0001.AVI':
    Metadata:
    minor_version : 1
    stereo : true
    videocodecid : 7
    audiodatarate : 62
    audiosamplerate : 44100
    audiosize : 2476815
    canSeekToEnd : true
    creation_time : 2011-05-01 18:06:43
    ICOP :
    compatible_brands: isomavc1
    datasize : 16589374
    duration : 308
    copyright-eng :
    filesize : 16587742
    videodatarate : 351
    hasAudio : true
    hasCuePoints : false
    hasKeyframes : true
    hasMetadata : true
    hasVideo : true
    width : 480
    lasttimestamp : 308
    audiocodecid : 10
    metadatacreator : flvtool++ (Facebook, Motion project, dweatherford)
    major_brand : isom
    audiosamplesize : 16
    totalframes : 9225
    framerate : 30
    height : 272
    videosize : 13863389
    ISFT : Lavf53.5.0
    Stream #0.0: Video: mjpeg, yuvj420p, 400x240 [PAR 6:5 DAR 2:1], q=2-31, 200 kb/s, 20 tbn, 20 tbc
    Stream #0.1: Audio: adpcm_ima_wav, 44100 Hz, stereo, s16, 352 kb/s
    Stream mapping:
    Stream #0.0 -> #0.0
    Stream #0.1 -> #0.1
    Press [q] to stop, [?] for help
    frame= 43 fps= 0 q=1.0 size= 1330kB time=00:00:02.12 bitrate=5135.7kbits/sframe= 87 fps= 86 q=1.0 size= 2712kB time=00:00:04.35 bitrate=5097.2kbits/sframe= 135 fps= 89 q=1.0 size= 3579kB time=00:00:06.78 bitrate=4324.9kbits/sframe= 185 fps= 92 q=1.0 size= 4307kB time=00:00:09.27 bitrate=3805.9kbits/sframe= 231 fps= 92 q=1.0 size= 5208kB time=00:00:11.55 bitrate=3692.4kbits/sframe= 276 fps= 91 q=1.0 size= 6129kB time=00:00:13.83 bitrate=3628.5kbits/sframe= 318 fps= 90 q=1.0 size= 6978kB time=00:00:15.91 bitrate=3592.6kbits/sframe= 366 fps= 91 q=1.0 size= 7990kB time=00:00:18.33 bitrate=3570.2kbits/sframe= 408 fps= 90 q=1.0 size= 8912kB time=00:00:20.43 bitrate=3573.2kbits/sframe= 451 fps= 90 q=1.0 size= 9831kB time=00:00:22.55 bitrate=3570.9kbits/sframe= 495 fps= 89 q=1.0 size= 10827kB time=00:00:24.74 bitrate=3584.4kbits/sframe= 539 fps= 89 q=1.0 size= 11845kB time=00:00:26.91 bitrate=3605.5kbits/sframe= 583 fps= 89 q=1.0 size= 12939kB time=00:00:29.14 bitrate=3636.2kbits/sframe= 630 fps= 89 q=1.0 size= 13790kB time=00:00:31.52 bitrate=3583.5kbits/sframe= 676 fps= 89 q=1.0 size= 14710kB time=00:00:33.80 bitrate=3564.4kbits/sframe= 723 fps= 90 q=1.0 size= 15651kB time=00:00:36.16 bitrate=3545.7kbits/sframe= 767 fps= 90 q=1.0 size= 16589kB time=00:00:38.35 bitrate=3543.6kbits/sframe= 809 fps= 89 q=1.0 size= 17576kB time=00:00:40.42 bitrate=3561.7kbits/sframe= 852 fps= 89 q=1.0 size= 18598kB time=00:00:42.61 bitrate=3575.0kbits/sframe= 898 fps= 89 q=1.0 size= 19548kB time=00:00:44.90 bitrate=3566.6kbits/sframe= 940 fps= 89 q=1.0 size= 20666kB time=00:00:46.97 bitrate=3603.9kbits/sframe= 982 fps= 89 q=1.0 size= 21739kB time=00:00:49.12 bitrate=3625.5kbits/sframe= 1024 fps= 88 q=1.0 size= 22711kB time=00:00:51.25 bitrate=3630.2kbits/sframe= 1070 fps= 88 q=1.0 size= 23769kB time=00:00:53.47 bitrate=3640.9kbits/sframe= 1118 fps= 89 q=1.0 size= 24935kB time=00:00:55.90 bitrate=3654.2kbits/sframe= 1165 fps= 89 q=1.0 size= 26047kB time=00:00:58.22 bitrate=3664.3kbits/sframe= 1213 fps= 89 q=1.0 size= 27187kB time=00:01:00.62 bitrate=3673.5kbits/sframe= 1265 fps= 90 q=1.0 size= 27935kB time=00:01:03.23 bitrate=3619.0kbits/sframe= 1315 fps= 90 q=1.0 size= 28590kB time=00:01:05.79 bitrate=3559.7kbits/sframe= 1366 fps= 90 q=1.0 size= 29229kB time=00:01:08.30 bitrate=3505.3kbits/sframe= 1415 fps= 91 q=1.0 size= 29928kB time=00:01:10.75 bitrate=3465.2kbits/sframe= 1464 fps= 91 q=1.0 size= 30612kB time=00:01:13.25 bitrate=3423.5kbits/sframe= 1512 fps= 91 q=1.0 size= 31309kB time=00:01:15.64 bitrate=3390.8kbits/sframe= 1561 fps= 91 q=1.0 size= 31997kB time=00:01:18.06 bitrate=3357.8kbits/sframe= 1608 fps= 91 q=1.0 size= 32760kB time=00:01:20.36 bitrate=3339.3kbits/sframe= 1654 fps= 91 q=1.0 size= 33563kB time=00:01:22.69 bitrate=3324.7kbits/sframe= 1700 fps= 91 q=1.0 size= 34318kB time=00:01:24.98 bitrate=3308.2kbits/sframe= 1745 fps= 91 q=1.0 size= 35041kB time=00:01:27.24 bitrate=3290.4kbits/sframe= 1791 fps= 91 q=1.0 size= 35749kB time=00:01:29.56 bitrate=3269.6kbits/sframe= 1837 fps= 91 q=1.0 size= 36442kB time=00:01:31.85 bitrate=3250.1kbits/sframe= 1884 fps= 91 q=1.0 size= 37121kB time=00:01:34.20 bitrate=3228.0kbits/sframe= 1931 fps= 91 q=1.0 size= 37840kB time=00:01:36.53 bitrate=3211.1kbits/sframe= 1978 fps= 91 q=1.0 size= 38561kB time=00:01:38.90 bitrate=3193.8kbits/sframe= 2025 fps= 91 q=1.0 size= 39279kB time=00:01:41.28 bitrate=3176.9kbits/sframe= 2072 fps= 91 q=1.0 size= 40005kB time=00:01:43.59 bitrate=3163.6kbits/sframe= 2117 fps= 91 q=1.0 size= 40833kB time=00:01:45.87 bitrate=3159.5kbits/sframe= 2158 fps= 91 q=1.0 size= 41561kB time=00:01:47.90 bitrate=3155.3kbits/sframe= 2202 fps= 91 q=1.0 size= 42407kB time=00:01:50.14 bitrate=3154.1kbits/sframe= 2248 fps= 91 q=1.0 size= 43201kB time=00:01:52.42 bitrate=3147.9kbits/sframe= 2295 fps= 91 q=1.0 size= 43975kB time=00:01:54.75 bitrate=3139.3kbits/sframe= 2342 fps= 91 q=1.0 size= 44739kB time=00:01:57.10 bitrate=3129.7kbits/sframe= 2388 fps= 91 q=1.0 size= 45532kB time=00:01:59.43 bitrate=3123.0kbits/sframe= 2435 fps= 91 q=1.0 size= 46306kB time=00:02:01.80 bitrate=3114.5kbits/sframe= 2481 fps= 91 q=1.0 size= 47095kB time=00:02:04.02 bitrate=3110.7kbits/sframe= 2530 fps= 91 q=1.0 size= 47778kB time=00:02:06.49 bitrate=3094.3kbits/sframe= 2578 fps= 91 q=1.0 size= 48507kB time=00:02:08.91 bitrate=3082.5kbits/sframe= 2622 fps= 91 q=1.0 size= 49169kB time=00:02:11.08 bitrate=3072.9kbits/sframe= 2670 fps= 91 q=1.0 size= 49851kB time=00:02:13.54 bitrate=3057.9kbits/sframe= 2718 fps= 91 q=1.0 size= 50531kB time=00:02:15.92 bitrate=3045.5kbits/sframe= 2764 fps= 91 q=1.0 size= 51242kB time=00:02:18.18 bitrate=3037.8kbits/sframe= 2810 fps= 92 q=1.0 size= 51959kB time=00:02:20.51 bitrate=3029.3kbits/sframe= 2835 fps= 90 q=1.0 size= 52376kB time=00:02:21.78 bitrate=3026.2kbits/sframe= 2879 fps= 90 q=1.0 size= 53093kB time=00:02:23.94 bitrate=3021.5kbits/sframe= 2923 fps= 90 q=1.0 size= 53853kB time=00:02:26.18 bitrate=3017.8kbits/sframe= 2968 fps= 90 q=1.0 size= 54594kB time=00:02:28.39 bitrate=3013.7kbits/sframe= 3012 fps= 90 q=1.0 size= 55444kB time=00:02:30.63 bitrate=3015.2kbits/sframe= 3056 fps= 90 q=1.0 size= 56495kB time=00:02:32.78 bitrate=3029.2kbits/sframe= 3098 fps= 90 q=1.0 size= 57463kB time=00:02:34.90 bitrate=3039.0kbits/sframe= 3141 fps= 90 q=1.0 size= 58433kB time=00:02:37.04 bitrate=3048.0kbits/sframe= 3186 fps= 90 q=1.0 size= 59457kB time=00:02:39.33 bitrate=3057.0kbits/sframe= 3232 fps= 90 q=1.0 size= 60471kB time=00:02:41.59 bitrate=3065.6kbits/sframe= 3277 fps= 90 q=1.0 size= 61485kB time=00:02:43.82 bitrate=3074.5kbits/sframe= 3322 fps= 90 q=1.0 size= 62297kB time=00:02:46.11 bitrate=3072.3kbits/sframe= 3365 fps= 90 q=1.0 size= 63043kB time=00:02:48.27 bitrate=3069.0kbits/sframe= 3409 fps= 90 q=1.0 size= 63752kB time=00:02:50.46 bitrate=3063.7kbits/sframe= 3455 fps= 90 q=1.0 size= 64529kB time=00:02:52.75 bitrate=3060.0kbits/sframe= 3499 fps= 90 q=1.0 size= 65306kB time=00:02:54.96 bitrate=3057.7kbits/sframe= 3545 fps= 90 q=1.0 size= 66070kB time=00:02:57.24 bitrate=3053.6kbits/sframe= 3594 fps= 90 q=1.0 size= 66804kB time=00:02:59.71 bitrate=3045.1kbits/sframe= 3644 fps= 90 q=1.0 size= 67554kB time=00:03:02.18 bitrate=3037.6kbits/sframe= 3690 fps= 90 q=1.0 size= 68436kB time=00:03:04.48 bitrate=3038.8kbits/sframe= 3740 fps= 90 q=1.0 size= 69121kB time=00:03:07.00 bitrate=3028.0kbits/sframe= 3787 fps= 90 q=1.0 size= 69953kB time=00:03:09.33 bitrate=3026.7kbits/sframe= 3832 fps= 90 q=1.0 size= 70857kB time=00:03:11.59 bitrate=3029.7kbits/sframe= 3878 fps= 90 q=1.0 size= 71622kB time=00:03:13.92 bitrate=3025.6kbits/sframe= 3925 fps= 90 q=1.0 size= 72343kB time=00:03:16.25 bitrate=3019.8kbits/sframe= 3973 fps= 90 q=1.0 size= 73100kB time=00:03:18.64 bitrate=3014.5kbits/sframe= 4021 fps= 90 q=1.0 size= 73867kB time=00:03:21.07 bitrate=3009.5kbits/sframe= 4070 fps= 90 q=1.0 size= 74643kB time=00:03:23.53 bitrate=3004.2kbits/sframe= 4119 fps= 90 q=1.0 size= 75363kB time=00:03:25.95 bitrate=2997.6kbits/sframe= 4167 fps= 90 q=1.0 size= 76077kB time=00:03:28.35 bitrate=2991.1kbits/sframe= 4216 fps= 91 q=1.0 size= 76751kB time=00:03:30.77 bitrate=2983.0kbits/sframe= 4263 fps= 91 q=1.0 size= 77432kB time=00:03:33.15 bitrate=2975.9kbits/sframe= 4315 fps= 91 q=1.0 size= 78087kB time=00:03:35.73 bitrate=2965.1kbits/sframe= 4367 fps= 91 q=1.0 size= 78795kB time=00:03:38.34 bitrate=2956.3kbits/sframe= 4418 fps= 91 q=1.0 size= 79475kB time=00:03:40.90 bitrate=2947.2kbits/sframe= 4469 fps= 91 q=1.0 size= 80174kB time=00:03:43.46 bitrate=2939.1kbits/sframe= 4519 fps= 91 q=1.0 size= 80865kB time=00:03:45.90 bitrate=2932.4kbits/sframe= 4567 fps= 91 q=1.0 size= 81621kB time=00:03:48.32 bitrate=2928.4kbits/sframe= 4611 fps= 91 q=1.0 size= 82613kB time=00:03:50.56 bitrate=2935.2kbits/sframe= 4655 fps= 91 q=1.0 size= 83653kB time=00:03:52.80 bitrate=2943.7kbits/sframe= 4699 fps= 91 q=1.0 size= 84646kB time=00:03:54.97 bitrate=2951.1kbits/sframe= 4743 fps= 91 q=1.0 size= 85543kB time=00:03:57.20 bitrate=2954.3kbits/sframe= 4789 fps= 91 q=1.0 size= 86344kB time=00:03:59.42 bitrate=2954.3kbits/sframe= 4836 fps= 91 q=1.0 size= 87090kB time=00:04:01.79 bitrate=2950.6kbits/sframe= 4883 fps= 91 q=1.0 size= 87821kB time=00:04:04.17 bitrate=2946.4kbits/sframe= 4930 fps= 91 q=1.0 size= 88571kB time=00:04:06.50 bitrate=2943.5kbits/sframe= 4977 fps= 91 q=1.0 size= 89318kB time=00:04:08.85 bitrate=2940.3kbits/sframe= 5024 fps= 91 q=1.0 size= 90014kB time=00:04:11.18 bitrate=2935.7kbits/sframe= 5070 fps= 91 q=1.0 size= 90743kB time=00:04:13.55 bitrate=2931.8kbits/sframe= 5120 fps= 91 q=1.0 size= 91438kB time=00:04:16.00 bitrate=2926.0kbits/sframe= 5165 fps= 91 q=1.0 size= 92265kB time=00:04:18.28 bitrate=2926.4kbits/sframe= 5211 fps= 91 q=1.0 size= 93079kB time=00:04:20.56 bitrate=2926.3kbits/sframe= 5258 fps= 91 q=1.0 size= 93913kB time=00:04:22.87 bitrate=2926.6kbits/sframe= 5304 fps= 91 q=1.0 size= 94739kB time=00:04:25.20 bitrate=2926.4kbits/sframe= 5351 fps= 91 q=1.0 size= 95565kB time=00:04:27.60 bitrate=2925.5kbits/sframe= 5398 fps= 91 q=1.0 size= 96368kB time=00:04:29.90 bitrate=2924.9kbits/sframe= 5444 fps= 91 q=1.0 size= 97176kB time=00:04:32.16 bitrate=2924.9kbits/sframe= 5490 fps= 91 q=1.0 size= 98049kB time=00:04:34.54 bitrate=2925.6kbits/sframe= 5538 fps= 91 q=1.0 size= 98914kB time=00:04:36.91 bitrate=2926.1kbits/sframe= 5587 fps= 91 q=1.0 size= 99817kB time=00:04:39.36 bitrate=2927.0kbits/sframe= 5636 fps= 91 q=1.0 size= 100709kB time=00:04:41.83 bitrate=2927.3kbits/sframe= 5682 fps= 91 q=1.0 size= 101490kB time=00:04:44.11 bitrate=2926.3kbits/sframe= 5732 fps= 91 q=1.0 size= 102230kB time=00:04:46.60 bitrate=2922.0kbits/sframe= 5781 fps= 91 q=1.0 size= 102991kB time=00:04:49.07 bitrate=2918.6kbits/sframe= 5827 fps= 91 q=1.0 size= 103918kB time=00:04:51.35 bitrate=2921.8kbits/sframe= 5874 fps= 92 q=1.0 size= 104873kB time=00:04:53.73 bitrate=2924.9kbits/sframe= 5921 fps= 92 q=1.0 size= 105844kB time=00:04:56.08 bitrate=2928.5kbits/sframe= 5970 fps= 92 q=1.0 size= 106670kB time=00:04:58.50 bitrate=2927.4kbits/sframe= 6028 fps= 92 q=1.0 size= 108198kB time=00:05:01.43 bitrate=2940.5kbits/sframe= 6080 fps= 91 q=1.0 size= 109527kB time=00:05:03.99 bitrate=2951.5kbits/sframe= 6138 fps= 92 q=1.0 size= 110623kB time=00:05:06.85 bitrate=2953.3kbits/sframe= 6156 fps= 92 q=1.0 Lsize= 111017kB time=00:05:07.85 bitrate=2954.2kbits/s dup=0 drop=3067

    video:97193kB audio:13354kB global headers:0kB muxing overhead 0.425158%

    Where is my problem ?