Last active
July 31, 2016 11:02
-
-
Save onixus74/bf16d4d2756c9cc8caf7910eaa06b057 to your computer and use it in GitHub Desktop.
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
#! /bin/bash | |
# More flags https://ffmpeg.org | |
# H264 sample : ffmpeg -i input -c:v libx264 -preset slow -crf 22 -c:a copy output.mkv | |
function convert_all_to_mp4() { | |
for file in *.mp4 ; do | |
local bname=$(basename "$file" .mp4) | |
local mp4name="$bname.mp4" | |
ffmpeg -i "$file" -c:v libx264 encoded/"$mp4name" | |
done | |
} | |
mkdir encoded | |
convert_all_to_mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment