[Libav-user] Using libav to demux multiple programs from multi-program stream

Adi Shavit adishavit at gmail.com
Thu Jul 25 12:54:56 CEST 2013


Hi Carl,

>
> > What I'm asking is if it is possible to demux
> > and the decode all (desired) streams independently.
>
> Again, I may misunderstand, but I suspect you cannot
> demux the streams of a transport stream independently
> but you can only decode the resulting video and audio
> streams independently (FFmpeg does not support mvc yet).


Sorry for the confusion. I think I am starting to figure out what I
want/need to do.

Basically, I can use av_find_best_stream() with multiple stream
indexes and save the proper codec for each such (desired) stream.
Then when grabbing the frames with av_read_frame, I can check the
packet.stream_index and for those indexes that I want to decode, I can
call the appropriate decoder. I think this should work.


>
>
> > If so, how can I get the "program name" in a
> > named stream to know which one I'm processing?
>
> See AVFormatContext->programs[] and
> av_find_program_from_stream() and friends.

What's the relationship between "programs" and streams?

I can see av_find_program_from_stream() in my header file, but I can't
seem to find it in the docs here:
http://libav.org/doxygen/master/avformat_8h_source.html

>
> Please do not top-post here, it is considered
> rude, and if possible, please set your mailer
> to text-only.

I apologize, for the non-threaded reply.
I didn't get the reply email and had to paste your reply (from the web
archive) into my question email.

Thanks,
Adi


More information about the Libav-user mailing list