Skip to content

Commit d8a90ec

Browse files
committed
Merge branch 'framerate' into 'master'
Create a global framerate parameter Closes #15 See merge request debconf-video-team/ansible!29
2 parents 9117f3e + fbe15d3 commit d8a90ec

5 files changed

Lines changed: 27 additions & 16 deletions

File tree

inventory/group_vars/all

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
user_name: videoteam
33
storage_username: videodata
44
# crypt(3)ed password. e.g. echo -e changeme | mkpasswd -s -m SHA-512
5-
# mkpasswd is part of the wois package on Debian
5+
# mkpasswd is part of the whois package on Debian
66
user_password_crypted: $6$XQpHonFCApiFLfBJ$jlZu.ywm0Tfeiv87gG8nDUPyChyJjYRO3.O/VEK7w2Ywqqc5lKf1vDKN0UEs1b5Co6SnCaOXcc/jXNCuOk0EH/
77
autologin: true
88

@@ -15,14 +15,9 @@ time_zone: Europe/Brussels
1515

1616
enable_oldstable: true
1717

18-
# check the frequency setting on the camera
19-
# make sure it matches what's the frequency of the local power
20-
# use BlackmagicDesktopVideoSetup to see what the camera is sending
21-
# 720p59.94 is 18
22-
# 720p50 is 17
23-
# also change voctomix framerate below to match
24-
# list of all mode IDs: check 'gst-inspect-1.0 decklinkvideosrc'
25-
blackmagic_default_mode: 17
18+
# Local frequency setting, in Hz
19+
# This can be either 50 or 60Hz
20+
frequency: 50
2621

2722
# To enable proprietary drivers, provide a URL to them.
2823
#blackmagic:
@@ -33,7 +28,6 @@ blackmagic_default_mode: 17
3328

3429
voctomix:
3530
display_system: gl
36-
framerate: 25
3731
# loop_url: http://10.18.0.1/loop/loop.ts
3832
# bgloop_url: http://10.18.0.1/loop/bgloop.ts
3933

inventory/host_vars/voctomix1.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ blackmagic_sources:
1313
# 720p59.94 is 18
1414
# 720p50 is 17
1515
# list of all mode IDs: check 'gst-inspect-1.0 decklinkvideosrc'
16-
mode: "{{ blackmagic_default_mode }}"
1716

1817
voctolights:
1918
- camera: Cam1

roles/voctomix/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,17 @@ Main variables are :
3737
* `room_name`: Name of the room where you are
3838
recording. Used in the video file path.
3939

40+
* `frequency`: The local frequency setting (50 or 60Hz).
41+
Used to derive sensible defaults.
42+
4043
* `sources`: List. Name of the different sources you
4144
want voctomix to use.
4245

4346
* `voctomix.display_system`: Rendering API (OpenGl, Vulkan, etc.) to
4447
use.
4548

4649
* `voctomix.framerate`: Integer. Number of frames per second to
47-
record at.
50+
record at. Defaults to `frequency/2`
4851

4952
* `voctomix.loop_url`: URL of the sponsor loop .ts file.
5053

@@ -70,6 +73,9 @@ Main variables are :
7073
* `streaming.rtmp.vaapi`: Boolean. Use HW-accelerated x264
7174
encoder.
7275

76+
* `blackmagic_default_mode`: Default value for `blackmagic_sources.*.mode`,
77+
computed from `framerate`.
78+
7379
* `blackmagic_sources.*`: Array. Uses the `card`, `connection`,
7480
`audio` and `mode` parameters as
7581
described below. The exact syntax is
@@ -87,6 +93,7 @@ Main variables are :
8793
card. You can get a list of the
8894
different modes by running
8995
`gst-inspect-1.0 decklinkvideosrc`.
96+
Defaults to `blackmagic_default_mode`.
9097

9198
* `rsync_excludes`: List. Paths to exclude during the rsync
9299
copy of the video files.

roles/voctomix/defaults/main.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ sources:
1414

1515
voctomix:
1616
display_system: gl
17-
framerate: 25
17+
framerate: "{{ frequency / 2 }}"
1818
# loop_url: http://example.net/loop.tar.xz
1919

2020
streaming:
@@ -43,3 +43,16 @@ rsync_sshopts: ""
4343
# - camera: Cam1
4444
# port: /dev/ttyUSB0
4545
# host: localhost
46+
47+
# check the frequency setting on the camera
48+
# make sure it matches what's the frequency of the local power
49+
# use BlackmagicDesktopVideoSetup to see what the camera is sending
50+
# list of all mode IDs: check 'gst-inspect-1.0 decklinkvideosrc'
51+
frequency_parameters:
52+
50:
53+
mode: 17 # 720p50
54+
55+
60:
56+
mode: 18 # 720p59.94
57+
58+
blackmagic_default_mode: "{{ framerate_parameters[frequency].mode }}"

roles/voctomix/templates/videoteam-capture-blackmagic.service.j2

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ ExecStart=/usr/bin/voctomix-ingest -v \
1616
{% elif item.1.connection == 'SDI' -%}
1717
connection=1 \
1818
{% endif -%}
19-
{% if item.1.mode is defined -%}
20-
mode={{ item.1.mode }} \
21-
{% endif -%}
19+
mode={{ item.1.mode | default(blackmagic_default_mode) }} \
2220
' \
2321
{% if item.1.audio -%}
2422
--audio-source blackmagic \

0 commit comments

Comments
 (0)