Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebRTC Video viewer #259

Closed
hu-o opened this issue Mar 24, 2018 · 15 comments
Closed

WebRTC Video viewer #259

hu-o opened this issue Mar 24, 2018 · 15 comments
Labels

Comments

@hu-o
Copy link

hu-o commented Mar 24, 2018

Salut !

OSC is amazing ! I'm trying to use it for live video control surfaces (Video mixing, VJing,...), so having the ability to have video views on the pages would be really great !

As very low latency is the key to these usages, I think WebRTC could be an option. I'm experimenting with https://www.medialooks.com/ndi, a little new software that takes NDI or SDI live video feeds and convert them to WebRTC.

Any chance to have that kind of feature implemented one day ? What could be the approach if I want to add that ?

Hugo

@jean-emmanuel
Copy link
Owner

I've done some tests, here's what seems to be possible:

  • a server option to define RTSP urls (rtsp://...) and encoding options (framerate, resolution, quality)
  • a Stream widget that displays the video stream

I don't think very low latency (as in milliseconds) is possible here, but hopefully decent latency is.

@hu-o
Copy link
Author

hu-o commented Mar 24, 2018

A stream widget would be very cool indeed ! The server side could probably be handled by ffmpeg ? It should be possible to achieve 1-200ms latency on a local network.

What strike me about webRTC is that I always tough web pages / web interfaces would always be somewhat limited in term of latency performances for live monitoring of audio and video signals. With WebRTC I can have Chrome displaying the feed of the camera of another device with no perceivable latency (below 40ms) . This mean you could do entire software interface with OSC, including audio and video feeds monitoring.

@jean-emmanuel
Copy link
Owner

jean-emmanuel commented Mar 24, 2018

Yep, server-side ffmepg is what I had in mind, I just pushed a something to be tested if you can build the app from sources:

  • set the server's video-streams option to a valid rtsp url
  • create an Image widget and set its stream property to 0

note:

  • video-streams: one or multiple rtsp urls separated by spaces, and (optionnal) settings: framerate=<int> and resolution=<int>x<int>
  • stream: rtsp url index starting at 0.

@jean-emmanuel
Copy link
Owner

Maybe with a powerful computer you'll get decent latency, I can't tell with mine.

I'm not going to implement any audio handling in O-S-C. Actually I'm not even sure yet this stream experimentation should be included in the end. Audio and video both come with specific performance concerns I'm not willing to address: separation of concerns is the key, O-S-C does the controls, not audio/video processing.

@hu-o
Copy link
Author

hu-o commented Mar 24, 2018

Wow, that was fast !

Can't wait to try that, give me a day or two.

@hu-o
Copy link
Author

hu-o commented Mar 24, 2018

Yes, I hunderstand the concern. I think this is not out of context. For live perforances involving pictures and video, I think this is right in the scope of O-S-C. If you'r on stage with a O-S-C tablet, being able to monitor the live feed of a camera in the interface to frame it is gold. If you're controlling VJ style shows, being able to click on the thumbnail of a video or feed to send it to display is cool.

Thumbnails of live video to create better control interface is what I have in mind. No processing or anything that does'nt relate UI/control.

@hu-o
Copy link
Author

hu-o commented Mar 26, 2018

oscfreezed

If I try to specify a rtsp url, I got this error. This rtsp URL can be opened and work in VLC.

@jean-emmanuel
Copy link
Owner

You need to install ffmpeg : http://www.ffmpeg.org/download.html

jean-emmanuel added a commit that referenced this issue Mar 26, 2018
jean-emmanuel added a commit that referenced this issue Mar 26, 2018
@jean-emmanuel
Copy link
Owner

I've been giving this some thoughts and doing a few researchs, and I'm going to remove this from the core app. The proposed test is just a very simple conversion from rtsp stream to base64-encoded jpeg images that are sent to the Image widget. This is easy to handle externally and would avoid O-S-C being responsible for ffmpeg's state (which seems inconsistent). I'll create a repository to demonstrate that.

As for an actual WebRTC implementation, it's a real PITA as far as I can see and is not worth the effort given that the previous solution looks promising enough and matches O-S-C's logic.

@jean-emmanuel
Copy link
Owner

@jean-emmanuel
Copy link
Owner

@jblanteigne @hu-o
I've been thinking of another solution: adding a "frame" widget that would allow users to embed external http pages to their interface, you'd just have to configure a webrtc stream server that can be reached through http such as https://github.com/mpromonet/webrtc-streamer. What do you think ?

@hu-o
Copy link
Author

hu-o commented Aug 28, 2018 via email

@jean-emmanuel
Copy link
Owner

@baronlanteigne
Copy link

Good idea. It will be lighter than converting the frames with ffmpeg. I will test whenever I have time. Thanks!

@jean-emmanuel
Copy link
Owner

@hu-o how did the iframe solution turned out so far for you ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants