I'm trying to use Mac OS X 10.6's mediastreamsegmenter to take the audio input of my mac and turn it into a stream that I could listen to on the iPhone.
I've read this and the related man page. But when I do something like this:
mediastreamsegmenter -s 3 -D -f /tmp/stream localhost:8080
No files appear in the 'stream' directory and when I try and use QuickTime Player X to connect to localhost:8080, no go.
What am I missing here?
According to the tech note that describes the mediastreamsegmenter
tool:
This tool receives an MPEG-2 transport stream over a UDP network connection or from stdin and divides it into a series of small media segments of equal duration. It then creates an index file containing references to the individual media segments.
This means that you will need to have a UDP server running on the machine that you want to do the capture on, that is capable of pushing out the data in a MPEG2 transport stream.
I wasn't able to find anything freely available that captures from a mic input, but here is a series of steps to see a working live streaming that will stream from your iSight.
Before you start, you will need the latest version of VLC.
mediastreamsegmenter -s 3 -D -f /Users/your-user-name/Sites/stream/ 127.0.0.1:2222
and press enter. Make sure to replace your-user-name with your short user name. If you don't know what that is, type whoami
in the TerminalIf all goes well after a few seconds you should see messages like this:
Dec 7 2010 22:46:37.696: Finalized /Users/name/Sites/stream/fileSequence27.ts
Dec 7 2010 22:46:37.741: received 276360 written bytes 260380 skipped 15792 pat/pmt skipped 15792
Dec 7 2010 22:46:48.504: Finalized /Users/name/Sites/stream/fileSequence28.ts
Dec 7 2010 22:46:49.263: received 371112 written bytes 356636 skipped 15792 pat/pmt skipped 15792
To test that everything is working:
http://localhost/~name/stream/prog_index.m3u8
On an iPhone just open MobileSafari and go to the the same URL, e.g. http://your.ip.address/~name/stream/prog_index.m3u8