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

Stefano Sabatini stefano.sabatini-lala
Mon Feb 22 02:10:07 CET 2010


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!
-- 
FFmpeg = Fanciful & Faithless Mortal Puristic Erotic Gem



More information about the ffmpeg-devel mailing list