FFMPEG interactive Mode help options
Asked Answered
S

1

7

While streaming a simple command like below

ffmpeg -i "Alien.mkv" -f webm tcp://localhost:8080/listen.webm

if I press '?' ffmpeg seems to have an interactive mode with the below options

   ?      show this help

   +      increase verbosity 

   -      decrease verbosity 

   c      Send command to first matching filter supporting it 

   C      Send/Queue command to all matching filters 

   D      cycle through available debug modes

   h      dump packets/hex press to cycle through the 3 states 

   q      quit 

   s      Show QP histogram

I was curious about option 'c'

Does this mean that I can execute further commands on the running stream? Say for instance seeking a new position in a running stream? (I realise you wouldn't normally do this)

I don't really know anything about these and couldn't find much in the ffmpeg documentation or else where. If I press 'c' it suggests the syntax I should use is:

Enter command: <target>|all <time>|-1 <command>[ <argument>]

but I still don't really understand how to execute a command. Would someone please give a few examples? I suspect that this isn't used much.

Strumpet answered 6/2, 2018 at 4:10 Comment(0)
X
8

That feature isn't for general-purpose tweaking. Some filters support commands. These commands allow you to change the filter parameters on the fly e.g. if you are sending out a live stream and the volume has gotten too loud, you can send a command to the volume filter (if present in the filtergraph), and lower the gain.

To see the syntax, see the docs for the sendcmd filter. You can also use a zmq client.

Check the docs for a filter to see if they support commands.

Xylo answered 6/2, 2018 at 5:51 Comment(1)
Thanks. That was very helpful.Strumpet

© 2022 - 2024 — McMap. All rights reserved.