Created
December 29, 2015 10:11
-
-
Save omeroot/e0dac84987de0255ce98 to your computer and use it in GitHub Desktop.
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
| #!/bin/bash | |
| #transcode your video and outputs is video_1080p.mp4,video_720p.mp4,video_480p.mp4 | |
| output_directory=$1 | |
| extention=$2 | |
| echo $output_directory | |
| main_video="$output_directory/video.$2" | |
| out_1080="$output_directory/video_1080p.mp4" | |
| out_720="$output_directory/video_720p.mp4" | |
| out_480="$output_directory/video_480p.mp4" | |
| ffmpeg -i $main_video \ | |
| -s 1920x1080 -c:v libx264 -b:v 2000k -bufsize 2000k -maxrate 2100k -bf 2 -g 90 -sc_threshold 0 -c:a aac -strict experimental -b:a 128k -ar 48000 $out_1080 \ | |
| -s 1280x720 -c:v libx264 -b:v 1200k -bufsize 1200k -maxrate 1400k -bf 2 -g 90 -sc_threshold 0 -c:a aac -strict experimental -b:a 96k -ar 44100 $out_720 \ | |
| -s 854x480 -c:v libx264 -b:v 400k -bufsize 400k -maxrate 500k -bf 2 -g 90 -sc_threshold 0 -c:a aac -strict experimental -b:a 64k -ar 44100 $out_480 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment