[FFmpeg-user] Ffmpeg - h filter

Paul B Mahol onemda at gmail.com
Tue Jan 21 23:30:28 EET 2020


On 1/21/20, James Northrup <jim at vsiwest.com> wrote:
> On Wed, Jan 22, 2020 at 3:44 AM James Northrup <jim at vsiwest.com> wrote:
>
>>
>> On Wed, Jan 22, 2020 at 2:17 AM Paul B Mahol <onemda at gmail.com> wrote:
>>
>>> You should never parse textual output of -h help.
>>>
>>
> since we seem to be here to tell each other how to do their job, why don't
> I follow up with...
>
> WTF ARE THESE UNDOCUMENTED FIELDS DOING IN MY BINARY HELP ?   AINTCHU NEVER
> HEARD OF USERS BOY?

As already said flags can be added any time so parsing output is never
recommended.
Two newly added flags are T - option can be changed at run-time and
and deprecated flag which does not have its flag exposed to users, so
you get just . in output help.
This is not optimal and probably should be fixed.

>
> If you need to get options of filter use library provided API.
>>>
>>
>> thanks Paul B Maholfor such a concise and detailed answer with such exact
>> references!  top posted no less!  It almost looks like anyone not writing
>> c
>> code should go pound salt instead of use the executable!
>>
>> so it looks like the 8 target flags has become 10.
>>
>> at some point years ago i divined this struct (java interface, now
>> kotlin).  AVTarget appears to be missing 2 now.  Any hints?
>>
>> interface AvOption {
>>     val optionName: String?
>>     val type: String?
>>     val targets: List<AvTarget>?
>>     val description: String?
>>     val range1: String?
>>     val range2: String?
>>     val def: String?
>>     val children: List<AvOption>?
>>     val encoding: Boolean?
>>     val decoding: Boolean?
>>     val filtering: Boolean?
>>     val video: Boolean?
>>     val audio: Boolean?
>>     val subtitle: Boolean?
>>     val export: Boolean?
>>     val readonly: Boolean?
>>     fun addChild(o: AvOption)
>>     enum class AvTarget {
>>
>> *        Encoding, Decoding, Filtering, Video, Audio, Subtitle, Export,
>> Readonly*    }
>>
>>     enum class AvOptionField {
>>         optionName, type, targets, description, range1, range2, def
>>     }
>>
>>     companion object {
>>         val AV_OPT_PAT =
>> "^\\s+(?<${AvOptionField.optionName}>[\\w+-]+)(\\s+\\<(?<${AvOptionField.type}>\\w+)\\>)?\\s+(?<${AvOptionField.targets}>[\\w.]
>> {8}
>> )(\\s+(?<${AvOptionField.description}>[^(]+)(\\s+\\(from\\s+(?<${AvOptionField.range1}>.*)\\s+to\\s+(?<${AvOptionField.range2}>[^)]+)\\))?(\\s+\\(default\\s+(?<${AvOptionField.def}>[^)]+)\\))?)?$".toRegex().toPattern()
>>     }
>> }
>>
>>
>>> On 1/21/20, James Northrup <jim at vsiwest.com> wrote:
>>> > i am maintaining ffblockly which scrapes the ffmpeg executable for
>>> filter
>>> > parameters and defaults by cartesian product of e.g. >>>(below)
>>> >
>>> > is there a build step artifact that more cleanly has the  self-doc
>>> > records?  this cmdline help has changed ever so slightly and i've got
>>> > to
>>> > reverse engineer again.  my initial look into the build process turned
>>> up
>>> > nothing conclusive, maybe some hints to get me started looking in the
>>> right
>>> > place
>>> >
>>> >>>>(below)
>>> > ffmpeg -h filter=crop 2>/dev/null
>>> > Filter crop
>>> >  Crop the input video.
>>> >    Inputs:
>>> >       #0: default (video)
>>> >    Outputs:
>>> >       #0: default (video)
>>> > crop AVOptions:
>>> >  out_w             <string>     ..FV.....T set the width crop area
>>> > expression (default "iw")
>>> >  w                 <string>     ..FV.....T set the width crop area
>>> > expression (default "iw")
>>> >  out_h             <string>     ..FV.....T set the height crop area
>>> > expression (default "ih")
>>> >  h                 <string>     ..FV.....T set the height crop area
>>> > expression (default "ih")
>>> >  x                 <string>     ..FV.....T set the x crop area
>>> expression
>>> > (default "(in_w-out_w)/2")
>>> >  y                 <string>     ..FV.....T set the y crop area
>>> expression
>>> > (default "(in_h-out_h)/2")
>>> >  keep_aspect       <boolean>    ..FV...... keep aspect ratio (default
>>> > false)
>>> >  exact             <boolean>    ..FV...... do exact cropping (default
>>> false)
>>> > _______________________________________________
>>> > ffmpeg-user mailing list
>>> > ffmpeg-user at ffmpeg.org
>>> > https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>> >
>>> > To unsubscribe, visit link above, or email
>>> > ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>>> _______________________________________________
>>> ffmpeg-user mailing list
>>> ffmpeg-user at ffmpeg.org
>>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>>
>>> To unsubscribe, visit link above, or email
>>> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>>
>>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list