GNU / Linux and MiniDLNA on SONY Bravia (r)

I have recently been the happy possessor of a SONY Bravia Full HD LCD TV 46-inch, which has a lot of gadgets and possibilities. Among them, that of play directly video files from a USB port or connect to a home network via an Ethernet board.

Javier is one of the Winners from our weekly competition: «Share what you know about Linux«. Congratulations! Anxious about take part and make your contribution to the community, as did Javier?

Very nice in the more than concise specifications and manual that comes from the factory, but arduous at the time of implementation.

This is valid for the KDL-55EX717 / 52EX707 / 46EX717 / 46EX715 / 46EX707 / 46EX705 / 46EX607 / KDL-46EX605 / 40EX717 / 40EX715 / 40EX707 / 40EX705 / 40EX607 / 40EX605 / KEX-32EX717 / 32EX715 / 32EX707 / 32EX705 / 32EX607 / 32EX605 models XNUMXEXXNUMX.

The MiniDLNA connection

The connection to a home network in GNU / Linux is easy to configure using the "MiniDLNA" program package (http://sourceforge.net/projects/minidlna/) that is included in most of the most popular GNU / Linux distributions, so doing it is very simple. What this package does is create a small file server on the computer that the TV recognizes instantly.

For more information on how to install MiniDLNA, I recommend reading this old blog article.

Viewing the multimedia files

Being able to view the files is another matter.

The files that these TVs display are those indicated on the official SONY website http://esupport.sony.com/LA/perl/support-info.pl?info_id=797&mdl=KDL46EX605
As for images and sound, everything is quite clear, since it is kept within the well-known jpg and mp3 files; the problem is how to convert the video files so that it can be reproduced, since the ones that usually swarm the network, do not work with the standard that SONY uses, an enigmatic AVCHD.

And here is how I did it.

First of all, let's install Avidemux (http://fixounet.free.fr/avidemux/). Avidemux is a simple video editor, with many tools to manipulate them. GNU / Linux users are often familiar with it.

Second, let's complete the following instructions step by step to convert a file that we will call "video.avi" recorded with the codecs ... well, the original codec or video and audio formats, it does not matter, because we are going to convert them.

1.Open the file «video.avi».
2.Select the MPEG-4 AVC codec in Video.
3.Select the AAC (Faac) codec in Audio.
4.Select in Format the one that corresponds to MP4.
5. Click on the «Save» bar, and give it the name «video.mp4» and send to save.

Basically, this is what we should always do, but (there is always a "but"), the quality and size of the resulting file can vary to our liking.

For example, if we select the «Configure» button of the first «Video» option, we will see that we have several options. My test video lasts 3 minutes, it is with the Xvid / mp3 codecs, in an image size of 624 × 352 pixels, and it occupies a volume of 18,9MB. This file is transformed, depending on the option, into one of:

1 pass - Medium quality: 7,9MB.
1 pass - Constant quality: 8,1MB.
1 pass - Average Bitrate: 36,4MB.
2 passes - Average Bitrate: 36,4MB
2 passes - Video size at 700MB: 62,8MB.

The latter, needless to say, that if the video were larger like that of a movie, the bitrate would be calculated so that it falls within 700MB, at the sacrifice of quality.

I personally prefer to use 2 passes - Medium Bitrate, which is the quality of a DVD.

What if we want to see a movie with subtitles?

Well, here it gets even more complicated, because the TV does not read the subtitle files, either from the DLNA server or from the USB key.

So we must embed the subtitles to the video, in the old-fashioned way for VHS tapes.

For this we need synchronized subtitles and a subtitle editor like Gaupol (http://home.gna.org/gaupol/).

  1. Open the subtitles file «video.srt» with Gaupol.
  2. We eliminate any text format that the subtitle has, such as italics, bold, colors and / or italics. They are easy to locate, since they begin and end with orders of the type text… .
  3. We keep it.
  4. In Avidemux, we select the button «Filters» from the first option «Video».
  5. In the left column we select "Subtitles".
  6. In the center column we select "Subtitles - Add srt / sub subtitles to the movie".
  7. In «Subtitle file», we look for the file «video.srt».
  8. In «Font (TTF)» we look for the font file to use. They are usually in / usr / share / fonts. I usually use /usr/share/fonts/truetype/freefont/FreeMono.ttf.
  9. In "Encoded", we select "Latin-1 (Western Europe)".
  10. In "Select color", we leave the one that is (almost white), or we put the color that we like. One that stands out well is yellow.
  11. In "Set size and position", for "Font size", I prefer to modify the default option from "24 pixels" to "20 pixels", and lower the subtitles as much as possible.
  12. Click on the "Save" bar, and give it the name "video.mp4" and send to save.

Finally, it remains for me to tell you that this task requires a lot of memory resources and computing power, as well as time, depending on the video quality you have chosen.

Technically speaking, the SONY AVCHD format uses the H264 video codec (http://es.wikipedia.org/wiki/H.264/MPEG-4_AVC) and AAC audio (http://es.wikipedia.org/wiki/Advanced_Audio_Coding).
I hope I have been useful.

PS: Avidemux is also available for MS-Windows platforms.
Thanks Javier!

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Ayosinho Pa said

    Ah ok, thanks, I will do it and thus solve the problem.

  2.   Ayosinho Pa said

    I don't know if I have understood it correctly, but with this change of format, can I see any video on a Sony Bravia? I have one too, and when I put a USB with a movie or series, the TV doesn't recognize it.

  3.   David Centellas said

    Take a look at the DLNA server. This program allows trascoding, that is, to carry out the conversion that you do with Avidemux on the fly, generating a temporary file that is the one that is finally sent to the TV. Oh, and it's available for a bunch of platforms other than Linux.

  4.   Blackgem vindicare said

    I for my part say that I use Mediatomb with mine without the need for conversion and a friendly web interface to use it via the web from other types of devices

  5.   Let's use Linux said

    So is…

    2012/11/6