Custom streamer.json didn't apply to WebRTC streamer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Anbox Cloud |
Fix Released
|
Medium
|
Simon Fels |
Bug Description
Hi, I following this docs https:/
I created addon hq (means high-quality), and assing it to application. The source of addong is attached. It contains only pre-start hook with following code:
```
#!/bin/bash
mkdir -p /var/lib/anbox
echo '{
"video": {
{ "num_pixels": 2073600, "fps": 60, "min_kbps": 3000, "max_kbps": 6000 },
]
}
}' > /var/lib/
```
I expect that for video <= 1080p bitrate will be between 3000-6000. However it didn't apply. Actually I tried lot of different variants, and also the code form docs page. When container is started I see following logs:
Dec 01 10:21:00 ams-ce47vs858re
...
Dec 01 10:21:00 ams-ce47vs858re
...
platform.cpp:255] Loading streamer configuration from /var/lib/
Dec 01 10:21:00 ams-ce47vs858re
Dec 01 10:21:00 ams-ce47vs858re
As you can see from logs, the streaming resolution is 960x540@25, so my rule should apply, but there is a message:
"No streamer configuration available, using default settings"
Evenmore if I connect to container with shell, I can see that file exists:
ubuntu@
root@ams-
{
"video": {
{ "num_pixels": 2073600, "fps": 60, "min_kbps": 3000, "max_kbps": 6000 },
]
}
}
root@ams-
Either an error in the documentation or something does not work as expected.
Changed in anbox-cloud: | |
status: | In Progress → Fix Committed |
Changed in anbox-cloud: | |
status: | Fix Committed → Fix Released |
Hey,
thanks for reporting your issue!
The reason your streamer.json doesn't get loaded is because it contains invalid JSON:
{
"bitrate_ limits" : [
"video": {
{ "num_pixels": 2073600, "fps": 60, "min_kbps": 3000, "max_kbps": 6000 },
]
}
}
The comma at the bitrate limit line is not allowed and will fail the parser. You can verify yourself in a linter like https:/ /jsonlint. com/
The following streamer.json will work and will be accepted by Anbox:
{
"bitrate_ limits" : [
"video": {
{ "num_pixels": 2073600, "fps": 60, "min_kbps": 3000, "max_kbps": 6000 }
]
}
}
Anbox can be more verbose about logging such errors and we will improve that.