File: source-background-raw-image.sh

package info (click to toggle)
voctomix 1.3-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 3,368 kB
  • sloc: python: 4,958; sh: 733; makefile: 23
file content (27 lines) | stat: -rwxr-xr-x 747 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
confdir="`dirname "$0"`/../"
. $confdir/default-config.sh
if [ -f $confdir/config.sh ]; then
	. $confdir/config.sh
fi

# This script is an example how a static raw image as Background-Loop can be
# looped into voctomix as a background. This approach consumes much less CPU
# the the mpeg-ts based source-scripts.
#
# To generate the required "background.raw" the following command can be used:
#
# ffmpeg \
#   -i background.png \
#   -c:v rawvideo \
#   -pix_fmt:v yuv420p \
#   -frames 1 \
#   -f rawvideo \
#   background.raw

ffmpeg -re -y -f image2 -loop 1 -pixel_format yuv420p \
	-framerate ${FRAMERATE} -video_size ${WIDTH}x${HEIGHT} \
	-i background.raw \
	-c:v rawvideo -pix_fmt yuv420p \
	-f matroska \
	tcp://localhost:16000