[FFmpeg-user] get_duration command within movie filter

Gyan Doshi ffmpeg at gyani.pro
Thu Mar 23 06:14:51 EET 2023



On 2023-03-23 12:18 am, Conan Jen wrote:
> Hi,
>
> I've been having some trouble determining from the documentation whether
> this can achieve what I'm attempting to do or not.
>
>  From my current understanding, get_duration is a command that is available
> to the movie filter (see:
> https://ffmpeg.org/ffmpeg-filters.html#Commands-161), but I'm unsure as to
> the role commands play within the filtergraph. Does this mean that I'm able
> to run a command within a filter and have the command's return value
> available as an output?

Commands are directives to supporting filters issued when ffmpeg is 
already running.  They are conveyed using a broker like ZeroMQ (see 
filter zmq)
or the filter sendcmd or by pressing 'c' during ffmpeg's execution and 
then entering a command string.

get_duration will print the file duration. However, this is just a 
printout and isn't available to other filters.

Regards,
Gyan



More information about the ffmpeg-user mailing list