K
K
KasperOffskyy2016-02-14 21:10:54
RTMP
KasperOffskyy, 2016-02-14 21:10:54

How to stream video from browser to server using rtmp protocol?

For several days I have been racking my brains on how to force the browser using flash or js to transfer the video stream to the server, for example, using the rtmp protocol.
(The server itself is configured and working.)
Tried to use for video transmission: Adobe Flash Media Live Encoder - everything is fine ( H264 ).
But I need to use the browser, not a third-party program.
I started looking for ready-made solutions like: https://github.com/AF83/webcam-streaming and a few more of the same recorders.
Or for example: https://github.com/arut/nginx-rtmp-module/tree/mas...
And its code:

<!DOCTYPE html>
<html>
<head>
    <title>RTMP Publisher</title>
    <script type="text/javascript" src="swfobject.js"></script>
    <script type="text/javascript">
        var flashVars = {
            streamer: 'rtmp://сервер:2933/origin',
            file:'trololo'
        };
        swfobject.embedSWF("RtmpPublisher.swf", "rtmp-publisher", "640", "480", "9.0.0", null, flashVars);
    </script>
</head>
<body>
    <div id="rtmp-publisher">
        <p>Flash not installed</p>
    </div>
</body>
</html>

But no matter how I twisted all these ready-made developments, the broadcast from the browser does not want to be transmitted to the server :(
Maybe someone has come across similar tasks?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Makridenkov, 2016-02-19
@SergIIIth

Hello.
I think you need WebRTC.
Here are the examples https://webrtc.github.io/samples/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question