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 | |
# Usage: | |
# ./ffmpeg_batch.sh mp4 mp4 original/ compressed/ "-vcodec libx265 -crf 28" | |
# ./ffmpeg_batch.sh mp4 m3u8 video_old/ video_new/ "-vcodec libx265 -crf 28 -start_number 0 -hls_time 3 -hls_list_size 0 -f hls" | |
if [ "$#" -ne 5 ]; then | |
echo "Usage: INPUT_FORMAT OUTPUT_FORMAT INPUT_DIR OUPUT_DIR FFMPEG_OPTIONS" >&2 | |
exit 1 | |
fi |