Skip to content

Instantly share code, notes, and snippets.

Created March 2, 2015 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/48e0586349d7156e8217 to your computer and use it in GitHub Desktop.
Save anonymous/48e0586349d7156e8217 to your computer and use it in GitHub Desktop.
#!/bin/bash
FILES="$1"
RESOLUTION="854x480"
BITRATE="400000"
# AUDIO_OPTS="-c:a libfaac -b:a 160000 -ac 2"
AUDIO_OPTS="-an"
VIDEO_OPTS="-s $RESOLUTION -c:v libx264 -b:v $BITRATE -vprofile
baseline -preset medium -x264opts level=41"
# OUTPUT_HLS="-hls_time 3 -hls_list_size 3 -hls_wrap 10 -start_number 1"
for f in $FILES
do
ffmpeg -i "$f" $AUDIO_OPTS $VIDEO_OPTS "$f""_""$BITRATE.mp4"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment