cheatsheet:ffmpeg
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| cheatsheet:ffmpeg [2025/08/16 02:11] – melo | cheatsheet:ffmpeg [2026/07/16 00:33] (current) – melo | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| [[https:// | [[https:// | ||
| + | |||
| + | ==== audio conversion ==== | ||
| + | |||
| + | === FLAC to MP3 === | ||
| + | |||
| + | <code bash> | ||
| + | ffmpeg -i " | ||
| + | </ | ||
| ==== video to frames ==== | ==== video to frames ==== | ||
| - | see '' | + | see '' |
| === 1/1 frames === | === 1/1 frames === | ||
| Line 19: | Line 27: | ||
| <code bash> | <code bash> | ||
| ffmpeg -i " | ffmpeg -i " | ||
| + | </ | ||
| + | |||
| + | === avoid dupe frames === | ||
| + | |||
| + | <code bash> | ||
| + | ffmpeg -i " | ||
| + | </ | ||
| + | |||
| + | ==== cut based on timestamps ==== | ||
| + | |||
| + | <code bash> | ||
| + | # cut from the first minute to the second minute | ||
| + | ffmpeg -i " | ||
| + | </ | ||
| + | |||
| + | ==== scale/ | ||
| + | |||
| + | <code bash> | ||
| + | # replace 540 with 480, 720, 1080, etc | ||
| + | ffmpeg -i " | ||
| </ | </ | ||
| Line 35: | Line 63: | ||
| <code bash> | <code bash> | ||
| ffmpeg -i " | ffmpeg -i " | ||
| + | </ | ||
| + | |||
| + | === x265 (HEVC), GPU, bash loop === | ||
| + | |||
| + | <code bash> | ||
| + | for f in *.mkv; do ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i " | ||
| + | </ | ||
| + | |||
| + | === AVI/ | ||
| + | |||
| + | <code bash> | ||
| + | for f in *.avi; do ffmpeg -fflags +genpts -i " | ||
| + | </ | ||
| + | |||
| + | === copy video, remove audio, bash loop === | ||
| + | |||
| + | <code bash> | ||
| + | for f in *.mp4; do ffmpeg -i " | ||
| + | </ | ||
| + | |||
| + | === camcorder sources === | ||
| + | |||
| + | GPU accelerated camcorder source MPEG+AC3+VOBSUB to x264+AC3+VOBSUB (little to no file size reduction, for web uploads) | ||
| + | |||
| + | <code bash> | ||
| + | ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -extra_hw_frames 10 -i " | ||
| </ | </ | ||
cheatsheet/ffmpeg.1755310308.txt.gz · Last modified: by melo
