linux - Get network stream and forward it
2014-07
I have a small problem with streaming from Raspberry Pi. I'm using raspberry Pi Camera and streaming output from it this way:
raspivid -o - -t 0 -w 640 -h 480 | cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8554}' :demux=h264
I have public access to port 8554 and nothing else from my provider. The problem is, that I want to view the stream also on firewall secured networks (for example from my office, public networks, etc.), where a lot of ports are disabled. I have small VPS with public IP address. So, is there any way how to get output (on my VPS) from raspberry:8554 and pass it to port 80? I tried something like:
cvlc -vvv http://raspberry:8554 --sout '#standard{access=http,mux=ts,dst=0.0.0.0:80}' :demux=h264
but the video is grey or green and I can't recognize even shapes. Do you have any suggestions? Thanks a lot!
The best Idea that comes to mind is installing zoneminder on your VPS. Zoneminder will administer the stream from your cam and serve it in a web interface.
You also get the motion detection, alarms and video storage functionalities of Zoneminder.
This is way more than you asked, but my reasoning is that if you need to check your cam wherever you are you should do it with professional grade software.
I'm trying to get VLC to work streaming RTP audio/video over my office network. The goal is multicast a/v streaming.
In all test cases, we are streaming from VLC to VLC. I am able to stream from Windows to Windows, and from Fedora to Windows, but not from Windows to Fedora. Additionally, I am unable to receive a LOCAL stream from one instance of VLC to another, within Fedora.
I don't see any reason why this would be. The buffer indicator (where the elapsed/total time is normally displayed) never shows any connectivity, so it would appear to be a network problem, but since I am able to stream from Fedora to Windows (same IP, same port) I thought it would be something else.
Does anyone know of a solution to this issue?
EDIT: Correction to previous edit: the IGMPv3 protocol was just not being picked up by Wireshark. Reverting to IGMPv2, I am able to pick up the Membership Report, Join, and Leave group packets from the Linux machine.
I'm using the GUI to configure the following:
CLIENT
rtp://@239.255.12.42 :rtp-caching=1000
SERVER:
screen:// :screen-fps=30.000000 :screen-caching=300 :sout=#transcode
{vcodec=mp4v,vb=800,fps=30,acodec=mp4a,ab=128,channels=2,samplerate=44100}
:rtp{dst=239.255.12.42,port=5004,mux=ts}
:no-sout-rtp-sap :no-sout-standard-sap :sout-keep
MOST of this is default settings, for the given methods, which I haven't really changed. I've also tried adding the :5004 to the client URL to explicitly give the port, but received no different effect.
The reason came down to a few complications in the network setup, based on a faulty switch. For some reason it was passing traffic one direction as it should, but not the other. Replacing the switch solved the problem.