July 31, 2015 · ffmpeg 4k 1080p 720p UltraHD cheatsheet 3840 4096 extract frame png y4m sequence

FFMPEG 4K/UltraHD Encoding Cheatsheet

Crop Real 4K to UltraHD 4096>3840

ffmpeg -i A001_C014_01217G.4k.y4m -vf "crop=3840:2160:128:0" outputgirl.2160p.y4m

Resize to 1080p

ffmpeg -i outputgirl.2160p.y4m -vf scale=1920:-1 outputgirl.1080p.y4m

Resize to 720p

ffmpeg -i outputgirl.2160p.y4m -vf scale=1280:-1 outputgirl.720p.y4m

Convert source to YUU4MPEG2

ffmpeg -pix_fmt yuv420p -i any-source-video.webm output.y4m

Convert a sequence of images to YUU4MPEG

ffmpeg -f image2 -i "A004_C001_0122K7.00%05d.png" -pix_fmt yuv420p ouput.y4m

extract a single frame

ffmpeg -i input.avi -f image2 -ss 14.342 -vframes 1 frame.png

extract a single frame (altenative method)

ffmpeg -i input.y4m -f image2 -vf select="gte(n\, 1)" -vframes 1 frame.png

extract 1 frame after frame 100

ffmpeg -i input.y4m -f image2 -vf select="gte(n\, 100)" -vframes 1 frame.png

DigitalOcean Referral Badge
Keep my site online & receive a $200 60-day credit at DigitalOcean for your VPS Hosting
Cheaper Games on Instant-Gaming
Creative Commons Licence