Formidable Fox
Posts: 14
Joined: Wed Apr 01, 2015 12:17 am
Location: California

Trouble streaming video from the Raspberry Pi camera to OS X

Tue May 12, 2015 2:49 pm

I'm following the "official" way to stream video to OS X from this Raspberry Pi blog post. Basically the instructions are:
To view the feed on OS X

Download MPlayer.

Alternatively, you can download mplayer using Brew, which we recommend.

Find your IP address by running ifconfig. (Your IP address will be listed in the console output and will probably be of the form 192.168.1.XXX).

Run the following command in Terminal to view the feed using MPlayer:

Code: Select all

nc -l -p 5001 | mplayer -fps 31 -cache 1024 –
To transmit the feed from the Pi with camera module attached

After setting up the “receiving” machine as per the instructions above, run the following commands in a terminal on the “transmitting” Pi:

Code: Select all

raspivid -t 999999 -o – | nc [insert the IP address of the client] 5001
You can then use the commands listed in the “How to use the Raspberry Pi camera software” section above to change the capture time or to add a video effect.
What I'm having trouble with is the first set of instructions. I ended up installing mplayer using brew so that terminal would recognize mplayer as a command. However when I type "nc -l -p 5001 | mplayer -fps 31 -cache 1024 –" into terminal I get the following:
usage: nc [-46AacCDdEFhklMnOortUuvz] [-K tc] [-b boundif] [-i interval] [-p source_port]
[-s source_ip_address] [-w timeout] [-X proxy_version]
[-x proxy_address[:port]] [hostname] [port]
MPlayer 1.1-4.2.1 (C) 2000-2012 MPlayer Team
Can't init Apple Remote.

Playing –.
File not found: '–'
Failed to open –.


Exiting... (End of file)

towolf
Posts: 421
Joined: Fri Jan 18, 2013 2:11 pm

Re: Trouble streaming video from the Raspberry Pi camera to

Wed May 13, 2015 2:12 am

That’s a long "en" dash at the end. A typographic unicode character. It tries to open it as a file with filename '–'.

On the raspivid command line only the normal ascii dash works as a "pipe to standard out" symbol character.

ascii: -
en dash: –
em dash: —

towolf
Posts: 421
Joined: Fri Jan 18, 2013 2:11 pm

Re: Trouble streaming video from the Raspberry Pi camera to

Wed May 13, 2015 2:15 am

Yeah that character is in the original link. That should be changed.

Do a find in your original link and search for "dash". There’s multiple people pointing out the problem in the comments.

Return to “Camera board”