# Getting Twonky Linux to Work



## boilerjt (Jan 12, 2007)

I'm sorry if this is a little winded, but I wanted to give all the details I have. I've been struggling to get TwonkyMedia to work on my Linux box. Here are the details:

HR20-700 (0x15C)
TwonkyMedia version 4.2.1 (with Lame LPCM transcoding plugin)
Ubuntu Feisty 7.0.4 Server
AMD Thunderbird 1 GHz processor
768MB Memory

It's not an overpowering system, but should be decent enough for audio streaming. The HR20 sees the Twonky server just fine and sees the audio data as well. I have roughly 5000 songs (I have also tried 20 songs and it seems to make no difference). I have played around with various settings in the Twonky ini file, including maximum cache size, maxmem, streaming buffer size, and upnptimeout. I have also tried various client settings (Generic DLNA 1.0, 1.5 etc.) I also have the multicast route configured and I have tried shutting down the LAMP server. Here are my problems:

About 75% of the time when a song starts, it stutters for a few seconds, then goes to the next song. Sometimes the next song will play normally, sometimes it will stutter and move on to the next song. I have noticed when the first song plays normally, I have no issues and all selected songs will play normally. If I select shuffle, the first song never starts and 50% of the time, the HR20 live TV audio will never return (even if I stop the Twonky server.) An RBR will return the TV audio.

Another issue I see is when I skip to the next song three times. The HR20 does not respond to the stop or exit buttons and tv audio is restored after around 30 seconds. This behavior also happens for me in the Twonky Windows version and TVersity, so I think this may be an HR20 issue.

I am hoping to get others running Linux to work on this with me and hopefully we can publish a setup document so that others can get a Linux media server running that works with the HR20. Once we get the audio working, hopefully it won't be much effort to get the video streaming working when it is enabled on the HR20. I have also been looking for an open source media server and have had no luck finding one. All promising candidates do not support audio transcoding (ushare, mediatomb, etc).

Thanks,

John


----------



## Kevin Dupuy (Nov 29, 2006)

I've got a friend with an HR20, so I'll try to test it out soon. Thanks for the info!


----------



## Spanky_Partain (Dec 7, 2006)

Have you seen this post about Linux and Twonky?



snewo said:


> Instructions for enabling the media functionality on the HR20 with a Linux Server.


----------



## boilerjt (Jan 12, 2007)

Spanky_Partain said:


> Have you seen this post about Linux and Twonky?


Yes, I have seen snewo's procedure and used it to get Twonky up and running. My HR20 sees the Twonky server and all of the songs, but it is unusable at this point, mostly due to the stutter and skip to next song issue. I am not the only person experiencing this. I have talked with two people during a CE chat session with the same problem and have seen some forum posts with this issue. I'm trying to isolate the problem and help others.

Another goal is to find an open source alternative to Twonky and get it up and running.

Thanks,

John


----------



## AlbertZeroK (Jan 28, 2006)

Try running top on your linux box while the HR20 is trying to access music. It's possible, your maxing out your cpu.


----------



## boilerjt (Jan 12, 2007)

AlbertZeroK said:


> Try running top on your linux box while the HR20 is trying to access music. It's possible, your maxing out your cpu.


Good call Albert. When a song is stuttering on the HR20, the lame encoder is grabbing 99+ of the CPU. It seems that the songs I see playing smoothly have been cached after the transcoding procedure. Also, I have heard some stuttering where the song goes quiet for a fraction of a second and continues playing normally. In this instance, the CPU %wa (waiting for I/O) is maxing out.

I am using the pre-compiled lame that Twonky provides and it seems to grab all available CPU when encoding. I would think my 1GHz CPU would provide enough horsepower. When booting, I get a notice that the CPU does not support frequency stepping so that might be the culprit. I have tried cpulimit and this has no effect.

Any ideas from anyone?

Thanks,
John


----------



## bishoptf (Jul 29, 2003)

boilerjt said:


> Good call Albert. When a song is stuttering on the HR20, the lame encoder is grabbing 99+ of the CPU. It seems that the songs I see playing smoothly have been cached after the transcoding procedure. Also, I have heard some stuttering where the song goes quiet for a fraction of a second and continues playing normally. In this instance, the CPU %wa (waiting for I/O) is maxing out.
> 
> I am using the pre-compiled lame that Twonky provides and it seems to grab all available CPU when encoding. I would think my 1GHz CPU would provide enough horsepower. When booting, I get a notice that the CPU does not support frequency stepping so that might be the culprit. I have tried cpulimit and this has no effect.
> 
> ...


I'm in but I need to get my backup server and gallery website back up and running ( I have taken 2 weeks to get my new HR20 up and running, I had lots of cleanup). So I will jump in when I get to a point and have some time, I may even sniff the hr20 and mythtv stuff to see exactly what he is looking for/at. I am a network designer by trade, and running virtualization on my myth box so I can create and play with almost anything to see what we can get to work. I currently have centos4.4,5 and ubuntu loaded up in VM's so I can go in just about any direction. I think a linux how-to would be great if we can get it up and working and would be willing to help that also. I'll do some digging this weekend, after I get my backup server in operation.


----------



## Spanky_Partain (Dec 7, 2006)

Keep up the good work guys. I will be watching as well.


----------



## Spanky_Partain (Dec 7, 2006)

Apparently there is a new version of Twonky out...



mikeny said:


> Just a heads-up..I got an email from the TwonkyVision team that version 4.3 of TwonkyMedia is out. 4.2 was working great with the HR20.


----------



## boilerjt (Jan 12, 2007)

Spanky_Partain said:


> Apparently there is a new version of Twonky out...


I just installed Twonky 4.3 and see no difference. Actually, I found another problem. When I was playing the music on the HR20, the stuttering/skip to next song was still there. I pressed stop on the HR20 and it never switched back to the live TV audio (this happens a lot for me.) RBR restored audio. This time, I noticed in top that I only had 8MB free memory (out of 768MB total). I then stopped the Twonky server and it still had only 8MB free. When I start the Twonky Server, I have 600MB free and it varies between 400-600 MB free when streaming music. There is a nasty memory leak somewhere!  I have attached a screen shot in top showing how lame is hogging my CPU...


----------



## boilerjt (Jan 12, 2007)

I've made some progress and it seems to be working a lot better now. Here is what I found out:

1) I solved the problem where the CPU% wa in top was maxing out and causing the audio drop outs. I increased Streaming Buffer Size from 32000 to 64000 and the wa parameter stays below 20%. My best guess is that my older hard drive cannot keep up with the streaming and needed a larger buffer.

2) The memory leak I mentioned was a false alarm. I found out Linux likes to utilize unused memory as buffer cache and releases the memory when needed.

3) Last but not least, I think I am on the right track for solving the stuttering then skipping to next track issue. I replaced the pre-compiled lame binary provided by Twonky with the pre-compiled Ubuntu Feisty binary using sudo apt-get install lame. I have seen a couple stutter problems, but this only seems to occur when I press the fast forward button too quickly (when lame is still decoding the previous song). Now when this happens, it does not skip to the next track and gives an Unable To Access message on the TV. Shuffle play now works for me for the fisrt time as well! I think playing around with the lame command line parameters (called from Twonky's cgi-lame binary which they provide source code) or recompiling the lame binary might make this run rock solid  

Almost there!!!


----------



## bobnielsen (Jun 29, 2006)

boilerjt said:


> Another goal is to find an open source alternative to Twonky and get it up and running.


Has anyone had any luck with either Mythtv or VLC?


----------



## Spanky_Partain (Dec 7, 2006)

Please be sure to update this thread when you have a solution and can provide a step-by-step procedure.

http://www.dbstalk.com/showthread.php?t=75204

Earl states...


Earl Bonovich said:


> Howdy campers..
> 
> Looking for your input and your help.
> 
> ...





Earl Bonovich said:


> As those documents are completed...
> We will then add them to our Resource Sub Forum... for each reference





Earl Bonovich said:


> Now that I have a captive audience.....
> 
> Anyone intrested?
> Basically I am looking for some PDF's and stuff, so we can create a nice FAQ type thread for the people coming in trying to setup Media Sharing, using a bunch of different PC/Computer platforms as the host.


----------



## boilerjt (Jan 12, 2007)

Here's another observation I had while monitoring the linux processes with top. If you hammer the fast forward button on the remote when the music is playing, Twonky seems to launch a new Lame process for each song that is selected. My old CPU doesn't handle multiple instances of Lame running at the same time very well and this is when I get the "Unable To Access" error on the HR20 (probably a timeout). What I am going to try this weekend is to hack the cgi-lame file so that when a new song is selected, it first looks to see if a lame process is running. If so, it will kill this process before spawning a new lame process. I will probably also have to disable the Twonky transcoding cache because I don't think the HR20 would like it if Twonky serves a partial music file if it is in cache.

I hope others are finding my ramblings useful


----------



## bishoptf (Jul 29, 2003)

boilerjt said:


> Here's another observation I had while monitoring the linux processes with top. If you hammer the fast forward button on the remote when the music is playing, Twonky seems to launch a new Lame process for each song that is selected. My old CPU doesn't handle multiple instances of Lame running at the same time very well and this is when I get the "Unable To Access" error on the HR20 (probably a timeout). What I am going to try this weekend is to hack the cgi-lame file so that when a new song is selected, it first looks to see if a lame process is running. If so, it will kill this process before spawning a new lame process. I will probably also have to disable the Twonky transcoding cache because I don't think the HR20 would like it if Twonky serves a partial music file if it is in cache.
> 
> I hope others are finding my ramblings useful


Boilerjt, have you seen or looked at FUPPES - http://fuppes.ulrich-voelkel.de/index.php, it is open source and allows transcoding but I haven't looked much further....


----------



## boilerjt (Jan 12, 2007)

bishoptf said:


> Boilerjt, have you seen or looked at FUPPES - http://fuppes.ulrich-voelkel.de/index.php, it is open source and allows transcoding but I haven't looked much further....


I tried FUPPES on my windows box and I could not see the server from my HR20. Also, it kept complaining that it could not find lame to do the transcoding. Also, FUPPES only has lists files in a folder structure and does not use ID3 tags. I may try it on my linux box just to see if it works.

--John


----------



## tensuns (Apr 19, 2007)

boilerjt said:


> I hope others are finding my ramblings useful


Absolutely, boilerjt! I too have been running Twonky under Feisty, and have noticed many of the same issues you describe. In particular, the stuttering when skipping too fast and occasional random stutter when first selecting a song.

I have however found the server a tad more reliable than you have been experiencing, which could be because I already had the Lame from Feisty's repositories or that the system I'm running Twonky on is a bit more powerful than yours (AMD Athlon 2.2 GHz, 1GB RAM). For instance, I haven't had the audio lockup or revert back to live TV even when skipping too fast. At worst audio output stops for 15-30 seconds and then skips to the next song. If I just pick shuffle or leave it to continue through the playlist/directory it continues without errors.

One thing I noticed today is that if the songs have already been cached I can skip as fast as I want without trouble. Like you mentioned Twonky seems to initiate Lame for each new song selected. But this occurs only if the song is not already in it's database cache. And even if you skip to the next song before the transcoding is finished it will do the whole song anyway and store it in the cache (located in [TwonkyDirectory]\twonkymedia.db\cache). I think this is the definitive cause for the stutters on fast skips as regular play control returns when the stacked lame processes finally finish.

One other observation that should be a part of any guide is that restarting the Twonky server while the HR20 is playing music or showing pictures will lock up the HR20 and you'll have to do a RBR.

As for Fuppes, it looks like it only transcodes to mp3 but the HR20 requires LPCM, right?


----------



## boilerjt (Jan 12, 2007)

tensuns said:


> As for Fuppes, it looks like it only transcodes to mp3 but the HR20 requires LPCM, right?


I looked into Fuppes a little bit more and I think you're right. Since it is open source and uses lame to transcode, it could probably be modified to stream LPCM. Its a moot point anyway since I cannot get the HR20 to see the FUPPES server...

It's a good night, though. dmurphy was able to get a Power Mac streaming MP3s to the HR20 by modifying the cgi-lame file! From what I see, this is the first time a Mac has been able to stream audio to the HR20. Now, he is trying to modify cgi-lame to get AAC files to work. If he succeeds, this may open things up to get convert only audio formats to LPCM and play them on the HR20.

Now if only an open source solution comes along...


----------



## boilerjt (Jan 12, 2007)

I think I've got Twonky working the best I can right now, given the old hardware I'm running it on. There are still some issues when hammering the fast forward button. I still occasionally experience no audio when multiple lame processes are running and the occasional zombie process created. 

I will create a document sometime this weekend with instructions of how to get Twonky running on Ubuntu (or Debian) linux. It will be basically the same as snewo's procedure with one difference. When running Ubuntu or Debian, DO NOT use the pre-compiled lame binary that Twonky provides. Use the pre-compiled lame binary from the Ubuntu or Debian repository. Also, increase the Streaming Buffer Size parameter if you are experiencing audio dropouts.

I am still looking for an open source alternative to Twonky and if anyone has any information, please post it to the forum.

--John


----------



## bobnielsen (Jun 29, 2006)

I have mediatomb installed on a Ubuntu 7.04 machine and it is recognized by the HR20. I have a "PC Directory" entry on the menu, but it doesn't allow me to see any content. This looks promising as an open-source alternative to Twonky, etc., but there are probably a few hurdles to overcome, like transcoding. Has anyone had any luck with mediatomb?


----------



## boilerjt (Jan 12, 2007)

bobnielsen said:


> I have mediatomb installed on a Ubuntu 7.04 machine and it is recognized by the HR20. I have a "PC Directory" entry on the menu, but it doesn't allow me to see any content. This looks promising as an open-source alternative to Twonky, etc., but there are probably a few hurdles to overcome, like transcoding. Has anyone had any luck with mediatomb?


Mediatomb lists transcoding as an upcoming feature. I have not tried to install it on my Feisty box and will definitely play with it when transcoding is working. It is a good sign that the HR20 sees the server, though


----------



## bobnielsen (Jun 29, 2006)

boilerjt said:


> Mediatomb lists transcoding as an upcoming feature. I have not tried to install it on my Feisty box and will definitely play with it when transcoding is working. It is a good sign that the HR20 sees the server, though


They have it packaged for feisty and the instructions for adding their archive to /etc/apt/sources.list, so both installing and upgrading are easy. I had to edit /etc/default/mediatomb to enable the server.


----------



## jhiggins (Jan 8, 2007)

I am new and am looking into setting this up on my Ubuntu file server. Can someone explain the need for transcoding? Thanks!


----------



## boilerjt (Jan 12, 2007)

jhiggins said:


> I am new and am looking into setting this up on my Ubuntu file server. Can someone explain the need for transcoding? Thanks!


Transcoding is needed because the HR20 does not have the capability of decoding an MP3. It only knows LPCM which is basically WAV format with the header (raw format). Transcoding converts MP3 to raw and streams the data to the HR20.

Since the HR20 knows how to decode MPEG2 and MPEG4 video, I am hoping that no transcoding will be needed for these formats when video streaming is enabled.

--John


----------



## bishoptf (Jul 29, 2003)

boilerjt, Just wanted to drop my .02, I didn't have a chance to play with it this weekend still working on my pressing issues of backup and website but I did some reading and I found out that the current Mythtv .20 Upnp is somewhat broken but looks like it has been fixed in the latest svn releases, this based on the mythtv mailing lists. So when they release .21 I can see if that solves some of the current problems which would be great if it did. 

So what is the list of options that we have that will transcode and is Open source? Looks like not many if at all....bummer..


----------



## boilerjt (Jan 12, 2007)

bishoptf said:


> boilerjt, Just wanted to drop my .02, I didn't have a chance to play with it this weekend still working on my pressing issues of backup and website but I did some reading and I found out that the current Mythtv .20 Upnp is somewhat broken but looks like it has been fixed in the latest svn releases, this based on the mythtv mailing lists. So when they release .21 I can see if that solves some of the current problems which would be great if it did.
> 
> So what is the list of options that we have that will transcode and is Open source? Looks like not many if at all....bummer..


I am VERY interested in how MythTV performs. Right now, Twonky is the only linux solution I have found that will transcode to LPCM (using lame). I have not run across an open source solution yet. Mediatomb looks like a great program and they say they will support transcoding in the future. Also, I would like to find another MP3 to LPCM transcoder as lame likes to hog all of the CPU resources (a problem with my older hardware.)

FYI, I just upgraded to Ubuntu Feisty a couple of weeks ago and switched my online gallery to Gallery2 and it's working great for me! I also implemented a backup system using rdiff-backup where I use a cron job to backup to an external firewire drive.

Thanks for the update


----------



## bishoptf (Jul 29, 2003)

boilerjt said:


> I am VERY interested in how MythTV performs. Right now, Twonky is the only linux solution I have found that will transcode to LPCM (using lame). I have not run across an open source solution yet. Mediatomb looks like a great program and they say they will support transcoding in the future. Also, I would like to find another MP3 to LPCM transcoder as lame likes to hog all of the CPU resources (a problem with my older hardware.)
> 
> FYI, I just upgraded to Ubuntu Feisty a couple of weeks ago and switched my online gallery to Gallery2 and it's working great for me! I also implemented a backup system using rdiff-backup where I use a cron job to backup to an external firewire drive.
> 
> Thanks for the update


Yeah I'm running gallery2, I have changed my backup strategy from bacula to backuppc http://backuppc.sourceforge.net/ , looks promising as it allows me to grab the other windoze machines also and uses a pooling mechanism to minimize disk space. My main box that runs myth and my VM's, I have 4gig of ram and amd dual core 3600cpu  so cpu useage isn't an issue as far as lame goes...maybe this week I will get to it...I have two little ones so I don't have any time untill after bed time so in other words I have all the time I want from 9:00pm till 7:00am


----------



## boilerjt (Jan 12, 2007)

I posted a PDF file detailing the Twonky install procedure for linux that is working for me. It is in this thread:

http://www.dbstalk.com/showthread.php?t=75204


----------



## boilerjt (Jan 12, 2007)

I think I've got this solved and need a few testers to see if it works for them. I replaced lame with mpg123 to do the lpcm transcoding and I am having no issues at all with Twonky on my Ubuntu Feisty server  I am attaching the files that need to be added to the Twonky /cgi-bin/ directory. Make sure to back up the cgi-lame file that is already there just in case you wish to go back to your current version.

MPG123 is definitely a lot faster when transcoding MP3 to LPCM and it does not seem to mess things up when multiple processes are running (when the fast forward button is hammered.) *NOTE: These files were compiled on my Feisty system and there is no guarantee that they will work on another linux distro.* I will post the cgi-lame source code later tonight.

--John


----------



## boilerjt (Jan 12, 2007)

As promised, here is the cgi-lame source code using mpg123 for the transcoding.


----------



## ohallord (Jan 16, 2007)

Thanks for the info I have a similar linux set up but I have 1.2 gig Processor on Fedora Core 6. I was have some problems with the Media share but not like yours. I did put mpg123 on in the Twonky cgi-bin directory and used your cgi-lame and it is working. I have not put it through the ringer as of yet but it does seem to work pretty good. 

If you are needing help with this set up I am willing to help out on the Linux and Twonky Server. 

Thanks for the info and the files.


----------



## boilerjt (Jan 12, 2007)

ohallord said:


> Thanks for the info I have a similar linux set up but I have 1.2 gig Processor on Fedora Core 6. I was have some problems with the Media share but not like yours. I did put mpg123 on in the Twonky cgi-bin directory and used your cgi-lame and it is working. I have not put it through the ringer as of yet but it does seem to work pretty good.
> 
> If you are needing help with this set up I am willing to help out on the Linux and Twonky Server.
> 
> Thanks for the info and the files.


I haven't seen this thread in a while  The current issue with Twonky (all varieties of OS) is that there are long delays when selecting the Twonky server on the HR20 when you have a large collection. In my case, 1 have 13K songs and 9K pictures and it takes almost a minute before I get the music/pictures menu on the HR20. In previous HR20 software (with no thumbnails in photos), there were no delays when using Twonky. Twonky and DirecTV have been provided with debug info and packet captures. I have had no issues with music playback since I switched to mpg123.

Mediatomb is currently in development (download and build from SVN) with transcoding support and I'll get around to trying it out sometime. Tensuns was playing with it and hopefully he will chime in and let us know how it is going.


----------



## CJTE (Sep 18, 2007)

Somebody send me an HR20! (lol).

Ive got a couple iMacs around here, one running OSX Server, and one dual booting OSX 10.3 and OS 9.2.2 that I'd be more than happy to play with.

Ive also got all flavors of windows from XP Pro SP2, 2K Server, 98SE.
Some of my XP systems are modified to fit my needs (legal licenses, but system files were modified either prior or post install [like tcpip.sys expanded from 10 to 75] either by a footprint modifier like nLite or by copy/paste overwrite).
If I look around, I could prolly dig up a few copies of home as well (OEM and/or retail)

Good luck to you and your testing gentlemen!


----------



## ohallord (Jan 16, 2007)

boilerjt said:


> I haven't seen this thread in a while  The current issue with Twonky (all varieties of OS) is that there are long delays when selecting the Twonky server on the HR20 when you have a large collection. In my case, 1 have 13K songs and 9K pictures and it takes almost a minute before I get the music/pictures menu on the HR20. In previous HR20 software (with no thumbnails in photos), there were no delays when using Twonky. Twonky and DirecTV have been provided with debug info and packet captures. I have had no issues with music playback since I switched to mpg123.
> 
> Mediatomb is currently in development (download and build from SVN) with transcoding support and I'll get around to trying it out sometime. Tensuns was playing with it and hopefully he will chime in and let us know how it is going.


I have noticed that lag when selecting my computer that is running Twonky. I would say it is about a 1 minute lag. I was running top with it and noticed that Twonky would steal 90+ Percent of the CPU once it started up so I knew it was working. 
Have you tried using the Internet Radio Through Twonky and Media Share on the HR-20?


----------



## ohallord (Jan 16, 2007)

> Mediatomb is currently in development (download and build from SVN) with transcoding support and I'll get around to trying it out sometime. Tensuns was playing with it and hopefully he will chime in and let us know how it is going.


I will try this, this weekend and see what I can come up with and let you know.


----------



## boilerjt (Jan 12, 2007)

ohallord said:


> I have noticed that lag when selecting my computer that is running Twonky. I would say it is about a 1 minute lag. I was running top with it and noticed that Twonky would steal 90+ Percent of the CPU once it started up so I knew it was working.
> Have you tried using the Internet Radio Through Twonky and Media Share on the HR-20?


We've seen the high CPU during the lag also. For an interesting read, check out these threads:

http://www.dbstalk.com/showthread.php?t=93007
http://www.twonkyforum.com/viewtopic.php?t=3704

These describe all of our testing to date. The frustrating part of it is that Twonky has worked great for me on the HR20 and Directv "broke" it when they implemented the thumbnails when viewing pictures.


----------



## ohallord (Jan 16, 2007)

I got my HR 20 after your first Post so I never saw it work Great. But It was working better before I got the latest CE release (Sat 10/20/07) CE Release 0x1B4.

I will play with a little more and see if the Media Tomb Works better. I also have my Samsung SIR-S4120R working with the Pictures and Music using the byRequest program. 

I will try and keep this forum going with my trials and tribulations on Media Sharing and the HR-20.


----------



## boilerjt (Jan 12, 2007)

Ack  

I was going to attempt to get the latest SVN built for Mediatomb and play with it this weekend and it appears I lost a hard drive in my linux box. When it attempts to boot, it launches fsck and finds a ton of errors in the boot partition. Most of the time, it forces me to manually run fsck. When fsck is finished, it reboots and goes though the same cycle and finds more errors.

The good thing is I do a scheduled nightly incremental backup to an external drive so I lost no important data. Looks like I need to get another drive and reinstall/setup everything again.


----------



## Spanky_Partain (Dec 7, 2006)

boilerjt said:


> Ack
> 
> I was going to attempt to get the latest SVN built for Mediatomb and play with it this weekend and it appears I lost a hard drive in my linux box. When it attempts to boot, it launches fsck and finds a ton of errors in the boot partition. Most of the time, it forces me to manually run fsck. When fsck is finished, it reboots and goes though the same cycle and finds more errors.
> 
> The good thing is I do a scheduled nightly incremental backup to an external drive so I lost no important data. Looks like I need to get another drive and reinstall/setup everything again.


Sorry to hear that! Good news that you do take the necessary action to get re-established to some known point though.


----------



## oakwcj (Sep 28, 2006)

boilerjt said:


> Ack
> 
> I was going to attempt to get the latest SVN built for Mediatomb and play with it this weekend and it appears I lost a hard drive in my linux box. When it attempts to boot, it launches fsck and finds a ton of errors in the boot partition. Most of the time, it forces me to manually run fsck. When fsck is finished, it reboots and goes though the same cycle and finds more errors.
> 
> The good thing is I do a scheduled nightly incremental backup to an external drive so I lost no important data. Looks like I need to get another drive and reinstall/setup everything again.


My condolences on your loss. I did build mediatomb from svn, supposedly with transcoding, but the HR20 still displays all mp3 files with "x" and the HR20 still is unable to display jpegs. I think the developers still have some work to do on transcoding. It would probably help if they got feedback from HR20 users, but it's just not an important enough feature for me to want to get more involved right now.


----------



## ohallord (Jan 16, 2007)

That is not fun losing the hard drive. At least you are backing it up, so it won't be a total loss.

Well I have tried media tomb, it shows up on my HR20 but it seems slower than Twonky. Also I am having issues with playing the media, it appears that the file names can not have special characters in it. I have some songs with an apostrophe in it and the log message shows the following "Nothing could be converted to new encoding: Invalid character sequence"


----------



## boilerjt (Jan 12, 2007)

ohallord said:


> That is not fun losing the hard drive. At least you are backing it up, so it won't be a total loss.
> 
> Well I have tried media tomb, it shows up on my HR20 but it seems slower than Twonky. Also I am having issues with playing the media, it appears that the file names can not have special characters in it. I have some songs with an apostrophe in it and the log message shows the following "Nothing could be converted to new encoding: Invalid character sequence"


It sounds like you at least have the LPCM transcoding working  After looking at the Mediatomb forum, it look like the developer(s) are pretty responsive. If you are interested in continuing efforts with Mediatomb with the HR20, I would post your feedback on the Mediatomb forum. A linux open source solution is needed.

Great Work


----------



## ohallord (Jan 16, 2007)

boilerjt said:


> It sounds like you at least have the LPCM transcoding working  After looking at the Mediatomb forum, it look like the developer(s) are pretty responsive. If you are interested in continuing efforts with Mediatomb with the HR20, I would post your feedback on the Mediatomb forum. A linux open source solution is needed.
> 
> Great Work


I will do that since I love open source solutions. I will let you know


----------



## boilerjt (Jan 12, 2007)

ohallord said:


> I will do that since I love open source solutions. I will let you know


Great  Even though it appears I only lost a hard drive on my linux box, I am thinking of rebuilding the system. This box has been up and running 24/7 (except for the day I installed Feisty) for over 5 years and I may as well modernize it since I have to reinstall everything. Looks like Newegg will be getting more business from me.

As soon as I am up and running again, I'll help out with Mediatomb. Since the developers are in Europe, they will not have an HR20 and hopefully we can supply enough info to get it working great.


----------



## bobnielsen (Jun 29, 2006)

I will also try the latest mediatomb (I have an older version installed but all x's) and report back what I find.


----------



## ohallord (Jan 16, 2007)

I would like a newegg shopping spree. I need to upgrade mine as well but, mine works pretty good right now so unless something happens I won't be upgrading.

Anyway I will do some more work this weekend. I found a thread with my ID3 Tags having special charectors, but I do not think that is the only problem, just one of them.


----------



## BigEHokie (Sep 22, 2005)

Hi all. I have Twonky 4.4.2 up and running fine on my server. Thanks a lot for the instructions. However, I am seeing the lame mp3 stuttering issue. I took the mpg123 and compiled a new cgi-lame and put it in the cgi-bin directory. However, when trying to play mp3 files I get an error:


```
QUERY_STRING ?source=/mythmedia/music/Metallica/Kill 'em All/05 (Anesthesia) - Pulling Teeth.mp3&from=audio/mpeg&to=audio/L16&cache=/usr/local/TwonkyVision/twonkymedia.db/cache
execl: No such file or directory
```
What is execl? These files play ok with lame, so I'm not sure if it's the file's names or if I'm missing some dependency. Any help would be appreciated.


----------



## GregLee (Dec 28, 2005)

"execl" is the procedure called from the cgi-lame you compiled to execute mpg123. Check that mpg123 is not only present in the cgi-bin directory, but also has execute permission (do this: "chmod +x mpg123").


----------



## BigEHokie (Sep 22, 2005)

I missed the instructions that I had to copy mpg123 into the cgi-bin directory. Thanks for the heads up. mpg123 certainly does work better than its lame counterpart.


----------



## trashy (Feb 25, 2008)

Hi all. I'm currently working on a linux solution myself, and have it somewhat working. I just joined and am mainly bumping this topic up for reference.


----------



## BigEHokie (Sep 22, 2005)

I gave up on twonky for the time being as the HR20 doesn't support anything other than mpg and I don't want to have to transcode everything I have manually to have it play.

I have found a solution that works for me and it's using TVersity. My file server is a Linux box. I have setup a few samba shares on this machine. I'm running TVersity on a WinXP box and I have those samba shares mapped and identified as part of the library in TVersity. Works pretty good!

If/when Twonky gets transcoding working or if/when the HR20 supports more codecs than mpg, I'll take another look at Twonky.


----------



## trashy (Feb 25, 2008)

BigEHokie said:


> I gave up on twonky for the time being as the HR20 doesn't support anything other than mpg and I don't want to have to transcode everything I have manually to have it play.
> 
> I have found a solution that works for me and it's using TVersity. My file server is a Linux box. I have setup a few samba shares on this machine. I'm running TVersity on a WinXP box and I have those samba shares mapped and identified as part of the library in TVersity. Works pretty good!
> 
> If/when Twonky gets transcoding working or if/when the HR20 supports more codecs than mpg, I'll take another look at Twonky.


I too have a Linux file server and am only somewhat pleased with the way twonky is working. Like someone else above pointed out, I really would rather find an open source solution, and I preferably would like to serve my files straight from my Linux box rather than have to use a Windows box.

I'm kind of thinking out loud here... I wonder if VLC would do the trick? I have never really messed with it much. What about using Windows software via Wine or VMware?


----------



## trashy (Feb 25, 2008)

I wanted to try mediatomb, but am having problems compiling it. I am somewhat savy as far as using Linux (I actually have been using it for a number of years), but I am by no means a programmer or expert.

The problem that I am having is when I run the configure script, it fails because it cannot find the header files for sqlite. The sqlite executable is in /usr/bin, but no header files in /usr/include. It does look by default in /usr/local/include for sqlite3.h which is not there, or anywhere else on my system.

So I then installed mysql, both the client and server, and now mediatomb's configure script fails because it cannot find mysql_config.

I realize that this is a Linux problem, but I'm hoping that one of you can point me in the right direction.

I am running a dual-core AMD_64 with Ubuntu gutsy.


----------



## bobnielsen (Jun 29, 2006)

trashy said:


> I wanted to try mediatomb, but am having problems compiling it. I am somewhat savy as far as using Linux (I actually have been using it for a number of years), but I am by no means a programmer or expert.
> 
> The problem that I am having is when I run the configure script, it fails because it cannot find the header files for sqlite. The sqlite executable is in /usr/bin, but no header files in /usr/include. It does look by default in /usr/local/include for sqlite3.h which is not there, or anywhere else on my system.
> 
> ...


:welcome_s Welcome to dbstalk.

Missing header files generally means that you need to install a development file related to the application. According to apt-file (a great utility for finding which package contains a desired file), you need to install libsqlite0-dev.

Mediatomb's repository has a Ubuntu package for feisty but not gutsy.


----------



## trashy (Feb 25, 2008)

Bob,

First of all, thank you very much for the welcome. I have been kind of hanging around for a while doing some reading.

Second, thank you for your pointer. I figured that I needed to install the development package(s) needed, but didn't really have much time to research. The package that I needed was actually libsqlite3-dev, along with a couple of other packages to enable full function.

I successfully compiled, installed and ran mediatomb, and so far it looks somewhat promising. I can view my server and view the files, however, each music file has an X next to it and does not play. I suspect that it has something to do with my configuration, which is an xml file. I'm going to do some more reading and playing around with it as I have the time.

I am taking some notes, and if I get this working correctly I will try to do a write-up of the steps that I needed to take.


----------



## bobnielsen (Jun 29, 2006)

trashy said:


> I successfully compiled, installed and ran mediatomb, and so far it looks somewhat promising. I can view my server and view the files, however, each music file has an X next to it and does not play. I suspect that it has something to do with my configuration, which is an xml file. I'm going to do some more reading and playing around with it as I have the time.
> 
> I am taking some notes, and if I get this working correctly I will try to do a write-up of the steps that I needed to take.


I think the problem with the Xs on music files (which I also saw when I tried mediatomb several months ago) is that there is no transcoding. Media Share requires that music files be LPCM (at least that was the requirement when it first came out). Most servers have built-in (or in the case of Twonky, a LAME add-on) transcoding. Someone posted a while back that mediatomb was planning on doing this, but I don't know if it has been added yet.


----------



## sunking (Feb 17, 2004)

bobnielsen said:


> :welcome_s Welcome to dbstalk.
> 
> Missing header files generally means that you need to install a development file related to the application. According to apt-file (a great utility for finding which package contains a desired file), you need to install libsqlite0-dev.
> 
> Mediatomb's repository has a Ubuntu package for feisty but not gutsy.


Does mediatomb work for transcoding video for the hr20? I've been using ushare with my xbox360 for video, but would love to avoid the whole xbox thing.

I compiled mediatomb last night but haven't had a chance to mess with it yet.

I actually started to add transcoding to ushare, but I've been too busy lately to work on it much.


----------

