May 17

How to prevent apt-get and aptitude from switching repositories when upgrading a certain package

Today, after the usual

procedure on my Debian box, I noticed that FFMPEG wasn’t working as expected anymore. It happend that the upgrade installed a new version of FFMPEG from the official Debian repositories, while I had used the deb-multimedia.org repository for this package before. The official Debian package lacks support for libfaac. However, I had to switch back to the old package. Here is how I’ve done this.

APT allows to set priorities for certain repositories and packages. Debian calls this feature “APT pinning”. All I had to do was to set the priority for the FFMPEG related packages from deb-multimedia.org to values >1000 to make apt always install FFMPEG from there. To do this, just create a new file in /etc/apt/preferences.d. I called that file deb-multimedia. Here are the contents of the new file:

Basically it says: “Use the www.debian-multimedia.org repository for the ffmpeg package no matter what.”. Debian plans to replace ffmpeg with libav in future releases, so I additionally made APT never ever install libav by creating another file in /etc/apt/preferences.d:

Pin-Priority: -1 prevents APT from installing libav-tools forever. After this steps it is possible to switch to the old repository by simple reinstalling the packages. Great work Debian, thank you for this!

Permanent link to this article: http://blog.weinimo.de/how-to-prevent-apt-get-and-aptitude-from-switching-repositories-when-upgrading-a-certain-package/

May 12

Streaming video files to Samsung TVs (Part 1)

I have a huge video archive on my NAS and I wanted to be able to stream the files to my Samsung TV UE40D6300 using its DLNA capability. Because TVs in general and the DLNA standard especially do not support many codecs it was clear to me that this goal may not be that easy to achieve.

I thought transcoding would solve my codec problems, so I installed Mediatomb on my NAS. Unfortunately it hasn’t. Instead It brought me some new problems. Suddenly I wasn’t able to use the fast-forward function anymore. Furthermore I didn’t like Mediatomb much, as it seemed that development on it has stopped long time ago. So I searched for alternatives. MiniDLNA was a promising candidate, but it didn’t support on-the-fly transcoding like Mediatomb did and I even noticed that some files that would play fine on my TV without any transcoding don’t work with miniDLNA. It was clear that miniDLNA couldn’t offer the functionality I needed.

For a long time I had no real solution for these issues and so my search for a better mediaserver continued. I was near to desperation when I finally found a new project called Serviio. It hasn’t been released under Open Source license yet, but it seemed to have (nearly) all the features I was searching for. It supports transcoding while it is still possible to jump forwards and backwards in many movies. Using profiles Serviio is able to adjust its behaviour depending on what client hardware you use. And Serviio even detects your hardware and sets the matching profile automatically. That’s how software should work wherever possible – without any intervention from its user. Of course Serviio isn’t perfect yet, eg. it seems to have problems with huge collections, but it’s better than anything I’ve tried before. I strongly encourage everyone having similar problems like me to try Serviio out. It’s a great piece of software.

Basically I was happy with my setup. I was able to watch all my movies from my NAS on my TV. But on-the-fly transcoding has a downside that still hindered the perfect streaming experience. It wasn’t possible to use fast-forward wherever transcoding was necessary. I had to find out which codecs and which container formats my Samsung TV is able to play over DLNA, so I prepared a series of testvideos with different video and audio codecs and different container formats on my NAS to test it out.

The results of my investigations and my final approach for solving my streaming issues will be subject of my next posts.

Permanent link to this article: http://blog.weinimo.de/streaming-video-files-to-samsung-tvs-part-1/