summaryrefslogtreecommitdiff
path: root/bin/decode+edit+loop+encode+stream
diff options
context:
space:
mode:
Diffstat (limited to 'bin/decode+edit+loop+encode+stream')
-rwxr-xr-xbin/decode+edit+loop+encode+stream3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/decode+edit+loop+encode+stream b/bin/decode+edit+loop+encode+stream
index 5dbe82d..ba70b02 100755
--- a/bin/decode+edit+loop+encode+stream
+++ b/bin/decode+edit+loop+encode+stream
@@ -35,13 +35,14 @@ fi
# based on http://www.webmproject.org/docs/encoder-parameters/#real-time-cbr-encoding-and-streaming
# + loop-in-filter trick based on http://video.stackexchange.com/a/16933
# + scale+watermark trick based on http://stackoverflow.com/a/10937357
+# + scale to square pixels as needed
# + Add 1s latency (deadline)
# + Use same RTP payload types as GStreamer
ffmpeg -hide_banner -threads auto -re \
-f lavfi -i "movie=filename=$INPUT:loop=$ITERATIONS, setpts=N/(FRAME_RATE*TB)" \
-i "$LOGO" \
-filter_complex \
- "[0:v]scale=-2:$HEIGHT[bg];
+ "[0:v]scale=iw*sar*$HEIGHT/ih:$HEIGHT,setsar=1[bg];
[bg][1:v]overlay=main_w-overlay_w-20:main_h-overlay_h-20[v]" \
-map '[v]' \
-pix_fmt yuv420p \