Skip to content

Instantly share code, notes, and snippets.

@andrey-utkin
Created February 1, 2016 00:35
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 andrey-utkin/9994afa6dd26627cee50 to your computer and use it in GitHub Desktop.
Save andrey-utkin/9994afa6dd26627cee50 to your computer and use it in GitHub Desktop.
$ for x in /tmp/ffmpeg.{static,shared}; do pushd $x; export LD_LIBRARY_PATH="$x/lib"; ./bin/ffmpeg -f lavfi -i testsrc,format=pix_fmts=yuv420p -t 1 -c:v libx264 -y test.mkv; ./transcoding test.mkv out.mkv || true; popd; done;
/tmp/ffmpeg.static /tmp
ffmpeg version N-78232-g9962718 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.0 (Gentoo 5.3.0 p1.0, pie-0.6.5)
configuration: --enable-libx264 --enable-gpl --prefix=/tmp/ffmpeg.static
libavutil 55. 16.101 / 55. 16.101
libavcodec 57. 24.101 / 57. 24.101
libavformat 57. 23.101 / 57. 23.101
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 27.100 / 6. 27.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, lavfi, from 'testsrc,format=pix_fmts=yuv420p':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
[libx264 @ 0x37ec420] using SAR=1/1
[libx264 @ 0x37ec420] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x37ec420] profile High, level 1.3
[libx264 @ 0x37ec420] 264 - core 148 r2665M a01e339 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - 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=6 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, matroska, to 'test.mkv':
Metadata:
encoder : Lavf57.23.101
Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=-1--1, 25 fps, 1k tbn, 25 tbc
Metadata:
encoder : Lavc57.24.101 libx264
Side data:
unknown side data type 10 (24 bytes)
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 25 fps=0.0 q=-1.0 Lsize= 8kB time=00:00:00.92 bitrate= 72.0kbits/s speed=14.8x
video:7kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 12.311865%
[libx264 @ 0x37ec420] frame I:1 Avg QP:15.82 size: 3088
[libx264 @ 0x37ec420] frame P:9 Avg QP:16.57 size: 307
[libx264 @ 0x37ec420] frame B:15 Avg QP:14.85 size: 55
[libx264 @ 0x37ec420] consecutive B-frames: 20.0% 0.0% 0.0% 80.0%
[libx264 @ 0x37ec420] mb I I16..4: 67.7% 7.3% 25.0%
[libx264 @ 0x37ec420] mb P I16..4: 2.4% 1.0% 0.2% P16..4: 8.7% 3.0% 2.0% 0.0% 0.0% skip:82.8%
[libx264 @ 0x37ec420] mb B I16..4: 0.7% 0.1% 0.0% B16..8: 3.6% 0.0% 0.0% direct: 0.2% skip:95.3% L0:43.7% L1:49.7% BI: 6.6%
[libx264 @ 0x37ec420] 8x8 transform intra:12.2% inter:29.9%
[libx264 @ 0x37ec420] coded y,uvDC,uvAC intra: 11.2% 35.9% 22.6% inter: 0.8% 2.6% 1.4%
[libx264 @ 0x37ec420] i16 v,h,dc,p: 76% 11% 6% 7%
[libx264 @ 0x37ec420] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 64% 8% 28% 0% 0% 0% 0% 0% 0%
[libx264 @ 0x37ec420] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 46% 27% 18% 2% 2% 2% 0% 2% 0%
[libx264 @ 0x37ec420] i8c dc,h,v,p: 37% 18% 37% 8%
[libx264 @ 0x37ec420] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x37ec420] ref P L0: 71.3% 6.0% 20.0% 2.7%
[libx264 @ 0x37ec420] ref B L0: 75.1% 17.8% 7.1%
[libx264 @ 0x37ec420] ref B L1: 93.6% 6.4%
[libx264 @ 0x37ec420] kb/s:53.48
Input #0, matroska,webm, from 'test.mkv':
Metadata:
ENCODER : Lavf57.23.101
Duration: 00:00:01.00, start: 0.000000, bitrate: 66 kb/s
Stream #0:0: Video: h264 (High), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
Metadata:
ENCODER : Lavc57.24.101 libx264
DURATION : 00:00:01.000000000
[libx264 @ 0x2137c00] broken ffmpeg default settings detected
[libx264 @ 0x2137c00] use an encoding preset (e.g. -vpre medium)
[libx264 @ 0x2137c00] preset usage: -vpre <speed> -vpre <profile>
[libx264 @ 0x2137c00] speed presets are listed in x264 --help
[libx264 @ 0x2137c00] profile is optional; x264 defaults to high
Cannot open video encoder for stream #0
Error occurred: Generic error in an external library
/tmp
/tmp/ffmpeg.shared /tmp
ffmpeg version N-78232-g9962718 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.0 (Gentoo 5.3.0 p1.0, pie-0.6.5)
configuration: --enable-libx264 --enable-gpl --prefix=/tmp/ffmpeg.shared --enable-shared
libavutil 55. 16.101 / 55. 16.101
libavcodec 57. 24.101 / 57. 24.101
libavformat 57. 23.101 / 57. 23.101
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 27.100 / 6. 27.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, lavfi, from 'testsrc,format=pix_fmts=yuv420p':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
[libx264 @ 0x1f8c420] using SAR=1/1
[libx264 @ 0x1f8c420] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x1f8c420] profile High, level 1.3
[libx264 @ 0x1f8c420] 264 - core 148 r2665M a01e339 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - 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=6 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, matroska, to 'test.mkv':
Metadata:
encoder : Lavf57.23.101
Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=-1--1, 25 fps, 1k tbn, 25 tbc
Metadata:
encoder : Lavc57.24.101 libx264
Side data:
unknown side data type 10 (24 bytes)
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 25 fps=0.0 q=-1.0 Lsize= 8kB time=00:00:00.92 bitrate= 72.0kbits/s speed=19.7x
video:7kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 12.311865%
[libx264 @ 0x1f8c420] frame I:1 Avg QP:15.82 size: 3088
[libx264 @ 0x1f8c420] frame P:9 Avg QP:16.57 size: 307
[libx264 @ 0x1f8c420] frame B:15 Avg QP:14.85 size: 55
[libx264 @ 0x1f8c420] consecutive B-frames: 20.0% 0.0% 0.0% 80.0%
[libx264 @ 0x1f8c420] mb I I16..4: 67.7% 7.3% 25.0%
[libx264 @ 0x1f8c420] mb P I16..4: 2.4% 1.0% 0.2% P16..4: 8.7% 3.0% 2.0% 0.0% 0.0% skip:82.8%
[libx264 @ 0x1f8c420] mb B I16..4: 0.7% 0.1% 0.0% B16..8: 3.6% 0.0% 0.0% direct: 0.2% skip:95.3% L0:43.7% L1:49.7% BI: 6.6%
[libx264 @ 0x1f8c420] 8x8 transform intra:12.2% inter:29.9%
[libx264 @ 0x1f8c420] coded y,uvDC,uvAC intra: 11.2% 35.9% 22.6% inter: 0.8% 2.6% 1.4%
[libx264 @ 0x1f8c420] i16 v,h,dc,p: 76% 11% 6% 7%
[libx264 @ 0x1f8c420] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 64% 8% 28% 0% 0% 0% 0% 0% 0%
[libx264 @ 0x1f8c420] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 46% 27% 18% 2% 2% 2% 0% 2% 0%
[libx264 @ 0x1f8c420] i8c dc,h,v,p: 37% 18% 37% 8%
[libx264 @ 0x1f8c420] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x1f8c420] ref P L0: 71.3% 6.0% 20.0% 2.7%
[libx264 @ 0x1f8c420] ref B L0: 75.1% 17.8% 7.1%
[libx264 @ 0x1f8c420] ref B L1: 93.6% 6.4%
[libx264 @ 0x1f8c420] kb/s:53.48
Input #0, matroska,webm, from 'test.mkv':
Metadata:
ENCODER : Lavf57.23.101
Duration: 00:00:01.00, start: 0.000000, bitrate: 66 kb/s
Stream #0:0: Video: h264 (High), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
Metadata:
ENCODER : Lavc57.24.101 libx264
DURATION : 00:00:01.000000000
[libx264 @ 0x16e3c00] broken ffmpeg default settings detected
[libx264 @ 0x16e3c00] use an encoding preset (e.g. -vpre medium)
[libx264 @ 0x16e3c00] preset usage: -vpre <speed> -vpre <profile>
[libx264 @ 0x16e3c00] speed presets are listed in x264 --help
[libx264 @ 0x16e3c00] profile is optional; x264 defaults to high
Cannot open video encoder for stream #0
Error occurred: Generic error in an external library
/tmp
[OK]
02:34:46j@zver /tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment