[Kdenlive-devel] Rendering interlaced video to HuffYUV

Dan Dennedy dan at dennedy.org
Fri Jan 25 04:33:45 UTC 2013


On Thu, Jan 24, 2013 at 7:00 PM, Steven Boswell II <ulatekh at yahoo.com> wrote:
>>>The avformat consumer sets ILME and ILDCT on the AVCodecContext flags
>>>when the mlt profile/consumer is set for non-progressive output.  It
>>>is not clear to me if that information is passed to the libavformat
>>>yuv4mpegpipe.
>>
>>It also sets the interlaced and top_field_first fields of the AVFrame,
>>except in the case of rawvideo!  Rawvideo output has some special
>>handling.  I just committed a fix for it and verified the header field
>>of yuv4mpeg output ...
>
> Thanks once again for fixing the raw YUV output so quickly!
>
> I'm getting the same problem with HuffYUV rendering -- my interlaced video
> ends up progressive.
> To be fair, "ffmpeg -i input.yuv -vcodec huffyuv output.avi" also loses my
> interlaced flag (at least according to "ffmpeg -i output.avi -vcodec
> rawvideo -f yuv4mpegpipe - | head -1").
> I don't suppose this would be another quick, easy fix...?

I looked into it a bit, and I am not sure what is going on. I first
looked at libavcodec/huffyuv.c, and I see some things about setting
interlace. It seems to respond to the ilme flag, which melt does set
automatically. At the ffmpeg command line you can use '-flags +ilme'
to turn it on - not sure that it automatically relays that info from
input to output like melt.

Next, how to check the outputs of some test encodes? I can use 'melt
test.avi -consumer xml' and look at the generated profile. I can use
mediainfo, and I can use ffprobe. All of them say no interlace with
AVI output. Maybe it is just a problem with AVI; try MOV. mediainfo
shows interlaced! But ffprobe -show_frames says they are not
interlaced! hmm... that explains why melt reports it as progressive.
And 'ffmpeg -i test.mov -f yuv4mpegpipe - | hexdump -C -n 32' on a
ffmpeg transcode also shows progressive (Ip). So, yeah, I am not sure
how to reliably output progressive HuffYUV or even how to reliably
decode it as progressive.

The truth lies somewhere in the source huffyuv.c (and possibly
others), but my quick scan of the interlaced handling did not reveal
anything more obvious and some parts of it looked a bit funky
(heuristics based on vertical resolution). If you can figure out
ffmpeg command lines that show how to output interlaced huffyuv and
verify it (preferably with ffprobe and not mediainfo's magic), that
would help. Otherwise, I have something big I am working on for MLT at
the moment and cannot give this much attention at this time.

-- 
+-DRD-+




More information about the Kdenlive mailing list