[FFmpeg-devel] [PATCH] Playlist API

Geza Kovacs gkovacs
Fri Aug 7 01:10:39 CEST 2009


On 08/06/2009 03:43 PM, Ronald S. Bultje wrote:
> Hi,
> 
> On Thu, Aug 6, 2009 at 6:36 PM, Geza Kovacs<gkovacs at mit.edu> wrote:
>> streams[0] is primary video stream
>> streams[1] is primary audio stream
>> streams[2] is primary subtitle stream
>> streams[3] is alternative video stream
>> streams[4] is alternative audio stream
>> streams[5] is alternative subtitle stream
> 
> Well, that makes no sense. It's too limiting in all aspects.
> 

How so? libavcodec defines only 7 codec types; if streams[] were
dynamically allocated rather than arbitrarily limited to MAX_STREAMS,
the only issue I see with this is a small amount of memory being wasted
by dummy streams. Ideally some 2-dimensional level of organization would
be more elegant (something along the lines of separate arrays for
video_streams[], audio_streams[], and all other stream types), but given
that such 2-dimensional organization would break basically all existing
code I don't think there's a much better way to organize a
one-dimensional streams array.

> Your problems comes very close to that of titles in a DVD/Bluray:
> trailers often have one video, but then the main movie might have
> mutli-angle ideo, multi-language subtitles/audiostreams, etc. The
> codecs can be different between titles (LPCM for the main concert, but
> simple ac3 for the trailers, or whatever; for BR, the video codec
> might change also).
> 
> The solution to the.problem of "how do I support multiple streams in a
> playlist" and "how do I support multiple titles in a DVD/BR disc" is
> likely the same, and I don't know if hacking AVFormatContext is the
> right way forward...
> 



More information about the ffmpeg-devel mailing list