[FFmpeg-devel] [PATCH] FFprobe: take only one input file.

Ramiro Polla ramiro.polla
Wed Feb 24 07:16:42 CET 2010


On Sun, Feb 21, 2010 at 10:10 PM, Stefano Sabatini
<stefano.sabatini-lala at poste.it> wrote:
> On date Sunday 2010-02-21 21:27:35 -0300, Ramiro Polla encoded:
>> Hi,
>>
>> Currently "ffmpeg file1 file2 filex" will only probe file x. We could
>> either probe all files or allow only one file as in attached patch (I
>> just made this patch because it was simpler, but I would prefer the
>> other functionality).
>
> I considered that idea myself and I implemented it in ffprobe/SF but I
> concluded that it's better to only assume one url in input and let
> eventual scripts work with more than one resource.
>
> If you need to probe more files you can simply do:
> for f in $files; do ffprobe $f; done
>
> so I'm not sure that that feature may be worth the added complexity in
> the program.
>
>> Ramiro Polla
>
>> Index: ffprobe.c
>> ===================================================================
>> --- ffprobe.c (revision 21951)
>> +++ ffprobe.c (working copy)
>> @@ -290,6 +290,10 @@
>>
>> ?static void opt_input_file(const char *filename)
>> ?{
>> + ? ?if (input_filename) {
>> + ? ? ? ?fprintf(stderr, "Input filename already specified: %s\n", filename);
>> + ? ? ? ?exit(1);
>> + ? ?}
>> ? ? ?if (!strcmp(filename, "-"))
>> ? ? ? ? ?filename = "pipe:";
>> ? ? ?input_filename = filename;
>
> I'm fine with the patch, thanks!

Applied.



More information about the ffmpeg-devel mailing list