Skip to content

Instantly share code, notes, and snippets.

@maitrungduc1410
maitrungduc1410 / create-vod-hls.sh
Last active August 6, 2024 16:37
Bash scripts to create VOD HLS stream with ffmpeg (Extended version)
#!/usr/bin/env bash
START_TIME=$SECONDS
set -e
echo "-----START GENERATING HLS STREAM-----"
# Usage create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]
[[ ! "${1}" ]] && echo "Usage: create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]" && exit 1
# comment/add lines here to control which renditions would be created
renditions=(
@hsiaosiyuan0
hsiaosiyuan0 / hls.sh
Last active May 13, 2022 21:19
hls demo
#!/usr/bin/env bash
# downloading mv.mp4
download_mv_if_needed() {
if [ ! -f "./videos/mv.mp4" ]; then
mkdir -p ./videos
curl -L https://www.dropbox.com/s/fl02xpyhz8693b0/mv.mp\?dl\=1 -o ./videos/mv.mp4
fi
}