Zoom in when screen sharing.

This commit is contained in:
Tom Alexander 2024-09-03 19:32:42 -04:00
parent e2a434bde0
commit c58257538a
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
6 changed files with 41 additions and 7 deletions

View File

@ -317,4 +317,32 @@ function encode_webcam {
"rtsp://$USERNAME:$PASSWORD@172.16.16.251:8554/fetch"
}
function speed_up_preprocess_vp8 {
local file_to_cast file_to_save
file_to_cast="$1"
file_to_save="$2"
set -x
# -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 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.
# Could also use -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]"
</dev/null exec ffmpeg \
-i "$file_to_cast" \
-filter:v "setpts=0.66666666*PTS" \
-filter:a "atempo=1.5" \
-c:v vp8 \
-b:v 2M \
-crf 10 \
-bf 0 \
-c:a opus \
-b:a 320k \
-ar 48000 \
-strict -2 \
"$file_to_save"
}
main "${@}"

View File

@ -34,6 +34,7 @@ graphics/qt5-wayland
graphics/vulkan-loader
graphics/vulkan-tools
graphics/vulkan-validation-layers
graphics/wayland-utils
lang/python
lang/rust-nightly
math/gnuplot

View File

@ -6,3 +6,5 @@ IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
makoctl set-mode do-not-disturb
swaymsg output "'Dell Inc. DELL U3014 P1V6N35M329L'" scale 2

View File

@ -6,3 +6,5 @@ IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
makoctl set-mode default
swaymsg output "'Dell Inc. DELL U3014 P1V6N35M329L'" scale 1

View File

@ -1,7 +1,7 @@
[screencast]
#output_name=HDMI-A-1
#max_fps=30
exec_before=/usr/local/bin/disable_notifications
exec_after=/usr/local/bin/enable_notifications
max_fps=30
exec_before=/usr/local/bin/start_screen_share
exec_after=/usr/local/bin/stop_screen_share
chooser_type=simple
chooser_cmd=slurp -f %o -or

View File

@ -22,6 +22,7 @@
# - adwaita-qt5 # For dark theme
# - adwaita-qt6 # For dark theme
- wlsunset
- wayland-utils # for wayland-info
state: present
- name: Install scripts
@ -32,10 +33,10 @@
owner: root
group: wheel
loop:
- src: enable_notifications.bash
dest: /usr/local/bin/enable_notifications
- src: disable_notifications.bash
dest: /usr/local/bin/disable_notifications
- src: start_screen_share.bash
dest: /usr/local/bin/start_screen_share
- src: stop_screen_share.bash
dest: /usr/local/bin/stop_screen_share
- import_tasks: tasks/freebsd.yaml
when: 'os_flavor == "freebsd"'