[FFmpeg-devel] [RFC] possible API for opening external demuxer references
Wed Feb 27 19:27:09 CET 2008
Michael Niedermayer wrote:
> On Wed, Feb 27, 2008 at 02:38:08PM +0100, Reimar D?ffinger wrote:
>> currently just a flag probably is good enough, but in case someone is
>> interested in taking things further (maybe even as a way to implement
>> general playlist support in lavf, including rules like "internet
>> playlists can only reference internet files and vice versa"?) here is
>> a first idea of a possible API.
>> Probably it makes little sense without actually implementing things to
>> actually see how suitable it is, but since I already got that far...
> IMHO the demuxer should "return" the urls to the calling application
> and not mess with them any further.
> That is have a seperate AVStream with CODEC_ID_REFERENCE/URL/whatever
> and put the urls in extradata.
Url/Path can be stored in AVStream->filename if wanted ?
How would you specify the right CODEC_ID if you cannot probe ?
And in the case of external h264 stream, what about 'avcC' atom already
in extradata ?
IMHO this is very complicated, far more than calling url_fopen or
> The application could check exradata after read_header() and act
> on them as needed. That is for example opening seperate streams, demuxers
> decoders (some of which may be binary only).
> This would work very nice with MPEG*-ES streams as well as playlists.
> It would also allow simple remuxing which maintains these references.
> Which is something which would not work at all with this callback or
> direct open() calls.
Using AVFMT_FLAG_EXTREF, you can specify to mux as reference, you can
specify a filename for each stream (AVStream->filename), and maybe a
flag to specify external for each track, since you can mix both internal
and external like BrianCox.mov. I have a patch to mov muxer doing that
With your solution, I fear you cannot use pts/dts/editlists written in
the original reference mov, and therefore loose much useful informations.
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A. http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
More information about the ffmpeg-devel