GithubHelp home page GithubHelp logo

stefaniuk / docker-streaming-server Goto Github PK

View Code? Open in Web Editor NEW
165.0 18.0 55.0 21 KB

Live streaming server

Makefile 39.34% HTML 15.14% Dockerfile 45.52%
docker-image docker-application video-streaming rtmp hls dash

docker-streaming-server's Introduction

Circle CI Size Version Commit Docker Hub

Docker Streaming Server

A robust way of streaming media content live using the NGINX web server and its RTMP module.

Installation

Builds of the image are available on Docker Hub.

docker pull codeworksio/streaming-server

Alternatively you can build the image yourself.

docker build --tag codeworksio/streaming-server \
    github.com/codeworksio/docker-streaming-server

Quickstart

Start container using:

docker run --detach --restart always \
    --name streaming-server \
    --hostname streaming-server \
    --publish 1935:1935 \
    --publish 8080:8080 \
    --publish 8443:8443 \
    codeworksio/streaming-server

Example

  1. Start the streaming server and consumer from the command line

    cd ./documents/examples
    docker-compose up -d
  2. Use Open Broadcaster Software to stream your content

    • Add media source Sources > + > Video Capture Device
    • Configure streaming server Controls > Settings > Stream
      • Stream type: Custom Streaming Server
      • URL: rtmp://localhost/live
      • Stream key: test
    • Press Start Streaming button
  3. Go to http://localhost:9999 URL address in your browser to view the media live.

See

docker-streaming-server's People

Contributors

j4qfrost avatar stefaniuk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-streaming-server's Issues

How do I use the ports?

Hello,

The readme example export ports 1935, 8080 and 8443. I can confirm this in Dockerfile. A few lines below there is an example with localhost:9000.

The file nginx.conf listen at 1935 and 8080.

What is the goal of each port?

Nginx rtmp hls problem

Video stream problem in http server output behind the Box

My problem :

Context :

Box Bbox Fit Fiber 400 Mb/s firmware 20.8.8

NGINX/RTMP/HLS web server (Ubuntu connected directly to the Box in RJ 45) video powered by OBS Studio (Windows 11) connected to the Ubuntu server via Wi-Fi by ASUS router/VPN Nordnet.

Internally everything works well the http page is displayed and we can launch the video normally
OK on 127.0.0.1
Ok on Localhost
OK on the Fixed IP address of the Web server connected by cable to the Box
OK on the real external address of the Box and not on the address seen from the VPN (knowing that port 80 points to the IP address of the Web server)
OK on the domain name which returns to the external address of the Box (certainly via the Loopback of the Box) which suggests that all the parameters are correct

Externally (another local network or 4G connection) the web page is displayed but the video stream cannot be launched (video player timeout with message "the media could not be loaded, either because the server or network failed or because the format is not supported" ) just as if the Box (or a Bouygues server) or my NGINX/RTMP/HLS configuration does not allow the video stream to pass to the outside.

All possible tests have been made: deactivation of the firewall, Web server in DMZ, activation or deactivation of remote access to the box, etc, etc...
nothing helps the video stream stubbornly refuses to go out....

It works perfectly in the LAN, how to make it work perfectly in the WAN as well? can be an NGINX setting or etc/hosts file or NAT rule.....
Bouygues support does not even understand the problem and is unable to tell me if this is a characteristic of the Box or the chosen subscription or if other Box models would be more appropriate or with what parameters to play.

Please help me
thanks in advance

Documentation about how to add Subtitles / Captions

This is more a feature request for the documentation.

I have been researching possibilities to stream out-of-band subtitles into HLS and tried to follow the instructions from: https://hlsbook.net/how-to-add-subtitles-to-a-live-hls-stream/ but did not succeed yet with this wonderful system + videojs clientside.

it seems to me that this should work but for some reason the client does not get the (correct) cues from the hls stream. Maybe the timecode information does not work with live streams as I expected?

Is there a configuration of the streaming server that would change that?

including docker volume = "Specified “type” attribute of “application/x-mpegURL” is not supported in browser?"


update:

to make this work as advertised I have commented out the server volume from the compose file as it appears to be the cause of everything that follows. any insight into the problem would be very much appreciated.

#    volumes:
#      - ../../mounts/var/lib/streaming:/var/lib/streaming

IF I LEAVE VOLUMES MOUNTED....

i cant run the live video.js stream in the browser i dont know if its a video.js or docker-streaming-server issue yet.

request URL: http://192.168.99.100/hls/test.m3u8

server response:

<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.13.8</center>
</body>
</html>

the server is definitely not replying to request for file...

$curl 192.168.99.100:8080/hls/test.m3u8
curl: (52) Empty reply from server

starting the server with

cd documents/examples
docker-compose up -d

error reported in firefox and chrome.

Specified “type” attribute of “application/x-mpegURL” is not supported. Load of media resource http://192.168.99.100:8080/hls/test.m3u8 failed.
192.168.99.100:9999
VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) The media could not be loaded, either because the server or network failed or because the format is not supported. 
Object { code: 4, message: "The media could not be loaded, either because the server or network failed or because the format is not supported." }
video.min.js:1:29532

output of the streaming-server each time i load the browser.


2018/04/10 11:27:11 [alert] 12#12: *139 fcntl(O_DIRECT) "/var/lib/streaming/hls/test.m3u8" failed (22: Invalid argument), client: 192.168.99.1, server: , request: "GET /hls/test.m3u8 HTTP/1.1", host: "192.168.99.100:8080", referrer: "http://192.168.99.100:9999/"
2018/04/10 11:27:11 [crit] 12#12: *139 io_submit("/var/lib/streaming/hls/test.m3u8") failed (22: Invalid argument) while sending response
to client, client: 192.168.99.1, server: , request: "GET /hls/test.m3u8 HTTP/1.1", host: "192.168.99.100:8080", referrer: "http://192.168.99.100:9999/"

any help appreciated. thanks.

Bug In Example Configuration

To replicate:
As per example instructions, enter /documents/examples and run docker-compose up -d
Wait for build to complete.
streaming-consumer comes up fine, streaming-server immediately quits.

streaming-server log:
/sbin/entrypoint.sh: source /sbin/init.d/00-bootstrap-ubuntu.sh
/sbin/entrypoint.sh: source /sbin/init.d/01-bootstrap-nginx.sh
nginx: [emerg] mkdir() "/var/lib/streaming/hls/" failed (13: Permission denied)

Android support ?

Hello,
it's very nice to be able to set up streaming from desktop so easily, thank you.
Just one question/request.

It's not compatible with android devices. Is there something we can do to make it work on android ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.