[Kdenlive-devel] Rendering to raw YUV (with fix)

Dan Dennedy dan at dennedy.org
Mon Jan 21 05:05:05 UTC 2013


On Sun, Jan 20, 2013 at 8:32 PM, Dan Dennedy <dan at dennedy.org> wrote:
> On Sun, Jan 20, 2013 at 7:54 PM, Steven Boswell II <ulatekh at yahoo.com> wrote:
>> Hello!  I followed the instructions at
>> http://kdenlive.org/contribution-manual/how-submit-patch -- I submitted a
>> bug report, which can be found at
>> http://www.kdenlive.org/mantis/view.php?id=2953 , and now I'm mailing the
>> kdenlive-devel list.
>>
>> My patch allows rendering to raw YUV.  I wanted this feature because I want
>> to clean up my video clip (e.g. brightness, contrast) in kdenlive, then
>> export it to raw YUV for processing in mjpegtools (where I'm one of the
>> developers), then bring it back into kdenlive for editing/FX/etc.
>>
>> The problem is that the exported raw-video is marked as progressive, even
>> though the parameters passed to MLT say that the video is not progressive!
>> (My input video is miniDV, which is bottom-field-first interlaced.)  I know
>> how to fix this in mjpegtools, but I'm looking to fix the original problem.
>> This may be an MLT bug, in which case I'll keep digging there.  But in
>> kdenlive, the "top" property in ProducerAvFormat (see
>> http://www.mltframework.org/bin/view/MLT/ProducerAvformat for more info)
>> doesn't appear to ever be set!
>
> A producer is for the input. The avformat consumer is for output. The
> avformat producer's top property does not need to be set with a DV
> input unless you are trying to override the detected field order.
>
> The avrformat 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. There might
>

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:

melt ~/Videos/PAL.dv -consumer avformat:test.y4m
head test.y4m
YUV4MPEG2 W720 H576 F25:1 Ib A16:15 C420jpeg XYSCSS=420JPEG


P.S. please be aware that if you change the vertical resolution of an
interlaced clip in any way, it is automatically deinterlaced because
there is no field-aware scaler.
-- 
+-DRD-+




More information about the Kdenlive mailing list