Minidlna and custom upnp icons

After a few hours of digging into hex and binary conversion tools, I have completed my task. If you download and compile Minidlna on a Linux box, it will show a Tux penguin for it’s upnp icon (for instance, if you were browsing over the network on the PS3). Since my Minidlna server is PowerMac G4 running Debian, I converted a few PNG images of the Apple logo into it’s hexadecimal equivalent, changed the source file icons.c, and recompiled it. Done! Click here to get the updated icons.c file.

Continue Reading

Going from hex to binary in Linux

If you find yourself with a block of \x encoded hex that you need converted back to it’s binary equivalent – in my particular case, an image encoded as a hex block back to it’s native JPEG file, you can use this short code snippit:

cat <input file> | sed -e ‘s/\\x//g’ -e ‘s/”//g’ -e ‘s/^[ \t]*//’ | xxd -p -r – <output file>

Adjust the sed arguments as needed to produce the trimming that you need to feed into xxd – when you pass -p to xxd you instruct it to take input as hexadecimal plaintext, and -r tells xxd to go from the hexadecimal string back it’s binary equivalent.

In this case, I used this to extract the images from the icons.c file for Minidlna.

Thanks to this LinuxJournal article for how to do a reverse hex dump.

Continue Reading

Installing miniDLNA on Ubuntu PowerPC

I don’t think I’ve seen anyone maintaining packages for the excellent MiniDLNA media server for Debian or Ubuntu. The instructions provided here should work for both Intel and PPC builds (maybe others?) of Ubuntu and Debian Linux.

  1. Run this command to get the pre-req packages needed to build MiniDLNA:
    • sudo apt-get install libexif-dev libjpeg62-dev libid3tag0-dev libflac-dev libvorbis-dev libsqlite3-dev libavformat-dev cvs make
  2. Log in and check out (download) the source code for MiniDLNA from SourceForge:
    • cvs -z3 -d:pserver:anonymous@minidlna.cvs.sourceforge.net:/cvsroot/minidlna co -P minidlna
  3. Change into the directory and build, then install it!
    • make
    • sudo make install
  4. That’s it!
Continue Reading