Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is what I would like to do.

  1. A Linux laptop has a webcam connected to it and captures video and audio in real time
  2. The laptop sends the live video and audio stream to another Linux server which has a better internet connection than the laptop, via RTSP or RTMP or something similar
  3. Any clients that wish to view the stream connect to the Linux server by means of some software such as VLC

The steps 1 and 3 are not a problem, I think I know how to do them. But:

How do I configure the Linux server in step 2 so that it accepts an RTSP stream input and publishes it in some address such as rtsp://my.ip.address/stream.mp4 for example, which can be opened in VLC by any computer? Is crtmpserver the right tool for this? And how do I configure it? I've read like ten different web pages that explain some example configurations for crtmpserver but haven't really found what I was looking for.

share|improve this question

I'm pretty sure you can use vlc to both stream and restream it. I use vlc to stream all my tv channels to all my devices(rtsp, mp4, html5).

Search for vlc media player streaming like

https://www.videolan.org/doc/streaming-howto/en/ch04.html

share|improve this answer

https://net7mma.codeplex.com has a server and client implementation which is compatible with VLC and was created for exactly the scenario you cite. From the website:

This project's goal is to allow developers to deliver media to clients freely in less then 10 lines of code utilizing standards complaint protocol implementations. It also aims to provide a re-usable set of classes for working with Rtsp and Rtp/Rtcp and Sdp.

share|improve this answer

If you just want a plain RTMP stream, you might look at the nginx-rtmp module which looks quite easier to set up than crtmpserver.

Just a general suggestion: H.264 compression is a bit CPU-intensive, so if your server is more powerful than your notebook and the server to notebook-connection is good, it might be an idea to stream just "plain frames" with nearly no encoding or compression to the server and let it handle the rest.

share|improve this answer

It looks like it isn't particularly trivial, however crtmpserver have a tutorial on their wiki here. It looks like you have to configure a lua file and then doing a new cmake of the server. (So very much non-trivial.)

As an alternative, there are other servers that may do this for you more easily such as Red5 and also Adobe has a free offering mentioned in this question.

share|improve this answer

A Linux laptop has a webcam connected to it and captures video and audio in real time

Im using ffmpeg version N-80213-g9511a08 and my system is Ubuntu 15.10

ffmpeg -f video4linux2 -s 320x240 -i /dev/video0 -f flv -s qvga -b 750000 -ar 11025 -metadata streamName=aaa "tcp://server_ip:6666/live" 

The laptop sends the live video and audio stream to another Linux server which has a better internet connection than the laptop, via RTSP or RTMP or something similar

start crtmpserver.lua

./crtmpserver/crtmpserver crtmpserver/crtmpserver.lua

after running the previous command it will show incoming stream like

/home/altanai/crtmpserver/sources/thelib/src/protocols/liveflv/inboundliveflvprotocol.cpp:51 _waitForMetadata: 1 /home/altanai/crtmpserver/sources/thelib/src/netio/epoll/iohandlermanager.cpp:119 Handlers count changed: 11->12 IOHT_TCP_CARRIER /home/altanai/crtmpserver/sources/thelib/src/protocols/liveflv/baseliveflvappprotocolhandler.cpp:45 protocol CTCP(16) <-> TCP(2) <-> [ILFL(3)] registered to app flvplayback /home/altanai/crtmpserver/sources/thelib/src/application/baseclientapplication.cpp:251 Stream INLFLV(1) with name 127.0.0.1_51036 registered to application flvplayback from protocol ILFL(3) /home/altanai/crtmpserver/sources/thelib/src/protocols/liveflv/inboundliveflvprotocol.cpp:184 Stream metadata: 0.000 Lavf57.37.101 0.000 30.000 240.000 2.000 732.422 320.000

Any clients that wish to view the stream connect to the Linux server by means of some software such as VLC

ffplay -i rtmp://server_ip:1935/live/aaa

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.