Pardon my learning curve...it never occurred to me that interlaced video could 
be stored in one order and displayed in another order.
The enclosed patch is less erroneous than the previously-sent one.



________________________________
 From: Steven Boswell II <ulat...@yahoo.com>
To: For kdenlive developers <kdenlive-devel@lists.sourceforge.net> 
Sent: Saturday, January 26, 2013 7:20 PM
Subject: Re: [Kdenlive-devel] Rendering interlaced video to HuffYUV
 

The bug fix to ffmpeg I mentioned earlier, the one that fixes packing raw video 
into a .mov container, has an implication which breaks the recent fix to raw 
video handling in mlt.  Enclosed is a patch that makes mlt work with both the 
original ffmpeg as well as the patched one.

I don't know why both methods of setting the video interlacing in a stream are 
necessary, but that's a question for dedicated ffmpeg hackers.

Given my research into what works and what doesn't, you may want to consider 
changing the container type on kdenlive's HuffYUV export from avi to mov, so 
that interlacing is preserved.


Steven Boswell
diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c
index 9710be3..d206be5 100644
--- a/src/modules/avformat/consumer_avformat.c
+++ b/src/modules/avformat/consumer_avformat.c
@@ -1847,6 +1847,10 @@ static void *consumer_thread( void *arg )
 						// Set frame interlace hints
 						c->coded_frame->interlaced_frame = !mlt_properties_get_int( frame_properties, "progressive" );
 						c->coded_frame->top_field_first = mlt_properties_get_int( frame_properties, "top_field_first" );
+						if (mlt_properties_get_int( frame_properties, "progressive" ) > 0)
+							c->field_order = AV_FIELD_PROGRESSIVE;
+						else
+							c->field_order = (mlt_properties_get_int( frame_properties, "top_field_first" )) ? AV_FIELD_TT : AV_FIELD_BB;
 
 						pkt.flags |= PKT_FLAG_KEY;
 						pkt.stream_index= video_st->index;
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Kdenlive-devel mailing list
Kdenlive-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kdenlive-devel

Reply via email to