blob: a853d813aad2fa5b48b8c2951dd09e0bcb92fc4c (
plain)
- #!/bin/sh
- # FIXME: Handle audio
- set -e
- INPUT=../src/omni/show0/earth.mp4
- LOGO=../../content/icon_small.png
- OUTPUT=../tmp/omni/show0/earth.dv
- HEIGHT=360
- VBITRATE=256000
- mkdir -p $(dirname "$OUTPUT")
- # based on http://www.webmproject.org/docs/encoder-parameters/#real-time-cbr-encoding-and-streaming
- # + scale+watermark trick based on http://stackoverflow.com/a/10937357
- # + Add 1s latency (deadline)
- ffmpeg -hide_banner -threads auto -y \
- -i "$INPUT" \
- -i "$LOGO" \
- -filter_complex \
- "[0:v]scale=-1:$HEIGHT[bg];
- [bg][1:v]overlay=main_w-overlay_w-20:main_h-overlay_h-20" \
- -target pal-dv "$OUTPUT"
|