>> I'd like to implement a deinterlace mode similar to the VLC Yadifx2 filter >> that produces a unique frame from each field (bob) with interpolation. But > Does this output images at half the video's vertical resolution?
For each field on the input, it outputs a full resolution frame on the output by interpolating missing lines. My understanding is that the interpolation can be quite sophisticated - using information from fields before and after to perform the interpolation. >> I'm not sure if this is possible in MLT because the filter would have to >> change the frame rate of the producer. >> >> One idea i have is to intercept the deinterlace mode in producer_avformat >> and attach the libavfilter yadif filter with mode=1 > > libavfilter needs more investigation into how it can fit into MLT. > Last time I looked, it looked like it had some internal buffering that > could make it tricky, but I could be wrong. Also the mapping of > parameters into mlt_properties needs investigation. I'll do some thinking about a generic libafilter wrapper. Last time I looked, there weren't many compelling filters in libavfilter that aren't covered by frei0r, etc. >> http://www.ffmpeg.org/ffmpeg-filters.html#yadif-1 >> But this seems like a hack. >> >> Any other ideas of how I could go about this? > > Not sure right now. Frame rate handling needs more work in general. > Take a look at the framebuffer producer. That serves as an example of > not only what could be done but also points at something that needs > solving in general. For example, the dgraft/telecide filter for > inverse telecine has frame rate reduction needs as well. Maybe > mlt_producer needs to be enhanced. Ok. Those were helpful examples. I've identified some constraints of the filter system (which I'm sure you are already well aware of): 1) A filter can not change the frame rate of a producer. This might be used for a deinterlace or a telecine/reverse-telecine filter. It could also be used to normalize the native frame rate to the profile frame rate (I'm not actually sure how that is done today, but I assume there is some magic in the producer). 2) A filter can not change the duration of a producer. This might be used by a slow motion filter (which would result in making the producer longer) or a fast forward filter (which would make the producer slower). 3) A filter can not get random access to arbitrary frames of a producer. This might be used by a reverse filter (when frame 0 is requested, the filter would return the last frame from the producer, etc.). I think that the framebuffer producer provides an interesting idea. It acts as a proxy between MLT and the real producer. I wonder if this idea could be extended to be fully supported in the framework. My current proposal would be: 1) Generalize the "cut producer" concept to allow pluggable proxy producers. 2) Create a new service type called "proxy_producer" (better name to be determined later). 3) A proxy inherits the producer interface, but it takes an existing producer as a parameter. 4) Proxy producers can be chained together to accomplish various conversions on the producer. 5) Modify the framework to automatically chain proxies as necessary to normalize the framerate of producers (as is done now with other normalizing filters) 6) Start adding new proxies * Deinterlace (with field doubling) * Frame rate conversion * Reverse * Slow motion / fast forward * telecine / reverse telecine Example: 29.97i input, 24p output: Consider this chain: 1) Input producer: output = 29.97i 2) Deinterlace proxy: output = 59.94p (using field doubling for maximum temporal resolution) 3) Frame rate proxy: output = 24p (using frame dropping) The two proxies would be stacked on top of the input producer, and the rest of MLT would just think it is dealing with a producer that has 24p output. Creating a whole new service type may seem heavy. I can consider other options, like just extending the producer service with specific capabilities rather than making something pluggable. I'm willing to put in the wrench time to design and implement - as long as you are willing to check and approve my work. But I know you are busy with other things and may not want to take the time to babysit me. I would understand that. So, let me know if this is worth perusing. If not, I understand. But I do think a solution to these constraints would be valuable. ~Brian ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ Mlt-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mlt-devel
