<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1495186642485_21477" dir="ltr">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.</div><div class="qtdSeparateBR" id="yui_3_16_0_ym19_1_1495186642485_21478"><br></div><div class="qtdSeparateBR" id="yui_3_16_0_ym19_1_1495186642485_21478" dir="ltr">After setting it to the correct pix_fmt, the quality was very poor, so I altered the qmin/qmax to 2.  Voila!<br><br><br><br>A few of my questions remain:</div><div class="qtdSeparateBR" id="yui_3_16_0_ym19_1_1495186642485_21478" dir="ltr"><br><div dir="ltr" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1495186642485_37291">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?<br id="yui_3_16_0_ym19_1_1495186642485_37292"></div><div dir="ltr" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1495186642485_37293"><br></div><div dir="ltr" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1495186642485_37299">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?<br id="yui_3_16_0_ym19_1_1495186642485_37300"></div><div dir="ltr" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1495186642485_37301"><br id="yui_3_16_0_ym19_1_1495186642485_37302"></div><div dir="ltr" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1495186642485_37303">3. Out of interest, can I use SWScale to convert the color primaries/ranges?</div><div dir="ltr" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1495186642485_37303"><br></div><div dir="ltr" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1495186642485_37303">Gavin.</div><br id="yui_3_16_0_ym19_1_1495186642485_37271"><br id="yui_3_16_0_ym19_1_1495186642485_37863"></div><div class="yahoo_quoted" id="yui_3_16_0_ym19_1_1495186642485_21484" style="display: block;">  <div style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 13px;" id="yui_3_16_0_ym19_1_1495186642485_21483"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1495186642485_21482"> <div dir="ltr" id="yui_3_16_0_ym19_1_1495186642485_21481"> <font size="2" face="Arial" id="yui_3_16_0_ym19_1_1495186642485_21480"> <hr size="1" id="yui_3_16_0_ym19_1_1495186642485_21479"> <b id="yui_3_16_0_ym19_1_1495186642485_37829"><span style="font-weight:bold;" id="yui_3_16_0_ym19_1_1495186642485_37828">From:</span></b> Gavin Smith <gcs584-at-yahoo.com@ffmpeg.org><br> <b id="yui_3_16_0_ym19_1_1495186642485_37868"><span style="font-weight: bold;" id="yui_3_16_0_ym19_1_1495186642485_37867">To:</span></b> "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter." <libav-user@ffmpeg.org> <br> <b id="yui_3_16_0_ym19_1_1495186642485_37870"><span style="font-weight: bold;" id="yui_3_16_0_ym19_1_1495186642485_37869">Sent:</span></b> Friday, 19 May 2017, 11:24<br> <b id="yui_3_16_0_ym19_1_1495186642485_37872"><span style="font-weight: bold;" id="yui_3_16_0_ym19_1_1495186642485_37871">Subject:</span></b> Re: [Libav-user] DV50 to M2V Artefacts (Color Ranges)<br> </font> </div> <div class="y_msg_container" id="yui_3_16_0_ym19_1_1495186642485_21485"><br><div id="yiv0858408624"><div id="yui_3_16_0_ym19_1_1495186642485_21487"><div style="color:#000;background-color:#fff;font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px;" id="yui_3_16_0_ym19_1_1495186642485_21486"><div id="yiv0858408624yui_3_16_0_ym19_1_1495186642485_13010"><br clear="none">Carl, I think you have given me something to go on.</div><div id="yiv0858408624yui_3_16_0_ym19_1_1495186642485_13010"><br clear="none"></div><div id="yiv0858408624yui_3_16_0_ym19_1_1495186642485_13010">I tried both:<br clear="none">ffmpeg -i file.mxf -vcodec libx264 -b:v 1200k ./output.ts</div><div class="yiv0858408624qtdSeparateBR" dir="ltr" id="yiv0858408624yui_3_16_0_ym19_1_1495186642485_13043">ffmpeg -i file.mxf -vcodec mpeg2ideo -b:v 1200k ./output.ts</div><div class="yiv0858408624qtdSeparateBR" dir="ltr" id="yiv0858408624yui_3_16_0_ym19_1_1495186642485_13043"><br clear="none"></div><div class="yiv0858408624qtdSeparateBR" dir="ltr" id="yiv0858408624yui_3_16_0_ym19_1_1495186642485_13043"><br clear="none"></div><div class="yiv0858408624qtdSeparateBR" dir="ltr" id="yiv0858408624yui_3_16_0_ym19_1_1495186642485_13043">...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.<br clear="none"></div><div class="yiv0858408624qtdSeparateBR" dir="ltr" id="yiv0858408624yui_3_16_0_ym19_1_1495186642485_13043"><br clear="none"></div><div id="yiv0858408624yui_3_16_0_ym19_1_1495186642485_14047"><br clear="none"></div><div id="yiv0858408624yui_3_16_0_ym19_1_1495186642485_14046">Gavin.</div><div class="yiv0858408624qtdSeparateBR" dir="ltr" id="yiv0858408624yui_3_16_0_ym19_1_1495186642485_13043"><br clear="none"></div><div class="yiv0858408624yahoo_quoted" id="yiv0858408624yui_3_16_0_ym19_1_1495186642485_13018" style="display:block;">  <div id="yiv0858408624yui_3_16_0_ym19_1_1495186642485_13017" style="font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px;"> <div id="yiv0858408624yui_3_16_0_ym19_1_1495186642485_13016" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px;"> <div class="yiv0858408624yqt6093317352" id="yiv0858408624yqt75854"><div dir="ltr" id="yiv0858408624yui_3_16_0_ym19_1_1495186642485_13041"> <font id="yiv0858408624yui_3_16_0_ym19_1_1495186642485_13042" size="2" face="Arial"> </font><br> </div></div></div></div></div></div></div></div><br></div> </div> </div>  </div></div></body></html>