[FFmpeg-user] bgra to yuv

Josh long funkyirish at gmail.com
Tue Mar 27 04:12:52 CEST 2012

> Converting from one colorspace to another one may not be lossless.
> So if you do not want distortions at all only colorspace conversions which
> are
> actually lossless should be used.
> Aah, I've realized that ffmpeg first converts to yuv420 and then employs
the libschroedinger codec.  For some reason I've been under the impression
that yuv444p and bgra are lossless equivalents, so now I use the following


  char out[120];
  int a;
  sprintf(out,"ffmpeg -i 0libschbgra%d.avi -vcodec rawvideo -pix_fmt
yuv444p -q 0 -global_quality 0 0libsch444%d.avi\n",a,a);
  sprintf(out,"ffmpeg -i 0libsch444%d.avi -vcodec libschroedinger -q 0
-global_quality 0 0libsch%d.avi\n",a,a);
  sprintf(out,"ffmpeg -i 0libsch%d.avi -vcodec rawvideo -pix_fmt bgra -q 0

This ends up in garbage as well so I'm going to try to convert to yuv444p
once and then stay there;  I'll post that when it finishes.  However I've
noticed that after converting from bgra to yuv444p my video is all
grayscale and split into 9 sections  which consist of 3 seemingly repeated
columns of three different rows.  Is this a bug in vlc, or am I just doing
this wrong?
Thanks for the help again, I think this is getting closer.

I'm also going to try converting to yuva444p, and then yuv444p in case that
works better.


More information about the ffmpeg-user mailing list