For the go pro I take in a bunch of jpgs and put out a cropped and scaled video.
ffmpeg -pattern_type glob -i ./'*.JPG' -filter:v "crop=2400:1701:96:96" -s 800x567 out.mp4
Maybe a better crop would be crop=2400:1350:96:96 and -s 800x450 for 16:9 aspect ratio.
I also convert simulation movies from avi to webm, and I try to be less lossy.
ffmpeg -i lf400.avi -b:v 0 -crf 32 lf400.webm
I am not sure why that is better than setting -b:v to a sane bitrate and omitting the crf argument, but it was recommended to me. Here is a description of what crf is.
For removing pieces of a video.
ffmpeg -i out.mp4 -ss 189.5 -t 7 -c copy -map 0 out6.mp4
And then for putting them back together. Create a list of text. "mylist.txt"
- file 'out1.mp4'
- file 'out2.mp4'
The concationation is easy:
ffmpeg -f concat -i mylist.txt -c copy output
I use the same codec/video format so it is very easy.
I made a panning image. Very nice.
ffmpeg -loop 1 -i rhianno.png -vf crop=w=in_w:h=in_w*9/16:x=0:y=in_h-n*12-out_h -r 25 -t 6 rhianno.gif
I then added some sound to it.
ffmpeg -i rhianno.mp4 -i sprb-short.mp3 -strict -2 mixed.mp4
For creating h264 files that work with macs.
ffmpeg -i out%03d.png -c:v libx264 -s 800x450 -pix_fmt yuv420p -crf 18 high-res.mp4
To use the yuv420, the height has to be divisible by 2.