[gst-devel] Selective decoding of video packets

Stefan Kost ensonic at hora-obscura.de
Sun Dec 19 19:43:10 CET 2010


Am 18.12.2010 17:42, schrieb Rohit Atri:
> Hi,
> 
> I m writing an application which reads mp4 packets from a file (bin1:
> filesrc->qtdemux->appsink), do some analysis on a set(say 100 - depending on the
> duration of the video) of packets and choose one single packet and send it for
> decoding (bin2: appsrc->ffdec_mpeg4->appsink) and then save this image... repeat
> the process for all packets in the video.

The approach sounds a bit flawed. You should send the complete stream to the
decoder. Videodecoding is rarely stateless (mjpeg would be). If you just want
certain frames to be saved in the end. You could e.g. send some custom
synchronized downstream event from teh demuxer side. Then based on the event you
can handled the decoded frames after the decoder.

Stefan

> I've a few questions -
> 1. Are the elements I'm using apt?  and do I've to do some thread management
> since I've to pipelines?
> 2. a. I'm able to receive packets from bin1, do some analysis and send a single
> packet(iFrame) for decoding.. but bin2 doesn't return the packet back(the
> application hangs!).. 
> b. When I turn on the logs with level-4, I do get the packet back!!! - so it
> could be timing issue, I suspect.
> c. The bin1 returns say 200 or so packets and the app receives an EOS message
> from it! - why is that?
> 3. Does appsink return packets as and when it receives them or does it wait to
> preroll?
> 
> Please help me understand the situation better. I've hit a roadblock! Please let
> me know if you need some logs... 
> 
> Thanks
> Rohit
> 
> 
> 
> ------------------------------------------------------------------------------
> Lotusphere 2011
> Register now for Lotusphere 2011 and learn how
> to connect the dots, take your collaborative environment
> to the next level, and enter the era of Social Business.
> http://p.sf.net/sfu/lotusphere-d2d
> 
> 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel





More information about the gstreamer-devel mailing list