Code:
user:~$ ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s 1024x768 -i :0.0 -acodec pcm_s16le -vcodec libx264 -preset ultrafast -crf 0 -threads 0 output.mkv
ffmpeg version git-2012-01-26-ee0cab7 Copyright (c) 2000-2012 the FFmpeg developers
built on Jan 26 2012 13:25:36 with gcc 4.6.1
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx
libavutil 51. 34.101 / 51. 34.101
libavcodec 53. 60.100 / 53. 60.100
libavformat 53. 31.100 / 53. 31.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 60.100 / 2. 60.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100
[alsa @ 0xa5eeb60] Estimating duration from bitrate, this may be inaccurate
Input #0, alsa, from 'pulse':
Duration: N/A, start: 1327641305.824548, bitrate: N/A
Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
[x11grab @ 0xa5e9040] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1024 height: 768
[x11grab @ 0xa5e9040] shared memory extension found
[x11grab @ 0xa5e9040] Estimating duration from bitrate, this may be inaccurate
Input #1, x11grab, from ':0.0':
Duration: N/A, start: 1327641305.876321, bitrate: 754974 kb/s
Stream #1:0: Video: rawvideo (BGRA / 0x41524742), bgra, 1024x768, 754974 kb/s, 30 tbr, 1000k tbn, 30 tbc
File 'output.mkv' already exists. Overwrite ? [y/N] y
Incompatible pixel format 'bgra' for codec 'libx264', auto-selecting format 'yuv420p'
[buffer @ 0xa60a940] w:1024 h:768 pixfmt:bgra tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0xa60ac20] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out'
[scale @ 0xa60b180] w:1024 h:768 fmt:bgra -> w:1024 h:768 fmt:yuv420p flags:0x4
[libx264 @ 0xa5efee0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0xa5efee0] profile High 4:4:4 Predictive, level 3.1, 4:2:0 8-bit
[libx264 @ 0xa5efee0] 64 - core 120 r2146 bcd41db - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=0 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=cqp mbtree=0 qp=0
Output #0, matroska, to 'output.mkv':
Metadata:
encoder : Lavf53.31.100
Stream #0:0: Video: h264, yuv420p, 1024x768, q=-1--1, 1k tbn, 30 tbc
Stream #0:1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
Stream mapping:
Stream #1:0 -> #0:0 (rawvideo -> libx264)
Stream #0:0 -> #0:1 (pcm_s16le -> pcm_s16le)
Press [q] to stop, [?] for help
frame= 10 fps= 0 q=0.0 size= 513kB time=00:00:02.70 bitrate=1553.6kbits/s
frame= 21 fps= 20 q=0.0 size= 673kB time=00:00:03.30 bitrate=1669.2kbits/s
frame= 30 fps= 19 q=0.0 size= 769kB time=00:00:03.73 bitrate=1685.8kbits/s
frame= 42 fps= 20 q=0.0 size= 929kB time=00:00:04.36 bitrate=1741.6kbits/s
frame= 54 fps= 21 q=0.0 size= 1089kB time=00:00:04.90 bitrate=1819.6kbits/s
frame= 65 fps= 21 q=0.0 size= 1219kB time=00:00:05.40 bitrate=1849.0kbits/s
frame= 75 fps= 21 q=0.0 size= 1315kB time=00:00:05.83 bitrate=1846.3kbits/s
frame= 85 fps= 20 q=0.0 size= 1475kB time=00:00:06.36 bitrate=1897.6kbits/s
frame= 97 fps= 21 q=0.0 size= 1603kB time=00:00:06.96 bitrate=1884.6kbits/s
frame= 107 fps= 20 q=0.0 size= 1731kB time=00:00:07.43 bitrate=1907.3kbits/s
video:1619kB audio:5106kB global headers:0kB muxing overhead 2.138274%
[libx264 @ 0xa5efee0] frame I:3 Avg QP: 0.00 size: 4446
[libx264 @ 0xa5efee0] frame P:500 Avg QP: 0.00 size: 3288
[libx264 @ 0xa5efee0] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0xa5efee0] mb P I16..4: 94.0% 0.0% 0.0% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip: 6.0%
[libx264 @ 0xa5efee0] coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0% inter: 0.0% 0.0% 0.0%
[libx264 @ 0xa5efee0] i16 v,h,dc,p: 100% 0% 0% 0%
[libx264 @ 0xa5efee0] i8c dc,h,v,p: 98% 2% 0% 0%
[libx264 @ 0xa5efee0] kb/s:479.23
user:~$ ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s 1022x768 -i :0.0 -acodec pcm_s16le -vcodec libx264 -preset ultrafast -crf 0 -threads 0 output.mkv
ffmpeg version git-2012-01-26-ee0cab7 Copyright (c) 2000-2012 the FFmpeg developers
built on Jan 26 2012 13:25:36 with gcc 4.6.1
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx
libavutil 51. 34.101 / 51. 34.101
libavcodec 53. 60.100 / 53. 60.100
libavformat 53. 31.100 / 53. 31.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 60.100 / 2. 60.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100
[alsa @ 0xa770b60] Estimating duration from bitrate, this may be inaccurate
Input #0, alsa, from 'pulse':
Duration: N/A, start: 1327641350.964678, bitrate: N/A
Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
[x11grab @ 0xa76b040] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1022 height: 768
[x11grab @ 0xa76b040] shared memory extension found
[x11grab @ 0xa76b040] Estimating duration from bitrate, this may be inaccurate
Input #1, x11grab, from ':0.0':
Duration: N/A, start: 1327641351.023040, bitrate: 753500 kb/s
Stream #1:0: Video: rawvideo (BGRA / 0x41524742), bgra, 1022x768, 753500 kb/s, 30 tbr, 1000k tbn, 30 tbc
File 'output.mkv' already exists. Overwrite ? [y/N] y
Incompatible pixel format 'bgra' for codec 'libx264', auto-selecting format 'yuv420p'
[buffer @ 0xa78c8c0] w:1022 h:768 pixfmt:bgra tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0xa78cba0] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out'
[scale @ 0xa78d100] w:1022 h:768 fmt:bgra -> w:1022 h:768 fmt:yuv420p flags:0x4
[libx264 @ 0xa771f40] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0xa771f40] profile High 4:4:4 Predictive, level 3.1, 4:2:0 8-bit
[libx264 @ 0xa771f40] 64 - core 120 r2146 bcd41db - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=0 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=cqp mbtree=0 qp=0
Output #0, matroska, to 'output.mkv':
Metadata:
encoder : Lavf53.31.100
Stream #0:0: Video: h264, yuv420p, 1022x768, q=-1--1, 1k tbn, 30 tbc
Stream #0:1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
Stream mapping:
Stream #1:0 -> #0:0 (rawvideo -> libx264)
Stream #0:0 -> #0:1 (pcm_s16le -> pcm_s16le)
Press [q] to stop, [?] for help
frame= 7 fps= 0 q=0.0 size= 1kB time=00:00:00.00 bitrate= 0.0kbits/s
frame= 11 fps= 10 q=0.0 size= 545kB time=00:00:02.76 bitrate=1611.8kbits/s
frame= 17 fps= 10 q=0.0 size= 673kB time=00:00:03.40 bitrate=1620.1kbits/s
frame= 22 fps= 10 q=0.0 size= 769kB time=00:00:03.90 bitrate=1613.2kbits/s
frame= 28 fps= 10 q=0.0 size= 929kB time=00:00:04.53 bitrate=1677.1kbits/s
frame= 33 fps= 10 q=0.0 size= 1025kB time=00:00:05.00 bitrate=1678.4kbits/s
frame= 38 fps= 10 q=0.0 size= 1142kB time=00:00:05.50 bitrate=1700.4kbits/s
frame= 43 fps= 10 q=0.0 size= 1270kB time=00:00:06.06 bitrate=1714.3kbits/s
frame= 48 fps= 10 q=0.0 size= 1366kB time=00:00:06.56 bitrate=1703.5kbits/s
frame= 53 fps= 10 q=0.0 size= 1494kB time=00:00:07.11 bitrate=1719.7kbits/s
video:419kB audio:2819kB global headers:0kB muxing overhead 2.428442%
[libx264 @ 0xa771f40] frame I:1 Avg QP: 0.00 size: 4442
[libx264 @ 0xa771f40] frame P:129 Avg QP: 0.00 size: 3288
[libx264 @ 0xa771f40] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0xa771f40] mb P I16..4: 94.0% 0.0% 0.0% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip: 6.0%
[libx264 @ 0xa771f40] coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0% inter: 0.0% 0.0% 0.0%
[libx264 @ 0xa771f40] i16 v,h,dc,p: 100% 0% 0% 0%
[libx264 @ 0xa771f40] i8c dc,h,v,p: 98% 2% 0% 0%
[libx264 @ 0xa771f40] kb/s:215.19
I notice this behavior especially when there is any kind of animation on the screen (in this case a running video).
Bookmarks