ffmpeg -i input.file -vf "scale=(iw*sar)*max(720/(iw*sar)\,480/ih):ih*max(720/(iw*sar)\,480/ih), crop=720:480" -c:v mpeg4 -vtag XVID -q:v 4 -c:a libmp3lame -q:a 4 output.avi Replace "input.file" with the name of your input file.


I'm no ffmpeg guru, but this should do the trick. First of all, you can get the size of input video like this: ffprobe -v error -of flat=s=_ -select_streams v:0 -show_entries stream=height,width in.mp4 With a reasonably recent ffmpeg, you can resize your video with these options: ffmpeg -i in.mp4 -vf scale=720:480 out.mp4 You can set the width or height ...


If you want to crop and scale in one go, you can make a crop-then-scale filterchain like so: ffmpeg -i SomeInput.mp4 -vf "crop=in_h*9/16:in_h,scale=-2:400" -t 4 SomeOutput.mp4 The above first crops a video to 16:9 portrait, then scales to 400px high x the appropriate (even number) width.


ffmpeg -formats will list all of them, its sounds like you're looking for (surprisingly enough) -f mp4. Note that depending on your V4L capture device's format, you may need to specify encoding to an MPEG-4 compatible audio (-codec:a / -acodec) and video codec (-codec:v / -vcodec).


ffmpeg As pointed out in the comments, ffmpeg offers a good one-step solution with a simple "quality" parameter: crf, or "constant rate factor" (read this post explaining crf). See this post for simple instructions for going from PNG to H.264 using ffmpeg. In short: # Assuming the frames are called frame0000.png, frame0001.png ... # # set $FPS, $WIDTH, $...


mplayer -nosound "mf://image.jpg" -mf type=jpg -loop 0 or mplayer -nosound "mf://image.png" -mf type=png -loop 0 These commands "play" an image repeatedly until mplayer is stopped, say, by hitting escape.


I'm new to ffmpeg but now have a nice little converter going in VB.NET that creates raw movies of various output formats for use in small devices that have SD card access but not enough power to decode complex video. Because of the way it works when resizing and cropping I had to code it manually and build the parameters. Basically I need to know the ...


I just used this command to convert a stack of .jpg files to an .mp4 file using ffmpeg. The switches should be similar enough. $ ~/ffmpeg -r 10 -i pics_series2/01-2013110216%02d00-snapshot.jpg -c:v libx264 \ -crf 20 -g 15 -vf crop=200:300,scale=352:288 timelapse.mp4 Let me know if that worked. Also you can download the statically built version of ffmpeg ...

Only top voted, non community-wiki answers of a minimum length are eligible