[Mlt-devel] Fwd: MLT patch to handle field-based videos
Brought to you by:
ddennedy,
lilo_booter
From: Dan D. <da...@de...> - 2009-03-24 19:50:30
|
Here is the last message from Ivan that contains the patches for both FFmpeg (seek.patch) and MLT (reorder.patch). ---------- Forwarded message ---------- From: Ivan Schreter <sch...@gm...> Date: Sat, Mar 7, 2009 at 3:41 PM Subject: Re: MLT patch to handle field-based videos To: Dan Dennedy <da...@de...> Hi Dan, Dan Dennedy wrote: On Thu, Mar 5, 2009 at 8:50 AM, Ivan Schreter <sch...@gm...> <sch...@gm...> wrote: With my FFmpeg & MLT patches locally, it seems to work just right. I still do not understand what ffmpeg patch to apply. I am subscribed to the ffmpeg-devel list, but if you can refer to a subject line or name of patch file attachments, I would appreciate it. In FFmpeg HEAD, most of my patches are already in. You just need to apply seeking patch. I attached it for your reference. It's not the newest version and most probably it will break seeking in some formats (notably AVI), but MPEG-TS should work with it (both AVCHD and MPEG-2, though I didn't test it with MPEG-2). NOTE: In this version of the patch, there is an issue when seeking to frame 0 (it will skip first frame, causing distorted video until second keyframe). I've already fixed it, but I can't provide a clean patch right now (too late for today). What issues do you see? I have not patched ffmpeg, and I updated ffmpeg from svn the day I gave my last report. Namely, HDV does not work at all, which, you know, uses mpeg2ts. Does the MLT patch require the ffmpeg patch even for ts containing mpeg2 video? When I reported a problem with an in point on a MPEG-2 Program Stream, I was incorrect about the file I was testing. It was actually MPEG-1 video. I found a MPEG-2 PS, and it was playing choppy. A H.264 MOV is working. I have not done a whole of testing. Your patch did not apply cleanly, and I removed some things I felt unnecessary. Here is the patch I am currently using. Let me know if there is something I did not remove that you think is critical. Yeah, you removed the whole timestamp reordering code (reordered_opaque), so no wonder it doesn't work :-) This code is independent of seeking patch, it must be in anyway to correctly determine PTS of the decoded picture. "timestamp -= AV_TIME_BASE" is thrown out on purpose to actually seek to correct position. With this "one second backward extra", you effectively worked around bugs in MPEG-TS (and possibly other demuxers), which don't position the stream to a key frame. So when this is removed, my FFmpeg patch _is_ necessary, for all formats. If you leave it in, it should work without my FFmpeg patch (but with suboptimal seeking speed - about factor 3 slower). I attach a patch based on your one with some additional changes that make it work again. This one should apply cleanly. Regards, Ivan |