[FFmpeg-user] Near lossless encoding is it even possible?

Nicolas George nicolas.george at normalesup.org
Tue Dec 27 12:37:08 CET 2011

Le septidi 7 nivôse, an CCXX, David Klasinc a écrit :
> If I capture with:
> $ ffmpeg -y -f x11grab -r 25 -s 800x800 -i :0.0+0,0 \
>   -vcodec huffyuv lala.avi
> And play with mplayer -vo x11 the output is crystal clear.

Then my lucky guess was right.

>							      If I encode
> with x264 and use -vo x11 the output is still not what I want it to be,
> but different than when I don't use -vo x11. Here's the comparison:

The problem you have is in fact the same, either at encoding time or at
playback time (when using mplayer without -vo x11):

> Incompatible pixel format 'bgra' for codec 'libx264', auto-selecting
> format 'yuv420p'

The pixel format yuv420p subsamples the chrominance channels at half the
resolution. You need to use another pixel format. When you used hufyuv, the
encoding was done in RGB, without subsampling, but the playback was
converted to yuv420 by mplayer to use the Xv driver.

When using x264, you can not use RGB, you need to explicitly use a pixel
format that does not subsamples. I believe it is called something like
yuv444, although the exact meaning of each digit still baffles me.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20111227/dfa73aad/attachment.asc>

More information about the ffmpeg-user mailing list