From 39bc48eb0e8b9a2b8d43d6f1a612c12d0c70ae23 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 18 May 2017 08:46:41 +0200 Subject: Convert pixel format explictly as filter (not implicitly as constraint, for each encoding). --- bin/stream | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'bin/stream') diff --git a/bin/stream b/bin/stream index a66d869..ce90206 100755 --- a/bin/stream +++ b/bin/stream @@ -160,7 +160,7 @@ HEIGHTS=$(uniqwords "$HEIGHTS_WEBM $HEIGHTS_MPEG") filter_split_height() { heightcount=$(echo "$HEIGHTS" | wc --words) - echo_n "[$VSTREAMINDEX:v]${DEINT:+$DEINT,}split=$heightcount" + echo_n "[$VSTREAMINDEX:v]${DEINT:+$DEINT,}format=pix_fmts=yuv420p,split=$heightcount" printf_each '[s%s]' "$HEIGHTS" } filter_scale() { outstem=${1:-v}; @@ -209,7 +209,6 @@ ffmpeg -hide_banner -threads auto \ ${HASAUDIO:+\ -codec:a libopus -ac "$ACHANNELS" -ar "$AFRAMERATE_OPUS" -b:a "$ABITRATE_OPUS" } \ ${HASVIDEO:+\ - -pix_fmt yuv420p \ -codec:v vp8 -quality realtime -deadline 1000000 -cpu-used "$SPEED_VP8" \ -b:v "$VBITRATE" -minrate "$VBITRATE" -maxrate "$VBITRATE" \ -undershoot-pct 95 -bufsize $((6000*VBITRATE/1000)) -rc_init_occupancy $((4000*VBITRATE/1000)) \ @@ -225,7 +224,6 @@ ffmpeg -hide_banner -threads auto \ ${HASAUDIO:+\ -codec:a aac -strict experimental -ac "$ACHANNELS" -ar "$AFRAMERATE_AAC" -b:a $((ACHANNELS*ABITRATE_AAC)) } \ ${HASVIDEO:+\ - -pix_fmt yuv420p \ -codec:v libx264 -preset "$SPEED_X264" -tune zerolatency \ -maxrate "$VBITRATE" -bufsize "$((VBITRATE*2))" -crf 23 } \ -force_key_frames 'expr:gte(t,n_forced*2)' \ -- cgit v1.2.3