hls-test/booster.sh

33 lines
940 B
Bash
Raw Normal View History

2022-06-06 22:38:07 +00:00
MOVFLAGS="-movflags +frag_keyframe+empty_moov+default_base_moof+faststart"
BITRATE_HI="-b:v 3840k"
BITRATE_LO="-b:v 2560k"
VIDEO_H264="-vcodec h264 $BITRATE_HI"
VIDEO_H263="-vcodec h263 -b:v 1280k"
VIDEO_H263_PLUS="-vcodec h263p -b:v 1280k"
VIDEO_JPEG="-vcodec mjpeg"
VIDEO_VP8="-vcodec libvpx $BITRATE_HI"
VIDEO_VP9="-vcodec libvpx-vp9 -row-mt 1 $BITRATE_LO"
AUDIO_AAC="-ac 2 -ar 44100 -vb 128k"
AUDIO_MP3="-acodec libmp3lame -ac 2 -ar 44100 -vb 128k"
AUDIO_OPUS="-acodec libopus -ac 2 -ar 48000 -vb 128k"
AUDIO_VORBIS="-acodec libvorbis -ac 2 -ar 44100 -vb 128k"
ffmpeg \
-i polyphon.ogv \
-i polyphon.ogv \
$AUDIO_MP3 \
$VIDEO_VP9 \
$BITRATE_LO \
-vf "drawtext=text='booster.mp4 (vp9)':fontsize=72:fontcolor=yellow" \
-an \
$VIDEO_JPEG \
$BITRATE_LO \
-vf "drawtext=text='booster.mp4 (jpeg)':fontsize=72:fontcolor=purple,scale=640x360" \
$MOVFLAGS \
-map 0:a:0 \
-map 0:v:0 \
-map 1:v:0 \
-y booster.mp4