I’m trying to crop video frames with ffmpeg, and I would like to scale the cropped image automatically.
I saw an option at av filter: http://ffmpeg.org/libavfilter.html#SEC41
./ffmpeg -i video.mp4 -vf “crop=640:480,scale=ow:oh” -f mpegts udp://127.0.0.1:1234
I receive an error: Error when evaluating the expression ‘oh’
Try this:
Above code will first scale the video to
640and maintain the aspect ratio height,then crop to
640x480.