Last active
November 3, 2023 05:41
-
-
Save Max95Cohen/75e7e21581e307a3f600704a431a170a to your computer and use it in GitHub Desktop.
ffmpeg tips
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i input.jpg -vf scale=320:240 output_320x240.jpg | |
ffmpeg -y -i input.jpg -vf "scale='min(500,iw)':'min(500,ih)'" output_500x500.png | |
ffmpeg -y -i input.jpg -vf "crop=in_h" output_center.png | |
ffmpeg -y -i input.jpg -vf "scale=w='min(500,in_h):h=-1'" output_center1.png | |
ffmpeg -y -i input.jpg -vf "scale=w='min(1000,in_h):h=-1',crop=out_w=in_h,scale=w='min(200,in_h):h=-1" output_center2.png | |
ffmpeg -i input1.mov -vcodec copy -acodec copy out1.mp4 | |
ffmpeg -i input1.mov -q:v 0 output1.mp4 | |
ffmpeg -i input.mkv -codec copy output.mp4 | |
#ffmpeg -i 1000x1250.jpg -vf scale=w=300:h=300:force_original_aspect_ratio=increase,crop=300:300 temp.jpg -y | |
#ffmpeg -i 1000x563.jpg -vf scale=w=300:h=300:force_original_aspect_ratio=increase,crop=300:300 temp2.jpg -y | |
#ffmpeg -i 1000x1250.jpg -vf scale=w=300:h=300:force_original_aspect_ratio=decrease temp.jpg -y | |
#ffmpeg -i 848x480.mp4 -vf scale=w=300:h=300:force_original_aspect_ratio=increase,crop=300:300 temp.mp4 -y | |
ffmpeg -i 640x320.mp4 -vf scale=w=300:h=300:force_original_aspect_ratio=increase,crop=300:300 temp.mp4 -y | |
ffmpeg -i IN.mp4 -b:a 192K -vn OUT.mp3 | |
ffmpeg -i IN.mkv -codec copy OUT.mp4 | |
ffmpeg -i IN.avi -c:v copy -c:a copy -y OUT.mp4 | |
ffmpeg -ss 00:01:00 -to 00:02:00 -i IN.mp4 -c copy OUT.mp4 | |
ffmpeg -i 640x320.mp4 -vf scale=500:-2 -c copy temp.mp4 -y | |
ffmpeg -i INPUT.mkv -map_metadata -1 -map_chapters -1 -ss 00:00:45 -to 02:09:15 -vf scale=688:-2 OUT.mp4 | |
ffmpeg -i INPUT.webm -vcodec libx264 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -r 24 -y -an video.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment