From 7fda1a3bd2a78dab92dfb6fdef9094b14aa16243 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 13 Apr 2017 09:53:35 +0200 Subject: Set HEIGHT (ont SIZE). --- bin/decode+edit | 4 ++-- bin/decode+edit+encode+stream | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/decode+edit b/bin/decode+edit index 3413e01..6061d6b 100755 --- a/bin/decode+edit +++ b/bin/decode+edit @@ -4,7 +4,7 @@ set -e ITERATIONS=${1-1} -SIZE=640x360 +HEIGHT=360 MOVIE=../src/omni/show0/earth.mp4 LOGO=../../content/icon_small.png @@ -15,6 +15,6 @@ mkdir -p $(dirname "$TMPMOVIE") # based on http://video.stackexchange.com/a/16933 ffmpeg -threads auto -y \ - -f lavfi -i "movie=filename=$MOVIE:loop=$ITERATIONS, setpts=N/(FRAME_RATE*TB), scale=$SIZE" \ + -f lavfi -i "movie=filename=$MOVIE:loop=$ITERATIONS, setpts=N/(FRAME_RATE*TB), scale=-1:$HEIGHT" \ -i "$LOGO" -filter_complex 'overlay=main_w-overlay_w-20:main_h-overlay_h-20' \ -an -f yuv4mpegpipe "$TMPMOVIE" diff --git a/bin/decode+edit+encode+stream b/bin/decode+edit+encode+stream index 58144e1..b9c9d7e 100755 --- a/bin/decode+edit+encode+stream +++ b/bin/decode+edit+encode+stream @@ -13,7 +13,7 @@ PORT=${2:-5004} ITERATIONS=${3-0} # endless by default -SIZE=640x360 +HEIGHT=360 BITRATE=500000 MOVIE=../src/omni/show0/earth.mp4 @@ -24,7 +24,7 @@ LOGO=../../content/icon_small.png # example "Real-time CBR Encoding and Streaming" # + Drop frames, aggressively treat as static, and use fastest cpu ffmpeg -threads auto -re \ - -f lavfi -i "movie=filename=$MOVIE:loop=$ITERATIONS, setpts=N/(FRAME_RATE*TB), scale=$SIZE" \ + -f lavfi -i "movie=filename=$MOVIE:loop=$ITERATIONS, setpts=N/(FRAME_RATE*TB), scale=-1:$HEIGHT" \ -i "$LOGO" -filter_complex 'overlay=main_w-overlay_w-20:main_h-overlay_h-20' \ -codec:v vp8 -quality realtime -deadline realtime -cpu-used 15 \ -b:v "$BITRATE" -minrate "$BITRATE" -maxrate "$BITRATE" \ -- cgit v1.2.3