[FFmpeg-user] -pix_fmt yuv420p and deinterlacing

Katherine Frances knfrances at gmail.com
Sun Feb 26 13:11:59 EET 2017


Thanks again, Andy.
So if I understand correctly:

   1.  *-vf scale=interl=1* registers to libx264 that the input is
   interlaced and to be 'aware' of that in future operations. *yadif*, of
   course, does the actual deinterlacing.
   2. If used in the same script, *scale* must precede *yadif. *Although it
   seems rather redundant.
   3. If deinterlacing with *yadif*, *yadif* should precede chroma
   downsampling (via *-pix_fmt yuv420p*). In other words, the subsampling
   scheme should be changed after the deinterlacing step.
      - like this, for example?: ffmpeg -i uncompressed_master.mov -c:v
      libx264 -vf yadif -pix_fmt yuv420p -c:a libfdk_aac -b:a 128k
access_copy.mp4
      4. If using all three of these options, deinterlacing must be
   preceded by chroma downsampling *and *-vf scale=interl=1
      - Is the correct order then *scale *-> *pix_fmt* -> *deinterlace* ?

As for yadif mode, I'm only interested in frame rate output (send_frame
<https://ffmpeg.org/ffmpeg-filters.html#yadif-1>, which is the default
anyway).

I really appreciate you taking the time to help me. I'm learning a lot!

Best, K.


On Sun, Feb 26, 2017 at 11:34 PM, Andy Furniss <adf.lists at gmail.com> wrote:

> Katherine Frances wrote:
>
>> Kia ora,
>>
>> *Andy*: thanks very much for this tip! Will add that filter to the script
>> as I definitely want to deinterlace.
>> Do you recommend this over *yadif*, or do I need to combine *scale* with a
>> deinterlacing filter?
>>
>
> -vf scale=interl=1 Has nothing to do with de-interlacing it would be
> needed more if you wanted to keep the interlacing.
>
> yadif can de-interlace 422 input so if you used that *first* it
> shouldn't matter. It would be wrong to convert 422 to 420 without
> -vf scale=interl=1 if you then later de-interlaced, so the order
> of filters matters.
>
> yadif can produce field rate or frame rate output. It's field rate
> that will look worse if you mess up the 422 to 420 conversion.
>
> What to do depends on your content. If there's lots of motion then
> field rate de-interlace (yadif=1) will look better. If it's interlaced
> but low motion you will get away with frame rate (yadif=0).
> Depending on what the masters are they may not be interlaced to start
> with.
>
> The right thing to do depends on what the output is for and what the
> input really is - there is no right way as such.
>
>
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-user mailing list