Implement Insta360 video streaming to RTMP
Description
In #461 (closed) we explored a potential implementation of WIP 0007 (additional discussions in #417 (closed), !191 (merged)).
We need to add SRS server to support RTMP and WebRTC layers, and implement a perpetual, network-condition-tolerant streaming from Insta360 to RTMP.
Example script with barebones functionality available in MR !201 (closed), file video2rtmp.py. The example script suffers from random stream/connection failures (did not investigate the causes).
The script needs to be able to run against an Insta360 DeviceConnection object, and run this loop:
- Try connecting to a camera
- In case of connection failure, wait a bit and retry
- Upon successful connection, start preview stream
- Launch FFmpeg process and stream this to SRS on some endpoint like
/live/device_connection_[ID] - In case of any network failures (reliability improvements in #462), clean up properly, and go to 1
Scope
- Implement a script that'll run perpetually
MRs
Edited by Milos