summaryrefslogtreecommitdiff
path: root/bin/stream
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-05-18 08:46:41 +0200
committerJonas Smedegaard <dr@jones.dk>2017-05-18 09:02:53 +0200
commit39bc48eb0e8b9a2b8d43d6f1a612c12d0c70ae23 (patch)
tree15957113d35981a11085bd98a79b399fbbea7a25 /bin/stream
parent6f794349b9c0e7da1190235fdbd5229de533165f (diff)
Convert pixel format explictly as filter (not implicitly as constraint, for each encoding).
Diffstat (limited to 'bin/stream')
-rwxr-xr-xbin/stream4
1 files changed, 1 insertions, 3 deletions
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)' \