[Ffmpeg-devel] [PATCH] from DivX, Part 2: Multifile source
Steve Lhomme
slhomme
Wed Jan 25 20:36:10 CET 2006
Michael Niedermayer wrote:
> Hi
Hi,
> On Fri, Dec 16, 2005 at 12:28:02PM -1000, Steve Lhomme wrote:
>> There was a missing part, here it is.
>>
>> Steve Lhomme wrote:
>>> This patch adds a new protocol input to do the simulation of file
>>> concatenation (not always available when you use the ffmpeg library).
>>>
>>> It should work on other OS too.
>>>
>>> The URL to use is : "multi:<file1>*<file2>*"
>>>
>>> It's mostly used for merging MPEG (VOB) files on the fly.
>
> does this has any advantage over
> cat a b c | ffmpeg?
As Wolfram say, seeking works. Other than that, for people using
libavformat and/or libavcodec without your application concatenation is
not always available.
>> +#define IO_MULTI_FILE_PROTO "multi:"
>
> reanme to "cat" IMHO as its not really supporting multiple files
> (avi for example)
Yes, "cat" is a better identifier.
>> +#define IO_MULTI_FILE_SEPAR '*'
>
> IMHO a '*' is a uncommon choice as seperator, what about : or , ?
The idea is to be able to use -i cat:file1.vob*file2.vob from the
command-line. * is the only one I found that can't be set (easily) in a
filename on Windows and Linux.
>> +static offset_t fileconcat_seek(URLContext *h, offset_t pos, int whence)
>> +{
>> + size_t i,j;
>> + offset_t result = -1;
>> + struct fileconcat_info *finfo = (struct fileconcat_info *) h->priv_data;
>> + switch (whence)
>> + {
>> + case SEEK_END:
>> + assert(pos == -1 || pos == 0); /* other cases not supported */
>
> is it really so hard to jump to SEEK_SET below to handle this correctly?
I didn't spend time on a feature I don't need :)
Steve
More information about the ffmpeg-devel
mailing list