[FFmpeg-user] Problem with changing options at runtime with a command

Alex Christoffer Rasmussen ac at omnivox.dk
Sat Jul 3 16:57:26 EEST 2021


thank you for the quick answer

when trying this out I notice 3 things

*1: the original size is kept*
if the starting crop is *crop=h=100 *then using *c crop -1 h 150 *dose
noting and the other way, using *c crop -1 h 50 *leaves the actual pixel
dimentions at 100 but the lower portion is transparent.
So you can't change the actual dimentions with a command? is the a filter i
should use after crop to accomplish this?

*2: c crop w dosen't work*
*c crop -1 h 100 *crop height to 100 but *c crop -1 w 100 *stil returns a
full width image but crops to 1 pixel in height
i also tried *c crop -1 w ih *and that returns a full width and dosnt crop
the height but *c crop -1 w ih-1 *also crops to 1 pixel in height

*3: can't set w and h at the same time*
using *c drawtext -1 reinit fontcolor=red:text='test' *works
but i can't figur out how to do the same with crop
*c crop -1 h 50 : w 50 *
returns:
[Parsed_crop_2 @ 000001dde3ffaa80] [Eval @ 00000005a89fdd80] Invalid chars
':w50' at the end of expression '50 : w 50'
[Parsed_crop_2 @ 000001dde3ffaa80] Error when evaluating the expression '50
: w 50'
Command reply for stream 0: ret:-22 res:
i tried a a few combinations with no luck

*@Michael *i agree that the doc could be a bit cleare. as you can see i got
my idears from the only example i could find and that was from drawtext.

vh
Alex

On Sat, Jul 3, 2021 at 3:12 PM Michael Koch <astroelectronic at t-online.de>
wrote:

> Am 03.07.2021 um 15:06 schrieb Michael Koch:
> > Hi Gyan,
> >
> >>
> >> As the docs state, the acceptable commands are w, h, x, ,y
> >>
> >> so the syntax is
> >>
> >>     c crop -1 w 100
> >>
> >
> > Is this documented somewhere? I mean typing "c" in the console while
> > FFmpeg is running.
> > I know that you mentioned it on stackoverflow some time ago, but I
> > never found it in the FFmpeg docs.
> >
> >
> https://stackoverflow.com/questions/56058909/ffmpeg-drawtext-and-live-coordinates-with-sendcmd-zmq
> >
> >
> > I think it should be added to chapter 34 in FFmpeg-all.html, "Changing
> > options at runtime with a command".
>
> P.S. In the same chapter could also be mentioned that two other methods
> exist: sendcmd and zmq.
>
> Michael
>
> _______________________________________________
> 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