Monday, March 11, 2013

DLNA Review

Back when I reviewed the Droid X2, I mentioned my discovery of DLNA, a media network streaming protocol available on that device and, it turns out, most other wireless devices as well. But DLNA turns out not to be as universally flexible as I had hoped.

To successfully stream content to a device, the DLNA player on that device must be able to support both the codec (i.e., data compression method) and the "container" (i.e., multimedia packaging). But the fun doesn't stop there. Even a single codec such as H.264 has at least a dozen individual settings that must be in right combinations to play on any particular platform.

I have only the most rudimentary understanding of these settings, and would not attempt to explain them here. But I will review my experience in trying to convert my DVD collection into media streamable to my hodge-podge of wireless devices with the aid of Handbrake.

Handbrake is a free program that converts DVDs (and other media formats) into one of two containers, MP4 and MKV, using one of two codecs, ffmpeg and H.264. H.264 is the more advanced of the two (as far as I know) and the one I've been working with. To ease the way for novice users like myself, Handbrake also has a collection of presets for specific devices, supposedly to support their specific capabilities. But these presets are mainly designed for media stored on the devices' internal memory. They are not necessarily designed for DLNA. DLNA devices often list a certain "level" (e.g., "4.1") that describes (I think) that rate at which media can be streamed to it; however, this does not create a one-to-one mapping with codec settings, and in any case seems unlikely to be the culprit in the limits I will describe.

My goal was to create stream-able media for three devices: an iPad2, a Droid X2, and a Sony 3D Blu-ray player. To do this, I used Handbrake to create five H.264 presets -- Normal, High Profile, iPad, iPod Touch, and Android High -- for each of the two containers. In this example, the file server was a Iomega Home Media Drive.

  • Sony Blu-ray: All of the mkv files play correctly. None of the mp4 files played. I should note here that the errors came in two flavors: sometimes the file wasn't even visible as being present on the drive. Sometimes the media was visible, but refused to play. I should note here that Sony distinguishes itself by having the ability to play raw TS_Video files (but only sequentially, not as they would play from the disk itself or as VLC or MPC would play them) over DLNA. But MP4 files? Not that I could find.

  • Droid X2: Ironically, considering that this device introduced me to DLNA, the Droid X2 the weakest of the bunch. Using my test movie and the Droid's default player, mkv files weren't even visible, and of the five mp4 files I created, only two played successfully: iPad and Normal. Now, starting with the iPad presets, I was able to reduce the resolution to a size appropriate to the iPod Touch (and the X2 as well, although the Droid's resolution is technically much higher). This worked, and saved a few hundred MB off the file size from the original iPad preset, but not as much savings as the iPod Touch presets gave me.

  • iPad: This turned out to be the most flexible. Unlike the X2 and the Sony, the iPad doesn't come with a DLNA player built in. I test five DLNA apps, and had positive results with two: 8Player Lite and MediaPlay. Of these two, 8Player Lite is the most stable, but the Lite version limits the playable files to the first five in any given directory. MediaPlay had no such limits, but had trouble finding the server on a number of occasions and doesn't play AVI files. Both players had the same range: they played all the MKV files and they played the MP4 files with the iPad and Normal presets.

Unless my readers school me in media formats, it appears that I will fail to find a Handbrake format that plays on both the X2 and the Sony. Now, I should mention at this point that the most portable container format appears to be AVI. I have quite a collection of AVI movies, brought back from ISAF, but I have no free way of making them myself. (The only truly free AVI maker I could find was Avidemux, but it doesn't read DVD files, and the AVI files I tried to make with it were ALSO unreadable on a couple of the devices.

I should also mention that my Panasonic p55st50 also has built-in wireless, and also has a DLNA player with a broader list of supported formats. But my Denon receiver strips off the sound from the Blu-ray player and sends it to the speakers; if I wanted sound streamed directly to the television to play on the surround-sound, I would need to run a separate sound cable from the television back to the receiver.

The bottom line is that unless one of my readers can give me some guidance here, I will probably despair of creating DLNA Droid-playable movies.

10 comments:

LDiracDelta said...

Dr. Phi,
On my Android devices, I use "ES Explorer" to find `*.mk4` files and the "ES Explorer" seems to have a built-in media player. I too use handbrake and they work fine on my droids.

FYI, DVD decryption can be done with Handbrake. See this. It's actually quite hilarious that this drop-in .dll works... The Handbrake code is clearly looking for it and binding to their API surface.

Dr. Φ said...

I will definitely try the handbrake extension and the app. But to be clear, the Android plays media stored on it pretty well. It is the DLNA that's giving me the problem.

Dr. Φ said...

I should have mentioned another problem. If I ever change the filename of a video, even if I change it right back, the file becomes unplayable on the Sony. It will still play on a laptop just like it always would. But not on the Sony.

Anonymous said...

Right now I just move the media files onto the device and play them that way. I've considered trying to use DLNA or Orb or some streaming thing, but this reminds me that it's probably more trouble than it is worth.

Dr. Φ said...

My television doesn't have its own memory, and working with iTunes is a time-consuming pain. In any case, there is something satisfying about having my whole library "on demand".

Dr. Φ said...

LDirac: I started using ES Explorer. It has a very nice interface, but even the files that were readable crashed or locked up the players that I was using. I could right a 'hole 'nother essay on it. I'm not sure its streaming is DLNA based. It may be my network is too slow, about which I will write shortly.

Anonymous said...

Blatant appeal to authority: I know some of the people on the DLNA team at a major DLNA player pretty well:

DLNA is horribly broken, will never work, and every second of your life that you spend on it is a second stolen by a vicious practical joke masquerading as a standard.* Run, and save yourself while you still can.

*To a first approximation.

Anonymous said...

I have laptop hooked up to my TV. I forget, sometimes, what an extreme outlier that makes me.

Dr. Φ said...

LDirac: I installed XBMC and copied the libdvdcss.dll to the Handbrake directory. Didn't work.

But DVD Decrypter works fine on CSS. I really need a decrypter for other encryption schemes, like the one that makes the DVD look like its 100GB full, for instance.

LDiracDelta said...

Dr. Phi,

When you copied the libdvdcss-2.dll, did you rename it to libdvdcss.dll? Handbrake is looking specifically for the renamed file. I've followed the instructions on this page twice on Win7 32bit and Win 7 64-bit, and both modified handbrake installs worked great for me. The resultant `mk4` files run on my android phone (v 2.3) and my Raspberry pi machine through xbmc.