datarhei / restreamer

The Restreamer is a complete streaming server solution for self-hosting. It has a visually appealing user interface and no ongoing license costs. Upload your live stream to YouTube, Twitch, Facebook, Vimeo, or other streaming solutions like Wowza. Receive video data from OBS and publish it with the RTMP and SRT server.
https://docs.datarhei.com/restreamer/
Apache License 2.0
3.79k stars 438 forks source link

Cant connect from web using clappr #82

Closed matigumma closed 5 years ago

matigumma commented 5 years ago

Hello, i need some help in this case, i execute this lines to stream to my website and nothing happen...

docker run -i -t --restart always --name restreamer -e "RS_LOGLEVEL=3" -e "RS_DEBUG=true" -e "RS_AUDIO=none" -e "RS_USERNAME=admin" -e "RS_PASSWORD=xxx" -e "RS_TIMEZONE=America/Argentina/Buenos_Aires" -p 8080:8080 -p 1935:1935 -v /mnt/restreamer/db:/restreamer/db datarhei/restreamer

docker exec -d restreamer ffmpeg -re -rtsp_transport tcp -i rtsp://xxxxxxxxxx@xxxxxxxx -f lavfi -i aevalsrc=0 -vcodec copy -acodec aac -map 0:0 -shortest -f flv -rtsp_transport tcp rtmp://localhost:1935/hls/camara?token=1234567890

and this on website:

<head>
  <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/clappr@latest/dist/clappr.min.js"></script>
</head>
<body>
  <div id="clappr-5c8a897a3d10a"></div>
  <script>var player = new Clappr.Player({
source: 'http://xxxxxxxxxxxx:8080/index.html?stream=camara',
parentId: '#clappr-5c8a897a3d10a',
width: '100%',
height: 'auto'
});
</script>
</body>

can you help me? what i miss?..

ioppermann commented 5 years ago

Hi

Everything you are trying to do, the Restreamer is already doing for you.

You only have to start the Restreamer:

docker run -it --restart always --name restreamer -e "RS_AUDIO=none" -e "RS_USERNAME=admin" -e "RS_PASSWORD=xxx" -e "RS_TIMEZONE=America/Argentina/Buenos_Aires" -p 8080:8080 -v /mnt/restreamer/db:/restreamer/db datarhei/restreamer

Then in the browser you navigate to http://localhost:8080/, log in and enter the RTSP URL (rtsp://xxxxxxxxxx@xxxxxxxx) of your camera into the upper field an press Start.

After this you can embed the player into your website, e.g.: <iframe src="http://xxxxxxxxxxxx:8080/player.html" width="xxx" height="xxx">

matigumma commented 5 years ago

Thanks you!