2

I realize this is a very commonly asked question but I haven't found anyone who's run into quite the problem that I'm running into. On my PI I run the following command:

raspivid -o - -t 99999 -w 640 -h 480 -fps 25 |cvlc -v stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264

When I actually connect a client to this stream using I get the following error on the PI:

dummy interface: using the dummy interface module...
main input error: Invalid PCR value in EX_OUT_SET_(GROUP_)PCR !
main mux warning: late buffer mux import (30154)
mux_tx mux warning: packet with too strange dts (dts=1098139800,old-1098961070,pcr=1098961070)

My VLC stream then times out with

Your input can't be opened
VLC is unable to open the MRL 'http://192.168.1.3:8090/'. Check the log for details.

This seems to be a problem with the buffer in VLC perhaps?

I've tried using uv4l with no luck either, having read both this and this and couldn't get anything to take.

I'm wondering if this is in some way related to my network setup. I've got a single 3Com ethernet switch with my PI set to a static IP 192.168.1.3 and my Macbook set to 192.168.1.2 and nothing else on this little network. I'm a bit of a novice when it comes to network stuff so I very well may have done something wrong in how I connected the two?

edit -

The log in VLC on the OSX side says:

access_mms error: cannot connect to 192.168.1.3:8090
main debug: no access modules matched
main error: open of `http://192.168.1.3:8090/' failed
main debug: finished input
main debug: dead input
main debug: changing item without a request (current 0/1)
main debug: nothing to play

Seems to me as though the RPI simply isn't sending anything after the initial error.

edit 2 -

I should mention I know I can communicate between them because I can stream images using two simple openFrameworks applications that I wrote (basically just TCP streaming in C++). This uses the same devices and ethernet switch, so I know they're not completely the problem. The application only streams about 4 fps so isn't usable for what I want, sadly. VLC should be faster (from what I've read it will be) so I'd like to try streaming video using that. I suspect something is misconfigured on VLC on the Pi.

Joshua Noble
  • 141
  • 1
  • 7
  • "Check the log for details" -> Did you? – goldilocks Feb 06 '15 at 09:36
  • I've edited the question above with the log. – Joshua Noble Feb 06 '15 at 10:20
  • Presuming you can connect to the pi some other way from the Mac, check your firewall on both ends -- this doesn't have much to do with VNC, it's just saying it cannot make a connection. It will probably say exactly the same thing if you turn the pi off and try. If you can run a web server on the pi using 8090 and connect to that with a browser on the Mac, then something weird is going on -- but I bet you can't. You'll get the same kind of error. – goldilocks Feb 06 '15 at 11:37
  • I know I can communicate between them because I can stream images using two simple openFrameworks applications that I wrote (basically just TCP streaming in C++). This uses the same devices and ethernet switch, so I know they're not completely the problem. It's just occurred to me that I was using port 11999 on both sides so perhaps something is already using 8090 or maybe some range is blocked by default on the Pi or my little ethernet switch I'm using? Will investigate when I get to my office. Also, will add the above info to my question. – Joshua Noble Feb 06 '15 at 16:53
  • Hello Joshua, did you ever find a solution. It seems this question is a good one but there is a very similar one with allot of answers. http://raspberrypi.stackexchange.com/questions/7446/how-can-i-stream-h-264-video-from-the-raspberry-pi-camera-module-via-a-web-serve – Piotr Kula Feb 08 '16 at 13:23
  • I had a similar problem with same error. on pi i had debug log "nothing to play" and it was no longer streaming as if raspivid failed. A reboot followed by restarting the stream got things working but i'm not sure what caused the problem. – jtlindsey May 17 '21 at 06:01

2 Answers2

0

UV4L works perfectly. You way want to try this example to get the stream with VLC.

strunz
  • 50
  • 1
  • Welcome to raspberrypi.SE. While this might technically be an answer to the question, we usually appreciate if you would take the time to include the most relevant parts of the answer referenced here, in the answer. This is to prevent link rot. Thank you! – Bex Feb 17 '15 at 14:49
0

I used Gstreamer to stream video and audio from Raspberry to my laptop. It worked perfectly and has least latency.see this link.

on the Raspberry Pi I used :

for video streaming :

raspivid -t 999999 -w 1080 -h 720 -fps 25 -hf -b 2000000 -o - | \
gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 \
! gdppay ! tcpserversink host=serverIp port=5000

for audio streaming :

gst-launch-1.0 -v alsasrc device=plughw:Set \
! mulawenc ! rtppcmupay ! udpsink host=clientIp port=5001 sync=false

and on laptop i used :

to receive the video on my laptop:

gst-launch-1.0 -v tcpclientsrc host=serverIp port=5000 \
! gdpdepay ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false

to receive the audio on my laptop:

gst-launch-1.0 -v udpsrc port=5001 caps="application/x-rtp" \
! queue ! rtppcmudepay ! mulawdec ! audioconvert ! autoaudiosink sync=false