Hi David,

On 4/7/2017 3:18 PM, David Noble wrote:
> Hi
>
> I've got a couple 1080i25 sources[1], [2] that I'm trying to output to
> a 1080p50 avformat consumer, and I seem to be struggling!
>
> It seems that there's some interesting quirks in how mlt behaves
> contra how the yadif deinterlacer in ffmpeg works. I'm aiming for an
> output that looks like this: [3]; created using the following ffmpeg
> command:
>
> % ffmpeg -i 5sec.mov -vf yadif=1 5sec.mp4
>
> So, my first attempt here was to try and get the avformat consumer to
> do the deinterlacing for me:
>
> % melt -profile atsc_1080i_50 -producer 5sec.mov  -consumer
> avformat:lol1.mp4 -deinterlace
>
> This yielded this: [4]. Interestingly, this was a correctly interlaced
> 1080i25 file. Next up, I tried telling the consumer that I actually
> wanted a 50fps file.
>
> % melt -profile atsc_1080i_50 -producer 5sec.mov  -consumer
> avformat:lol2.mp4 mlt_profile=atsc_1080p_50
>
> However, this is where things started going wrong. The resulting file
> [5] had the correct number of frames, and the right number of frames
> per second; e.g. it was a 1080p50 file, but the content was 25p; where
> frames had been repeated to make up. Half of the temporal information
> had been lost. It appears yadif is used, but not in frame doubling
> mode.
>
<snip>

I understand exactly what you are trying to do. The short answer is the 
MLT does not support frame-doubling deinterlacing. The expected behavior 
of your command is that MLT will deinterlace two fields into one frame 
and then double those resulting frames to achieve the requested frame 
rate. No matter how hard you try, you will lose temporal information if 
you deinterlace in MLT.

I pursued this some time ago:
http://mlt-devel.narkive.com/xJ5RNWDu/yadif-doubler
The architecture of MLT makes this feature quite tricky.

After I grasped the difficulty of adding the feature to MLT, I decided 
instead to add a step to my workflow to normalize all my files. Here are 
some scripts which I use and you are welcome to use/modify:
https://gist.github.com/bmatherly/e39fb68c876161d5b17b
https://gist.github.com/bmatherly/8995878
The extra encode step concerned me, as well. But I found that dnxhd 
provides "loss-less enough" quality for all my own needs.

Also, I would mention that since I wrote those scripts, ffmpeg has added 
a new deinterlacing filter that combines the strengths of the yadiff and 
w3fdif filters:
http://ffmpeg.org/ffmpeg-filters.html#bwdif
I have had very good luck with the deinterlacing quality using the bwdif 
filter.

Cheers,

~Brian


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to