[FFmpeg-devel] Stream selection - how to?

Michael Niedermayer michaelni
Tue Jul 8 19:22:48 CEST 2008


On Tue, Jul 08, 2008 at 09:18:59AM -0400, Ronald S. Bultje wrote:
> Hi,
> 
> 2008/7/3 Michael Niedermayer <michaelni at gmx.at>:
> > On Thu, Jul 03, 2008 at 10:34:09AM -0400, Ronald S. Bultje wrote:
> >> On Thu, Jul 3, 2008 at 10:25 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> >> > First explain what stream relations you are talking about and vs. what
> >> > other non relations it has to be distinguished from.
> >> >
> >> > We have AVProgram to seperate unrelated stream bundles. We have
> >> > disposition, language, codec.bitrate/width/height/sample_rate/CODEC_TYPE_*
> >> > to seperate the streams within such a stream bundle.
> >>
> >> I'm talking about related (so not DVB-like bundles as in AVProgram)
> >> streams, such as a RTSP/MMS stream with different codecs/bitrates.
> >>
> >
> >> Let's start with this one: how do I select language W or bitrate
> >> X(k)bps-Y(k)bps or codec Z in ffplay (regardless of input)
> >
> > v and a keys in theory ... i dunno if that works though, also it is badly
> > lacking some feedback about what is available and what is selected ...
> 
> OK, so I just started understanding this. I don't think it's
> sufficient (surprise! :) ). Here's the problem (same for MMS): for the
> current implementation, my understanding is that basically the demuxer
> returns all packets and then ffplay.c decides what to queue and
> forward to the decoder. For MMS/RTSP, you'll not receive all packets
> from the demuxer to begin with, only one stream can be selected, and
> the server has to be notified on a stream-change. Then, the server
> will return packets for the newly selected stream instead.
> 
> I guess it means I'll have to extend ffplay.c and the whole ecosystem
> to notify te demuxer on a stream-change? Same thing for
> wanted_audio/*_stream? Should I be using AVDISCARD_* for this, or is
> there a different API or do I need to create something new?

you need to add maybe 1 or 2 lines of code to ffplay.c to set
AVStream.discard for all but the selected streams.
I dont see what else is needed short of fixing RT*P & MMS demuxers
to honor AVStream.discard

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is not what we do, but why we do it that matters.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080708/c8f2584f/attachment.pgp>



More information about the ffmpeg-devel mailing list