[FFmpeg-devel] trying to pass a command to an input filter

Stefano Sabatini stefasab at gmail.com
Tue Sep 10 12:43:30 CEST 2013


On date Tuesday 2013-09-10 11:11:53 +0100, JULIAN GARDNER encoded:
> > From: Stefano Sabatini <stefasab at gmail.com>
> 
> >To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org> 
> >Sent: Tuesday, 10 September 2013, 12:04
> >Subject: Re: [FFmpeg-devel] trying to pass a command to an input filter
> > 
> >
> >On date Monday 2013-09-09 18:03:15 +0100, JULIAN GARDNER encoded:
> >> My command line is 
> >> 
> >> ffmpeg -f lavfi -i color=s=720x576:c=green -c:v libx264 -b:v 1500k -y -f mpegts test.ts
> >> 
> >> Im having a play around with the 'c' command line way of passing commands to filters and I cannot work out something.
> >> 
> >> in vsrc_testsrc.c the "color" command has a .process_command setup in its structure, but when i press 'c' and then
> >> 
> >> all -1 color black
> >> 
> >> The command does not get to the vsrc_testsrc, now debugging this it looks like the commands are not passed to the vsrc_testsrc.c:color_process_command as it is not in the filtergraphs.
> >> 
> >
> >> So my question is how do i get this working, or is it not possible to pass commands to input sources
> >
> >Last time I tried I used the sendcmd and zmq filters. Don't know if
> >the (undocumented) ffmpeg command is still working.
> >-- 
> 
> 

> Well to me it will only send commands to filters and as a vsrc_XXXX is not a filter per se, it wont work.

No the code in such filters will send commands to all the filters in
the filtergraph where the "command" filter is inserted, and a source
is just a special filter with no inputs, although I recognize this is
a bit confusing.

I cannot comment about the "c" ffmpeg command, but I tested the
sendcmd and zmq filters and I'm pretty sure sending commands to the
source should definitively work, and you can even find such an example
in the zmq filters documentation.

> 
> So either remove this excess code, or add in code to pass the
> commands to input and output sources
-- 
FFmpeg = Freak Fostering Mortal Powerful Elastic Glue


More information about the ffmpeg-devel mailing list