Ffmpeg - h filter

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Ffmpeg - h filter

James Northrup
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
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Ffmpeg - h filter

Paul B Mahol
You should never parse textual output of -h help.

If you need to get options of filter use library provided API.

On 1/21/20, James Northrup <[hidden email]> 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
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Ffmpeg - h filter

James Northrup
On Wed, Jan 22, 2020 at 2:17 AM Paul B Mahol <[hidden email]> wrote:

> You should never parse textual output of -h help.
>
> 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 <[hidden email]> 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
> > [hidden email]
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> > To unsubscribe, visit link above, or email
> > [hidden email] with subject "unsubscribe".
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Ffmpeg - h filter

James Northrup
On Wed, Jan 22, 2020 at 3:44 AM James Northrup <[hidden email]> wrote:

>
> On Wed, Jan 22, 2020 at 2:17 AM Paul B Mahol <[hidden email]> 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?

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 <[hidden email]> 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
>> > [hidden email]
>> > https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>> >
>> > To unsubscribe, visit link above, or email
>> > [hidden email] with subject "unsubscribe".
>> _______________________________________________
>> ffmpeg-user mailing list
>> [hidden email]
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>> To unsubscribe, visit link above, or email
>> [hidden email] with subject "unsubscribe".
>
>
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Ffmpeg - h filter

Carl Eugen Hoyos-2
Am Di., 21. Jan. 2020 um 22:19 Uhr schrieb James Northrup <[hidden email]>:
>
> On Wed, Jan 22, 2020 at 3:44 AM James Northrup <[hidden email]> wrote:
>
> 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?

I have no idea what you are trying to say but please understand that
we do not accept shouting here.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Ffmpeg - h filter

Paul B Mahol
In reply to this post by James Northrup
On 1/21/20, James Northrup <[hidden email]> wrote:

> On Wed, Jan 22, 2020 at 3:44 AM James Northrup <[hidden email]> wrote:
>
>>
>> On Wed, Jan 22, 2020 at 2:17 AM Paul B Mahol <[hidden email]> 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 <[hidden email]> 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
>>> > [hidden email]
>>> > https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>> >
>>> > To unsubscribe, visit link above, or email
>>> > [hidden email] with subject "unsubscribe".
>>> _______________________________________________
>>> ffmpeg-user mailing list
>>> [hidden email]
>>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>>
>>> To unsubscribe, visit link above, or email
>>> [hidden email] with subject "unsubscribe".
>>
>>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Ffmpeg - h filter

James Northrup
In reply to this post by Paul B Mahol
Apoligies for shouting to Carl and my sincerest thank you for the hints.

at one point i must've read a .c file with the positional elements that i
lifted out the first time.  i should have left a better breadcrumb for
those. quite frustrated before i posted the first time.

 there is a regex extractor for the entirety of the binary self-docs but
the details GUI is only for filters up til now.  the target of this effort
was once air-gapped embedded windows using stable binaries.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".