Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Support websockets for server mode #89

Closed
JiffsMaverick opened this issue Sep 24, 2020 · 2 comments
Closed

Support websockets for server mode #89

JiffsMaverick opened this issue Sep 24, 2020 · 2 comments
Labels
question Further information is requested

Comments

@JiffsMaverick
Copy link

Which version are you using?

v0.9.15

Which operating system are you using?

CentOS 7

Enhancement request

You developed awesome software, thanks! Can you add support websockets for server mode? Here are examples realisation:

websocket-relay.js - it is original implement by JS from jsmpeg library

jsmpeg-stream-go - it is same but implement by Go

@aler9
Copy link
Member

aler9 commented Oct 6, 2020

Hello, you can edit the configuration to receive a stream and send it back in the format your library expects:

paths:
  proxied:
    runOnPublish:  ffmpeg -i rtsp://localhost:8554/$RTSP_SERVER_PATH -f mpegts -codec:v mpeg1video -b:v 800k -r 24 -framerate 24  -codec:a mp2 -b:a 128k -muxdelay 0.001 http://localhost:8082/secret

Unfortunately the mpegts-via-websocket technique is not standardized, so i prefer not to integrate it into rtsp-simple-server - furthermore the technique supports only H264 and AAC, while rtsp-simple-server must support any codec.

The only supported output is rtsp, but nothing forbids from adding ffmpeg commands to the runOnInit, runOnDemand, runOnPublish, runOnRead options.

@aler9 aler9 added the question Further information is requested label Oct 6, 2020
@JiffsMaverick
Copy link
Author

Hello! I get it why you don't want to implement this feature. Yes, there aren't any RFC for this method. But this method is awesome for stream to web pages without any plugins, only with HTML5. My setup has two servers. First server is a proxy with your great server (in proxy mode) for clients who can get RTSP. Another one reason - cameras must have only one incoming connection. Second server is a proxy-converter (it connect to first server) with jsmpeg-stream-go and pure ffmpeg for a lot of other clients with web page viewers. I wanted to simplify this scheme: drop jsmpeg-stream-go and use only your server, because it is made very high quality. But that wasn't destined to happen :)

Anyway, thanks for your reply! Hopefully sometime in the future you will want to add this functionality.

@aler9 aler9 closed this as completed Mar 30, 2021
@bluenviron bluenviron locked and limited conversation to collaborators Mar 30, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants