Skip to content

Instantly share code, notes, and snippets.

View Clement-Jean's full-sized avatar
🏠
Working from home

Clément Jean Clement-Jean

🏠
Working from home
View GitHub Profile
@Clement-Jean
Clement-Jean / ffmpeg_batch.sh
Last active January 19, 2022 14:15
Batch execution for FFMPEG
#! /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