Page 3 of 3123

Picture the situation:

  1. You’ve acquired a film with the intention of enjoying it streamed over your network from your media server to your TV via the miracle of DLNA.
  2. Your current media setup is the result of many, many hours of experimentation, trying different servers and programs for encoding files or ripping your DVDs.
  3. You copy your new file into your shared media location and eagerly fire up your TV and media device (if the TV doesn’t have it built in).
  4. You browse to your new film and press play.
  5. Something bad happens. The film is in Mongolian and the subtitles are in a separate file that your DLNA server isn’t smart enough to transcode on the fly.

OK, this is just one possible thing that could go wrong with DLNA. With the many different options out there to choose from, how do you choose the right one? Whichever choice you make, there is a strong possibility that you’ll come across a file one day that either your server or client doesn’t recognise.

mencoder to the rescue

With a combination of mencoder, mplayer and ffmpeg on your linux box, you have a very good chance of being able to resolve almost any issue. mencoder will recognise your input file encoding, allow you to add a subtitles file, and pick your output file encoding.

Here is the code I’ve been using so far:

mencoder -vf pp=de,scale=612:330 -oac copy -ovc lavc -lavcopts keyint=25:vcodec=msmpeg4:vbitrate=904:vpass=1 -sub "subtitle_file.srt" -o "outputfile_withsubs.avi" "inputfile.avi"

Notes on the above:

  • You will first want to get the aspect ratio of your input file to make sure your output file is the same. You can do this by running the following: mencoder inputfile.avi. The resulting output in your command line will include details about the file including the dimensions. Simply replace “612:330″ in the above command with the correct values.
  • If you’re not having an issue with subtitles and just wish to re-encode a file that isn’t playing, just remove the “-sub” option
  • mencoder has an enormous number of options to choose from. man mencoder will help you out, as will this or maybe this.
  • I know that msmpeg4 might not be the best option, but it’s the one that’s working for me now. If you know any better, please comment below.

I’ve used a variety of DLNA server and client combinations in the past, including TVersity, XBMC, ps3mediaserver as servers and a laptop or xbox as a client. My current setup is a linux desktop running serviio for the server, together with an all-singing all-dancing, yet affordable Sony BDP-s370 client.

If you have any questions or tips or suggestions for how you make this kind of stuff easier, feel free to comment.

UPDATE: A very nice guide can be found here

Tags: ,


Follow theguitarmaster on Twitter

Page 3 of 3123

I seem to find less and less time these days to post about guitar and music due to other commitments and interests, both work related and otherwise. For this reason, in order to at least keep some content fresh on this site, I will occasionally, but more regularly post other items tagged as “off-base”.


Follow theguitarmaster on Twitter

 
 
Page 3 of 3123
Performance Optimization WordPress Plugins by W3 EDGE