Skip to content
Snippets Groups Projects
Unverified Commit 799c815b authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Configure dedicated GPU for recording/streaming

parent 10285d31
No related branches found
No related tags found
Loading
#!/bin/sh
set
echo "[INFO] Recording to /storage/capture/${EVENT}/${ROOM} started…"
mkdir -p "/storage/capture/${EVENT}"
ffmpeg -y -nostdin -hide_banner -re \
-init_hw_device vaapi=vaapi0:/dev/dri/renderD129 \
-hwaccel vaapi \
-hwaccel_output_format vaapi \
-thread_queue_size 512 -i tcp://localhost:11000?timeout=3000000 \
-map 0:v -c:v:0 mpeg2video -pix_fmt:v:0 yuv420p -qscale:v:0 4 -qmin:v:0 4 -qmax:v:0 4 -keyint_min:v:0 5 -bf:v:0 0 -g:v:0 5 -me_method:v:0 dia -metadata:s:v:0 title="HD" \
-map 0:a:0 -c:a s302m -metadata:s:a:0 title="Native" \
-filter_hw_device vaapi0 \
-filter_complex "[0:v]format=nv12,hwupload[hd];" \
-c:v h264_vaapi \
-flags +cgop -aspect 16:9 \
-r:v:0 60 -g:v:0 180 \
-map "[hd]" \
-metadata:s:v:0 title="HD" \
-map "0:a:0" -metadata:s:a:0 title="native" \
-c:a s302m \
-strict -2 \
-flags +global_header \
-f segment \
......
......@@ -15,15 +15,15 @@ else
fi
ffmpeg -y -nostdin -hide_banner -re \
-init_hw_device vaapi=vaapi0:/dev/dri/renderD128 \
-init_hw_device vaapi=vaapi0:/dev/dri/renderD129 \
-hwaccel vaapi \
-hwaccel_output_format vaapi \
-thread_queue_size 512 -i tcp://localhost:15000?timeout=3000000 \
-filter_hw_device vaapi0 \
-filter_complex "[0:v]hqdn3d,format=nv12,hwupload[hd];" \
-filter_complex "[0:v]format=nv12,hwupload[hd];" \
-c:v h264_vaapi \
-flags +cgop -aspect 16:9 \
-r:v:0 30 -g:v:0 90 -crf:v:0 21 -maxrate:v:0 6M -bufsize:v:0 24M \
-r:v:0 30 -g:v:0 60 -b:v 6M -maxrate:v:0 8M \
-c:a aac -b:a 192k -ar 48000 \
-map "[hd]" \
-metadata:s:v:0 title="HD" \
......
......@@ -15,3 +15,4 @@ StartLimitInterval=0
[Install]
WantedBy=voctomix2-voctocore.service
......@@ -15,3 +15,4 @@ StartLimitInterval=0
[Install]
WantedBy=voctomix2-voctocore.service
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment