Cookies and Capacitors

Watching movies while the house is asleep: use your iPhone as wireless headphones, for free, with VLC

Sun, Jul 29, 2012 at 12:38AM

It’s almost three in the morning and the Internet is dreadfully dull: Reddit only has purple links, and your Facebook feed has halted. What else is there to do?

Watch Hackers, that’s what.

Turn on the television? Check. Surround sound speakers enabled? Yep. All that’s left to do is load up that AVI in VLC…[deep, thunderous rumble commences]. Shit. That bass is going to wake everyone up, and these headphones have a two-foot cord! If only there was another way to see the epitome of twentieth-century cinema for zero monies, zero preparation, and start watching in less time than it takes to spank the monkey.

Oh, that’s right, there is. Because it said so in the title. In OS X, it’s ridiculously easy. For Windows and Linux boxes, it might be even easier.^1

OS X

  1. Open the Streaming/Transcoding Wizard, select Stream to network, and hit Next.
  2. Choose a file to stream, and continue with the wizard.
  3. Select HTTP as the streaming method, and type /vlcaudio.mp3 as the destination.
  4. Check Transcode video and select Dummy for the codec and 16 for the nitrate.^2 Under the audio section, check Transcode audio, select MP3 as the codec, and choose 256 as the bitrate.
  5. Select MPEG PS as the encapsulation format.
  6. As additional steaming options, leave the defaults and check Local playback.

This should be the MRL given:

:sout=#duplicate{dst=display,dst="transcode{vcodec=dummy,vb=16,acodec=mp3,ab=256}:standard{mux=ps,dst=/vlcaudio.mp3,access=http}"}

If you did everything correctly, the video should be playing on your computer normally. Now, on your iOS device (this might work on Android devices too, I don’t know) open Safari and go to http://your-computer's-ip:8080/vlcaudio.mp3. If you hear the movie…success! If not, fix it.

Hear that? That’s audio lag, and it makes for a miserable experience. Go ahead and use VLC’s keyboard shortcuts to fix the audio sync: J and K. Use J to move the audio back (which will be a few seconds, probably) and K to move it forward (for fine-tuning).