Tint the screen at night.
This commit is contained in:
@@ -49,7 +49,7 @@ function copy {
|
||||
PASSWORD="$2"
|
||||
|
||||
set -x
|
||||
exec ffmpeg \
|
||||
</dev/null exec ffmpeg \
|
||||
-re \
|
||||
-stream_loop -1 \
|
||||
-i "$file_to_cast" \
|
||||
@@ -71,7 +71,7 @@ function h264 {
|
||||
set -x
|
||||
|
||||
# -bf 0 :: Disable b-frames because webrtc doesn't support h264 streams with b-frames.
|
||||
exec ffmpeg \
|
||||
</dev/null exec ffmpeg \
|
||||
-re \
|
||||
-stream_loop -1 \
|
||||
-init_hw_device vaapi=foo:/dev/dri/renderD128 \
|
||||
@@ -100,7 +100,7 @@ function preprocess_hardware_h264 {
|
||||
set -x
|
||||
|
||||
# -bf 0 :: Disable b-frames because webrtc doesn't support h264 streams with b-frames.
|
||||
exec ffmpeg \
|
||||
</dev/null exec ffmpeg \
|
||||
-init_hw_device vaapi=foo:/dev/dri/renderD128 \
|
||||
-hwaccel vaapi \
|
||||
-hwaccel_output_format vaapi \
|
||||
@@ -109,9 +109,12 @@ function preprocess_hardware_h264 {
|
||||
-filter_hw_device foo \
|
||||
-vf 'format=nv12|vaapi,hwupload' \
|
||||
-c:v h264_vaapi \
|
||||
-b:v 2M \
|
||||
-profile:v high \
|
||||
-bf 0 \
|
||||
-strict -2 \
|
||||
-c:a opus \
|
||||
-ac 2 \
|
||||
-b:a 320k \
|
||||
-ar 48000 \
|
||||
"$file_to_save"
|
||||
@@ -128,7 +131,7 @@ function software_h264 {
|
||||
set -x
|
||||
|
||||
# -bf 0 :: Disable b-frames because webrtc doesn't support h264 streams with b-frames.
|
||||
exec ffmpeg \
|
||||
</dev/null exec ffmpeg \
|
||||
-re \
|
||||
-stream_loop -1 \
|
||||
-i "$file_to_cast" \
|
||||
@@ -150,7 +153,7 @@ function preprocess_h264 {
|
||||
set -x
|
||||
|
||||
# -bf 0 :: Disable b-frames because webrtc doesn't support h264 streams with b-frames.
|
||||
exec ffmpeg \
|
||||
</dev/null exec ffmpeg \
|
||||
-i "$file_to_cast" \
|
||||
-c:v h264 \
|
||||
-bf 0 \
|
||||
@@ -171,7 +174,7 @@ function vp9 {
|
||||
set -x
|
||||
|
||||
# -bf 0 :: Disable b-frames because webrtc doesn't support h264 streams with b-frames.
|
||||
exec ffmpeg \
|
||||
</dev/null exec ffmpeg \
|
||||
-re \
|
||||
-stream_loop -1 \
|
||||
-init_hw_device vaapi=foo:/dev/dri/renderD128 \
|
||||
@@ -200,7 +203,7 @@ function preprocess_hardware_vp9 {
|
||||
set -x
|
||||
|
||||
# -bf 0 :: Disable b-frames because webrtc doesn't support h264 streams with b-frames.
|
||||
exec ffmpeg \
|
||||
</dev/null exec ffmpeg \
|
||||
-init_hw_device vaapi=foo:/dev/dri/renderD128 \
|
||||
-hwaccel vaapi \
|
||||
-hwaccel_output_format vaapi \
|
||||
@@ -229,14 +232,14 @@ function software_vp8 {
|
||||
|
||||
# -bf 0 :: Disable b-frames because webrtc doesn't support h264 streams with b-frames.
|
||||
# -strict -2 :: Enable support for experimental codecs like opus.
|
||||
# -b:v 1M :: Target 1 megabit/s
|
||||
# -b:v 2M :: Target 2 megabit/s
|
||||
# -crf 10 :: Target a quality level and adjust bitrate accordingly. This should be preferred, but ideally both should be used.
|
||||
exec ffmpeg \
|
||||
</dev/null exec ffmpeg \
|
||||
-re \
|
||||
-stream_loop -1 \
|
||||
-i "$file_to_cast" \
|
||||
-c:v vp8 \
|
||||
-b:v 1M \
|
||||
-b:v 2M \
|
||||
-crf 10 \
|
||||
-bf 0 \
|
||||
-c:a opus \
|
||||
@@ -257,12 +260,12 @@ function preprocess_vp8 {
|
||||
|
||||
# -bf 0 :: Disable b-frames because webrtc doesn't support h264 streams with b-frames.
|
||||
# -strict -2 :: Enable support for experimental codecs like opus.
|
||||
# -b:v 1M :: Target 1 megabit/s
|
||||
# -b:v 2M :: Target 2 megabit/s
|
||||
# -crf 10 :: Target a quality level and adjust bitrate accordingly. This should be preferred, but ideally both should be used.
|
||||
exec ffmpeg \
|
||||
</dev/null exec ffmpeg \
|
||||
-i "$file_to_cast" \
|
||||
-c:v vp8 \
|
||||
-b:v 1M \
|
||||
-b:v 2M \
|
||||
-crf 10 \
|
||||
-bf 0 \
|
||||
-c:a opus \
|
||||
@@ -281,7 +284,7 @@ function webcam {
|
||||
|
||||
set -x
|
||||
|
||||
exec ffmpeg \
|
||||
</dev/null exec ffmpeg \
|
||||
-re \
|
||||
-input_format h264 \
|
||||
-video_size 1920x1080 \
|
||||
@@ -302,7 +305,7 @@ function encode_webcam {
|
||||
|
||||
set -x
|
||||
|
||||
exec ffmpeg \
|
||||
</dev/null exec ffmpeg \
|
||||
-re \
|
||||
-vaapi_device /dev/dri/renderD128 \
|
||||
-i /dev/video0 \
|
||||
|
||||
Reference in New Issue
Block a user