Depending on the producer, you might be able to query the image metadata and 
determine the native format.
For example, the avformat_producer will often set the pix_fmt. Try to query 
"meta.media.0.codec.pix_fmt" on a frame from the avformat producer widget.
Perhaps you could query the pix_fmt on the first frame and falllback to a 
default format if it is not set.
~Brian


      From: Paweł Goliński <golp...@gmail.com>
 To: mlt-devel@lists.sourceforge.net 
 Sent: Wednesday, July 27, 2016 11:24 AM
 Subject: [Mlt-devel] Avoiding implicit conversions when fetching image/audio 
from frame
   
Hi,

I want to pass as much of rescaling/resampling/color conversion tasks
to my consumer as I can. So, when calling, e.g. mlt_frame_get_image()
for image, I want to use parameters that guarantee the least number of implicit
conversions will take place, as I can take care of them in my consumer. What’s
the best way to do that? Is there some way to ask a „loader" producer to produce
„the most native” frame possible?

Example - when I pass „mlt_image_rgb24a” to mlt_frame_get_image(), the MLT
loader producer does its best to produce what I want, so on some video sources
there is an implicit y420->rgba conversion. But my consumer could handle y420
as well, so I could avoid this conversion. Question is, how to know which format
to request, to avoid such conversion?


Best,
Paweł
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


  
------------------------------------------------------------------------------
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to