[FFmpeg-user] Screencast looks foggy

Andre Kloth ffmpeg-users at blubbmon.de
Fri Nov 16 18:17:41 CET 2012


when I record a screencast for a presentation the video looks "foggy":


You can see this "fog" at the white background or the red colored lines (and 
especially with black background - not recorded in the video). On the screen 
these lines appear correctly as strong red (in Qt it's just #ff0000).

My recording command is (output is attached):

ffmpeg -f x11grab -r 25 -s 1680x1050 -i :0.0 -vcodec libx264 -preset ultrafast 
-crf 0 -sameq -threads 0 -timelimit 1800 test.mkv

I searched around for other codecs that give me almost the same quality and 
output bit rate, but couldn't find any. With huffyuv the file size explodes :) 
(and the problem remains)

However, I'm not sure if the problem results from the conversion from BGRA to 
YUV420p when recording with x264 (ffmpeg output: "Incompatible pixel format 
'bgra' for codec 'libx264', auto-selecting format 'yuv420p'").

Maybe I should just apply some gamma correction?

Do you have any other suggestions?

Best regards,
-------------- next part --------------
ffmpeg -f x11grab -r 25 -s 1680x1050 -i :0.0 -vcodec libx264 -preset ultrafast -crf 0  -sameq -threads 0 -timelimit 1800 test.mkv
ffmpeg version 0.10.3 Copyright (c) 2000-2012 the FFmpeg developers
  built on Nov 16 2012 14:51:31 with gcc 4.5.3
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-O2 -pipe -march=core2 -mcx16 -msahf -mpopcnt -msse4.2 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=256 -mtune=core2' --extra-cflags='-O2 -pipe -march=core2 -mcx16 -msahf -mpopcnt -msse4.2 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=256 -mtune=core2' --extra-cxxflags='-O2 -pipe -march=core2 -mcx16 -msahf -mpopcnt -msse4.2 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=256 -mtune=core2' --disable-static --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --disable-stripping --disable-debug --disable-vaapi --disable-vdpau --enable-openssl --enable-nonfree --enable-libmp3lame --enable-libvo-aacenc --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --disable-indev=v4l --disab  libavutil      51. 35.100 / 51. 35.100
  libavcodec     53. 61.100 / 53. 61.100
  libavformat    53. 32.100 / 53. 32.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 61.100 /  2. 61.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    52.  0.100 / 52.  0.100
[x11grab @ 0x63ec50] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1680 height: 1050
[x11grab @ 0x63ec50] shared memory extension found
[x11grab @ 0x63ec50] Estimating duration from bitrate, this may be inaccurate
Input #0, x11grab, from ':0.0':
  Duration: N/A, start: 1353084374.201919, bitrate: 1411200 kb/s
    Stream #0:0: Video: rawvideo (BGRA / 0x41524742), bgra, 1680x1050, 1411200 kb/s, 25 tbr, 1000k tbn, 25 tbc
Incompatible pixel format 'bgra' for codec 'libx264', auto-selecting format 'yuv420p'
[buffer @ 0x63f1a0] w:1680 h:1050 pixfmt:bgra tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0x64e0d0] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out'
[scale @ 0x64e3e0] w:1680 h:1050 fmt:bgra -> w:1680 h:1050 fmt:yuv420p flags:0x4
[libx264 @ 0x64ce60] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0x64ce60] profile High 4:4:4 Predictive, level 4.0, 4:2:0 8-bit
[libx264 @ 0x64ce60] 64 - core 120 - 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 'test.mkv':
    encoder         : Lavf53.32.100
    Stream #0:0: Video: h264, yuv420p, 1680x1050, q=-1--1, 1k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> libx264)

More information about the ffmpeg-user mailing list