Skip to content
Snippets Groups Projects
Commit 9e2d52fa authored by Florent Thiery's avatar Florent Thiery
Browse files

apply custom config for demokit, refs #26945

parent 7dc28b0b
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import utils import utils
import json import json
import subprocess
CONTENT = [ CONTENT = [
"https://www.ubicast.eu/media/downloads/TradeshowDemoKit/medical_education.zip", "https://www.ubicast.eu/media/downloads/TradeshowDemoKit/medical_education.zip",
...@@ -20,13 +21,18 @@ def setup(interactive=True): ...@@ -20,13 +21,18 @@ def setup(interactive=True):
cmd = cmd_template % c cmd = cmd_template % c
cmds.append(cmd) cmds.append(cmd)
cmds.append('rsync -r mirisconf /etc/miris/conf')
cmds.append('netcapturectl add') cmds.append('netcapturectl add')
# hw acceleration requires boot-time module options so a reboot will be needed
with open('/etc/miris/netcapture.json.example', 'r+') as f: # try to enable hw accel if available
c = json.load(f) subprocess.getstatusoutput("apt install -y vainfo")
c['enable_hw_acceleration'] = True if subprocess.getstatusoutput("vainfo")[0] == 0:
json.dump(c, f) # hw acceleration requires boot-time module options so a reboot will be needed
cmds.append('echo "options i915 enable_guc_loading=1 enable_guc_submission=1" > /etc/modprobe.d/netcapture.conf') with open('/etc/miris/netcapture.json.example', 'r+') as f:
cmds.append('update-initramfs -u') c = json.load(f)
c['enable_hw_acceleration'] = True
json.dump(c, f)
cmds.append('echo "options i915 enable_guc_loading=1 enable_guc_submission=1" > /etc/modprobe.d/netcapture.conf')
cmds.append('update-initramfs -u')
print('A reboot is required')
utils.run_commands(cmds) utils.run_commands(cmds)
print('A reboot is required')
{
"audio_output_enabled": false,
"videomixer_width": 2560,
"videomixer_height": 1440,
"gst_debug_string": "3",
"framerate": 30,
"autopublish_targets": [{"name": "sonydemo", "channel_oid": "c125ace5617a3a80boud"}],
"autoremove": true,
"gop_size_s": 1,
"benchmark_dur_s": 10,
"benchmark_mode": false,
"videosources": [
{
"enabled": true,
"name": "sonycam_1",
"template": "rtspvsource",
"uri": "rtsp://camera/media/video1",
"width": 1280,
"height": 720,
"custom_delay_ms": 100
},
{
"enabled": true,
"name": "sonyve_1",
"template": "rtspvsource",
"uri": "rtsp://display/media/video1",
"width": 1920,
"height": 1080,
"custom_delay_ms": 150,
"enable_change_detection": true
},
{
"enabled": false,
"name": "canon_1",
"template": "rtspvsource",
"uri": "rtsp://root:camera@192.168.43.115/stream/profile1=r",
"custom_delay_ms": -220,
"width": 1920,
"height": 1080
},
{
"enabled": false,
"name": "q1755",
"template": "rtspvsource",
"uri": "rtsp://root:admin@192.168.1.233/axis-media/media.amp?streamprofile=Quality",
"custom_delay_ms": -60,
"width": 1280,
"height": 720
},
{
"enabled": false,
"name": "rawrtpvideo1",
"template": "rawrtpvsource",
"port": 6008,
"width": 1920,
"height": 1080
},
{
"enabled": false,
"name": "vtest1",
"template": "vtestsource",
"pattern": "smpte",
"width": 1920,
"height": 1080
},
{
"enabled": false,
"name": "benchtest1",
"template": "benchtestsource",
"width": 1920,
"height": 1080
}
],
"audiosources": [
{
"enabled": false,
"name": "alsa1",
"template": "alsasource",
"device": "hw:0,1",
"channels": 1,
"format": "S16LE",
"rate": 44100
},
{
"enabled": true,
"name": "sonycam_1",
"template": "rtspasource",
"channels": 1,
"format": "S16LE",
"rate": 44100
},
{
"enabled": true,
"name": "sonyve_1",
"template": "rtspasource",
"channels": 1,
"format": "S16LE",
"rate": 44100
},
{
"enabled": false,
"name": "srg360_1",
"template": "rtspasource_adts_workaround",
"channels": 1,
"format": "S16LE",
"rate": 44100
},
{
"enabled": false,
"name": "rawrtpaudio1",
"template": "rawrtpasource",
"port": 6010,
"channels": 2,
"format": "S16LE",
"rate": 44100
},
{
"enabled": false,
"name": "atest1",
"template": "atestsource",
"wave": "ticks",
"channels": 1,
"format": "S16LE",
"rate": 44100
}
],
"streams": [
{
"width": 2560,
"height": 1440,
"framerate": 30,
"h264profile": "baseline",
"video_bitrate": 16000000,
"audio_bitrate": 128000
},
{
"width": 1920,
"height": 1080,
"framerate": 30,
"h264profile": "baseline",
"video_bitrate": 8000000,
"audio_bitrate": 128000
},
{
"width": 1280,
"height": 720,
"framerate": 30,
"h264profile": "baseline",
"video_bitrate": 4000000,
"audio_bitrate": 128000
},
{
"width": 640,
"height": 360,
"framerate": 30,
"h264profile": "baseline",
"video_bitrate": 1000000,
"audio_bitrate": 128000
}
]
}
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