[FFmpeg-user] ff* command lines that work

Mark Filipak markfilipak.windows+ffmpeg at gmail.com
Tue Mar 10 02:09:00 EET 2020


On 03/09/2020 06:41 PM, Michael Koch wrote:
> Am 09.03.2020 um 23:31 schrieb Mark Filipak:
>> On 03/09/2020 05:30 PM, Michael Koch wrote:
>>> Am 09.03.2020 um 21:49 schrieb Mark Filipak:
>>>> On 03/09/2020 03:39 PM, hydra3333 at gmail.com wrote:
>>>>> Well, I'm a dumb user and google gave me LOTS and LOTS of 
>>>>> commandlines that work - simply filter the google results by the 
>>>>> "date in the last year" to be sure you get the latest syntax.  Lots.
>>>>>
>>>>> You appear to continually avoid "what is it you wish to do with a 
>>>>> specific example video that you have" type questions...
>>>>
>>>> That's a fair observation. You deserve a serious response. May I 
>>>> provide perspective?
>>>>
>>>> It appears to me that ffmpeg commands have the following structure:
>>>> ffmpeg A [[B ...] -i C [D ...]...] [[E ...] [F ...]...]
>>>>  [[i ]...] : inputs
>>>>       A    : general options
>>>>   [B ...]  : input-specific pre-options
>>>>      C     : input URL
>>>>   [D ...]  : input-specific post-options
>>>> ...[[]...] : outputs
>>>>   [E ...]  : output-specific filters
>>>>   [F ...]  : output URL
>>>> Full disclosure: I don't know if all of the above is correct.
>>>
>>> As far as I know, there are no input-specific post-options.
>>
>> Thank you, Michael. I'll keep that in mind.
>>
>>> All input specific options must be written before the input. Remove D.
>>> General options can also be written before the output (between E and F).
>>
>> Thank you! That's really good to know.
>>
>>> Filters are always output specific. So E ist just the filter chain.
>>
>> True. I intended to indicate that E is an individual filter. I'm 
>> unsure whether, in a filter chain, all filters are delimited by 
>> semi-colons.
> 
> commas or semi-colons, it's described in chapter 30:
> https://www.ffmpeg.org/ffmpeg-all.html#Filtering-Introduction

Thanks again. I of course had read that -- I've read everything -- but 
it was unclear regarding the structure. You have clarified it.

At this point, I could write a more specific template that includes some 
of the internals of a filter chain, but then I'd have to include 
brackets that delimit filter taps (e.g., '[0:1]'), but those brackets 
would conflict with the token brackets that indicate optional inclusion 
(e.g., '[B ...]'), so I don't want to include filter delimiters at the 
top level. So, I'm submitting this:

ffmpeg [A ...] [B ...] -i C [[D ...] -i E ...] [F ...] [G] [H ...] [[I 
...] J [[K ...] L ...]]
  A ... : general options, if any
  B ... : first input options, if any
  -i C  : first input-URL
  D ... : second input options, if any
  -i E  : second input-URL, if any, etc.
  F ... : more general options, if any
    G   : filter chains, if any
  H ... : more general options, if any
  I ... : first output-specific filters, if any
    J   ; first output-URL, if any
  K ... ; second output options, if any
    L   : second output-URL, if any, etc.

How's that look? Complete?
(I'd develop a full BNF suitable for a parser, but that would get pretty 
crazy, fast.)

Thanks.



More information about the ffmpeg-user mailing list