Open ahaggart opened 5 years ago
I've been doing some exploration of this issue. One option is ffmpeg
+ ffserver
, which supports a ton of configuration. I got the setup working on my laptop using this guide, but ran into issues (1) trying to get the onboard systems to use the same setup.
The issues on the TX2 and rPi seem to be due to versioning and OS libraries, which could be resolved by running the programs inside a container.
Most help online for ffserver
is severely outdated.
Potential Resources:
Another option is VLC which I couldn't get working at all (in a limited amount of time). This thread looks interesting though, and may be worth trying if ffmpeg
issues persist.
The VLC implementation is currently working and containerized, which is a promising step towards running it on the onboard computers.
There is a noticeable amount of lag (6-10s) due to video buffering on the browser end. There seems to be no way to remedy this using the html5 video player. Reducing this latency may require a more sophisticated stream protocol such as rtsp
, a special streaming format, and a custom player.
Links:
MPEG-DASH
ffmpeg
to use the rPi's hardware support for h264 encodingAnother option is to use something similar to our setup last year, which worked really well.
http://wiki.ros.org/ros_web_video
They seem to simply consume images from a topic and feed them into ffmpeg. We may be able to roll our own version of these tools or fork them and replace ROS with Redis.
Notes from meeting with our faculty adviser, John Graham:
Use MJPEG
with multipart/x-mixed-replace
for low latency streams
example implementation: https://gist.github.com/n3wtron/4624820
Create a framework for encoding raw video from a video device (
/dev/video0
) and serving it as a streaming video file (mp4
,webm
, etc).Difficulty: Hard Skills req: Compiled Language, Video Compression library