Skip to content

Instantly share code, notes, and snippets.

@kvz
Created March 31, 2015 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kvz/05b01ba5a13eb91de53e to your computer and use it in GitHub Desktop.
Save kvz/05b01ba5a13eb91de53e to your computer and use it in GitHub Desktop.
cd /tmp
wget -nc https://www.dropbox.com/s/04u5xws6fkvbkgb/Shred_Those_Pounds.mp4?dl=1 -O Shred_Those_Pounds.mp4
echo ""
echo ""
echo "--> Failure with '-sn -dn'"
ffmpeg-v2.2.3 \
-i ./Shred_Those_Pounds.mp4 \
-codec:a libfdk_aac \
-codec:v libx264 \
-sn \
-dn \
-flags -global_header \
-segment_time 10 \
-segment_time_delta 0 \
-segment_format mpegts \
-f segment \
./this-fails-%05d.ts
echo ""
echo ""
echo "--> Success with '-map 0 -map -0:d -map -0:s'"
ffmpeg-v2.2.3 \
-i ./Shred_Those_Pounds.mp4 \
-codec:a libfdk_aac \
-codec:v libx264 \
-map 0 \
-map -0:d \
-map -0:s \
-flags -global_header \
-segment_time 10 \
-segment_time_delta 0 \
-segment_format mpegts \
-f segment \
./this-succeeds-%05d.ts
cd -
@kvz
Copy link
Author

kvz commented Mar 31, 2015

This outputs the following


--> Failure with '-sn -dn'
ffmpeg version 2.2.3-transloadit-static-v2.2.3 Copyright (c) 2000-2014 the FFmpeg developers
  built on Jun  3 2014 14:36:03 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --disable-devices --disable-doc --disable-ffplay --disable-ffserver --disable-shared --enable-bzlib --enable-gpl --enable-gray --enable-libass --enable-libfaac --enable-libfdk_aac --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-pthreads --enable-runtime-cpudetect --enable-static --enable-version3 --enable-zlib --extra-cflags='-I/usr/src/ffmpeg-static/target/include -static' --extra-cflags=--static --extra-ldflags='-L/usr/src/ffmpeg-static/target/lib -lm -lopus -static' --extra-libs='-lfontconfig -lfreetype -lexpat -lpng -lfribidi -xml2' --extra-version=transloadit-static-v2.2.3 --prefix=/usr/src/ffmpeg-static/target
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  2.100 /  4.  2.100
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './Shred_Those_Pounds.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    artist          : Cecilia Sardeo
    date            : 2015
    encoder         : Lavf55.33.100
    genre           : Yoga
  Duration: 00:01:32.78, start: 0.105375, bitrate: 342 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 274 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 64 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Codec AVOption flags () specified for output file #0 (./this-fails-%05d.ts) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Output #0, segment, to './this-fails-%05d.ts':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    artist          : Cecilia Sardeo
    date            : 2015
    encoder         : Lavf55.33.100
    genre           : Yoga
Output file #0 does not contain any stream
Conversion failed!


--> Success with '-map 0 -map -0:d -map -0:s'
ffmpeg version 2.2.3-transloadit-static-v2.2.3 Copyright (c) 2000-2014 the FFmpeg developers
  built on Jun  3 2014 14:36:03 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --disable-devices --disable-doc --disable-ffplay --disable-ffserver --disable-shared --enable-bzlib --enable-gpl --enable-gray --enable-libass --enable-libfaac --enable-libfdk_aac --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-pthreads --enable-runtime-cpudetect --enable-static --enable-version3 --enable-zlib --extra-cflags='-I/usr/src/ffmpeg-static/target/include -static' --extra-cflags=--static --extra-ldflags='-L/usr/src/ffmpeg-static/target/lib -lm -lopus -static' --extra-libs='-lfontconfig -lfreetype -lexpat -lpng -lfribidi -xml2' --extra-version=transloadit-static-v2.2.3 --prefix=/usr/src/ffmpeg-static/target
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  2.100 /  4.  2.100
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './Shred_Those_Pounds.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    artist          : Cecilia Sardeo
    date            : 2015
    encoder         : Lavf55.33.100
    genre           : Yoga
  Duration: 00:01:32.78, start: 0.105375, bitrate: 342 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 274 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 64 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[libx264 @ 0x352d260] using SAR=1/1
[libx264 @ 0x352d260] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 @ 0x352d260] profile High, level 3.0
[segment @ 0x3536f40] Codec for stream 0 does not use global headers but container format requires global headers
[segment @ 0x3536f40] Codec for stream 1 does not use global headers but container format requires global headers
Output #0, segment, to './this-succeeds-%05d.ts':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    artist          : Cecilia Sardeo
    date            : 2015
    genre           : Yoga
    encoder         : Lavf55.33.100
    Stream #0:0(eng): Video: h264 (libx264), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 90k tbn, 29.97 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (libfdk_aac), 48000 Hz, stereo, s16, 139 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
  Stream #0:1 -> #0:1 (aac -> libfdk_aac)
Press [q] to stop, [?] for help
frame= 2779 fps=220 q=-1.0 Lsize=N/A time=00:01:32.79 bitrate=N/A dup=3 drop=0
video:3134kB audio:1583kB subtitle:0 data:0 global headers:0kB muxing overhead -100.000458%
[libx264 @ 0x352d260] frame I:16    Avg QP:16.26  size: 15203
[libx264 @ 0x352d260] frame P:848   Avg QP:20.59  size:  2653
[libx264 @ 0x352d260] frame B:1915  Avg QP:27.94  size:   374
[libx264 @ 0x352d260] consecutive B-frames:  7.4%  0.6%  5.0% 87.1%
[libx264 @ 0x352d260] mb I  I16..4: 19.3% 42.9% 37.8%
[libx264 @ 0x352d260] mb P  I16..4:  1.6%  3.1%  0.9%  P16..4: 19.5%  8.5%  4.6%  0.0%  0.0%    skip:61.7%
[libx264 @ 0x352d260] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 13.3%  1.8%  0.4%  direct: 0.3%  skip:84.0%  L0:49.0% L1:46.4% BI: 4.6%
[libx264 @ 0x352d260] 8x8 transform intra:51.7% inter:56.8%
[libx264 @ 0x352d260] coded y,uvDC,uvAC intra: 45.0% 64.1% 31.3% inter: 3.9% 6.8% 0.7%
[libx264 @ 0x352d260] i16 v,h,dc,p: 34% 24% 10% 32%
[libx264 @ 0x352d260] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 36% 19% 22%  3%  5%  5%  4%  3%  3%
[libx264 @ 0x352d260] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 17% 14%  5% 10% 11%  7%  5%  4%
[libx264 @ 0x352d260] i8c dc,h,v,p: 54% 19% 20%  6%
[libx264 @ 0x352d260] Weighted P-Frames: Y:3.8% UV:2.6%
[libx264 @ 0x352d260] ref P L0: 74.3%  9.5% 12.7%  3.5%  0.0%
[libx264 @ 0x352d260] ref B L0: 92.2%  6.8%  1.0%
[libx264 @ 0x352d260] ref B L1: 96.0%  4.0%
[libx264 @ 0x352d260] kb/s:276.88
/srv/current

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment