Created
April 5, 2026 13:25
-
-
Save eser/c6d35f8cb41ad504c88029b2eecbcc19 to your computer and use it in GitHub Desktop.
Video Conversion Script for YouTube (ffmpeg, afconvert)
This file contains hidden or 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
| VIDEOFILE="intro.mov" | |
| VIDEOFILE_BASE="${VIDEOFILE%.*}" | |
| afconvert "${VIDEOFILE}" -o "${VIDEOFILE_BASE}_audio.wav" -d LEI24 -f WAVE -c 2 | |
| ffmpeg -i "${VIDEOFILE}" -i "${VIDEOFILE_BASE}_audio.wav" \ | |
| -map 0:v -map 1:a \ | |
| -c:v libx265 -preset slow -crf 15 \ | |
| -pix_fmt yuv420p10le \ | |
| -color_primaries bt709 -color_trc bt709 -colorspace bt709 \ | |
| -tag:v hvc1 \ | |
| -c:a aac -b:a 384k \ | |
| -movflags +faststart \ | |
| "${VIDEOFILE_BASE}.mp4" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment