[Libav-user] DV50 to M2V Artefacts (Color Ranges)

Gavin Smith gcs584 at yahoo.com
Fri May 19 13:53:48 EEST 2017

I was being very silly.  The input pix_fmt to the encoder was 'YUV422P'; however, I was setting it to 'YUV420P' :/  I think I was distracting myself with the color ranges/primaries configuration.
After setting it to the correct pix_fmt, the quality was very poor, so I altered the qmin/qmax to 2.  Voila!

A few of my questions remain:
1. The color characteristics of the DV's AVCodecContext and AVFrame are not explicitly set; they are all 'not specified'.  I tried a MPEG clip from the same set of test clips and the same result. Is that common for the other decoders too? Is this considered a bug?  If they're not set, should I explicitly set the values?

2. DV video is bottom field.  How does FFmpeg handle this?  On decoding can I transition all the lines down by 1 line to change the order?  Is there a function to perform this operation?

3. Out of interest, can I use SWScale to convert the color primaries/ranges?

      From: Gavin Smith <gcs584-at-yahoo.com at ffmpeg.org>
 To: "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter." <libav-user at ffmpeg.org> 
 Sent: Friday, 19 May 2017, 11:24
 Subject: Re: [Libav-user] DV50 to M2V Artefacts (Color Ranges)

Carl, I think you have given me something to go on.
I tried both:
ffmpeg -i file.mxf -vcodec libx264 -b:v 1200k ./output.tsffmpeg -i file.mxf -vcodec mpeg2ideo -b:v 1200k ./output.ts

...and the transcoded clip was fine. I didn't need to lower the default quantizer.  I'll try write a sample application to try uncover my problem.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20170519/818f25f1/attachment.html>

More information about the Libav-user mailing list