View Full Version : Twonky Playback Slow
I got Twonky v4.1 installed and I also installed the MP3 decoder addon. I integrated Twonky with iTunes (which is why I want to use Twonky) and I can see all of my files from the HR20 just dandy. When I play back an MP3 it's like it's in slow motion. WMP works fine, but I want Twonky damnit! I've restarted the server and restarted my computer with no success.
Any ideas?
Snaxter
12-29-06, 08:21 PM
I don't have a solution for you, but I can confirm that I see the same behavior. I have some theories, but nothing that I have been able to confirm.
You probably know this, but at the risk of stating the obvious: Twonky transcodes your mp3 files to LPCM format for playback on the HR20. When you grabbed the LPCM plugin off of the Twonky site, you grabbed Lame with hard configured program (cgi-lame) that drives Lame with the '--decode' option to generate the LPCM version of the file. It saves the LPCM file in a directory called 'twonkmedia.db/cache'. One interesting side effect (noted elsewhere in this forum) is that the Twonky disk consumption grows quite rapidly as these files are uncompressed audio files.
Anyway, I pulled one of the LPCM files off of my machine running the Twonky server and ran it through a different server (ushare). That server also played back the song very slowly (almost 1/2 speed). I also manually decoded a MP3 file using Lame and the settings that Twonky's cgi-lame is using and got the same result (slow sounding music).
So, I duplicated those results with two different media servers playing off of two different machines (with radically different CPUs and configurations). The music sounded exaclty the same when transcoded with Twonky's Lame settings.
Is it possible that the HR20 has a fixed bitrate playback and it is 2x higher than the transcoded file?
Is it a CBR vs. a VBR thing?
I'm not sure. I'll play around with it some more tomorrow.
For now, WMP with a slide show running is the only solid solution that I've heard.
I don't have a solution for you, but I can confirm that I see the same behavior. I have some theories, but nothing that I have been able to confirm.
You probably know this, but at the risk of stating the obvious: Twonky transcodes your mp3 files to LPCM format for playback on the HR20. When you grabbed the LPCM plugin off of the Twonky site, you grabbed Lame with hard configured program (cgi-lame) that drives Lame with the '--decode' option to generate the LPCM version of the file. It saves the LPCM file in a directory called 'twonkmedia.db/cache'. One interesting side effect (noted elsewhere in this forum) is that the Twonky disk consumption grows quite rapidly as these files are uncompressed audio files.
Anyway, I pulled one of the LPCM files off of my machine running the Twonky server and ran it through a different server (ushare). That server also played back the song very slowly (almost 1/2 speed). I also manually decoded a MP3 file using Lame and the settings that Twonky's cgi-lame is using and got the same result (slow sounding music).
So, I duplicated those results with two different media servers playing off of two different machines (with radically different CPUs and configurations). The music sounded exaclty the same when transcoded with Twonky's Lame settings.
Is it possible that the HR20 has a fixed bitrate playback and it is 2x higher than the transcoded file?
Is it a CBR vs. a VBR thing?
I'm not sure. I'll play around with it some more tomorrow.
For now, WMP with a slide show running is the only solid solution that I've heard.
Snaxter,
It sounds like you did some good testing. I am wondering why I don't hear this slow motion with TwonkyMedia.
Maybe it's a codec issue?
Snaxter
12-29-06, 10:15 PM
Yeah - pretty bizarre. Again, all of the Lame settings are hard coded in the cgi-lame program, so it is hard to believe it is something to do with the transcoding.
I just tried manually decoding an mp3 file that was encoded at 192kbps (my previous test file was encoded at 128kbps). It still played back incredibly slow, but it was hard to tell if it was any different than the other file that I've been playing with.
I have no idea why it works fine for mikeny and doesn't work for me & Oliwa.
Spanky_Partain
12-29-06, 11:04 PM
Wow, this is a spin that I have not run across either. So I am running a dual core CPU and Twonky has been flawless in my environment.
I am also running a wireless conection.
Any chance it is the horse power releated?
Snaxter
12-29-06, 11:21 PM
well... I doubt it, but you never know...
One of the systems is a 3.6GHz P4 (single core), the other is a 266MHz ARM. Both have identical playback symptoms. I'd expect a horse power problem to show up as drop outs or very garbled sound. This sounds just like you're playing the audio back at 1/2 speed.
well... I doubt it, but you never know...
One of the systems is a 3.6GHz P4 (single core), the other is a 266MHz ARM. Both have identical playback symptoms. I'd expect a horse power problem to show up as drop outs or very garbled sound. This sounds just like you're playing the audio back at 1/2 speed.
I have Twonky 4.1 on Windows 2000 and a 1.4GHz P4 with this same issue. I was thinking horsepower until I read this thread..... WMP 11 works fine on my XP laptop, but I was looking for a W2k solution that would serve up my wife's podcasts too....
Now I am wondering about W2k, what OS are you running on your systems?
Snaxter
12-30-06, 08:14 AM
The 3.6GHz P4 system is running WinXP. The 266MHz ARM is running a Linux variant (Unslung). All of these systems are wired (as opposed to wireless) to the HR20, so it seems unlikely that it is a network issue.
I'm pretty sure it isn't a CPU performance issue, and I don't think it is OS related. I think it is something with the Lame settings or install.
I posted something over in the Twonky forums (http://www.twonkyvision.de/forum/viewtopic.php?t=2601) to see if anyone had any ideas over there.
The 3.6GHz P4 system is running WinXP. The 266MHz ARM is running a Linux variant (Unslung). All of these systems are wired (as opposed to wireless) to the HR20, so it seems unlikely that it is a network issue.
I'm pretty sure it isn't a CPU performance issue, and I don't think it is OS related. I think it is something with the Lame settings or install.
I posted something over in the Twonky forums ... removed not enough posts to post....{HDinVT} to see if anyone had any ideas over there.
Thanks for the link. It sure is weird that it works for some but not others.
Snaxter
12-30-06, 10:42 AM
It does appear to be a bitrate problem. I managed to find an old mp3 file that I had encoded at 64kbps and it plays properly. To confirm this theory, I took one of the mp3s that is playing slowly and converted it from 128kbps to 64kbps. Amazingly enough, the file that previously played slowy now sounds just fine.
I think this is all caused by Lame transcoding the file and botching the bitrate. Unfortunately, all of the Lame command line switches are embedded in the cgi-lame program. I'll play around with building a new version of Lame with the "right" switches.
mikeny - can you look at the bitrate of the files that you are playing through Twonky (right click->properties->Summary->Advanced, scroll to the bottom)? Are they 64kbps by any chance?
Spanky_Partain
12-30-06, 11:10 AM
The file that I checked has Bit Rate 128kbps and Audio sample rate 44kHz.
I do have WMP11 installed and by default the files are set to open with WMP11.
I have not run across any yet that are not set to these values. I have not verified every song.
I have played the music at a shuffle selection for about 45 minutes using twonky without any problems. When listening to music, I use my Bose hardrive library. The Twonky is just a feature, not a preference.
It does appear to be a bitrate problem. I managed to find an old mp3 file that I had encoded at 64kbps and it plays properly. To confirm this theory, I took one of the mp3s that is playing slowly and converted it from 128kbps to 64kbps. Amazingly enough, the file that previously played slowy now sounds just fine.
I think this is all caused by Lame transcoding the file and botching the bitrate. Unfortunately, all of the Lame command line switches are embedded in the cgi-lame program. I'll play around with building a new version of Lame with the "right" switches.
mikeny - can you look at the bitrate of the files that you are playing through Twonky (right click->properties->Summary->Advanced, scroll to the bottom)? Are they 64kbps by any chance?
bitrate:128 kbps
channels: 2 channels stereo
audio sample rate: 44 khz
I would love to solve the server dropping issue though. I wonder if there's some optimum router mtu setting or something.
90% of my songs are VBR and average above 192kbits. I will try to convert it to a lower bitrate to see what happens. I never would have thought that.
As a side note, I tried Lame v3.97B2 with the same result.
Anyone try the latest Lame version?
Snaxter
12-30-06, 01:08 PM
I pulled down the latest release of lame (3.97 which should be the same as 3.97B3) and built it fresh off of the source. That didn't make a difference.
I tried this experiment - decode a file using lame and play it back using WMP. You have to drop the '-t' option off of lame (lame --decode -x in.mp3 out.lpcm), but that generates a wave file that WMP can play back. The '-t' option disables writing the wave header, so that needs to be there for WMP to figure out what kind of file it is reading.
Surprisingly enough, the decoded file plays back just fine (correct speed), and it was *not* downsampled to 64kbps. I streamed that file off of the same share that the HR20 is playing back.
Weird. So it seems like it isn't a problem with Lame after all (!?)
Could it be that the HR20 is doing some sort of auto-throttle based off of the network consumption? It slows down the playback when it starts to saturate the network?? Maybe the 64kbps experiment works because it is lower BW consumption? Sounds too crazy.
Spanky_Partain
12-30-06, 01:10 PM
bitrate:128 kbps
channels: 2 channels stereo
audio sample rate: 44 khz
I would love to solve the server dropping issue though. I wonder if there's some optimum router mtu setting or something.
I am using the default MTU settings on my wireless and router. Both are Linksys and both use default parameter settings for TX/RX.
I do use a static IP address scheme and a routing IP number scheme, not the private non-routing IP numbers.
I just flashed the bios of my router to the latest version and it didn't help.
Spanky_Partain
12-31-06, 10:50 AM
I don't believe it is a network issue. I can play MP3's and use the video playing the pictures and still not saturate the bandwidth on a wireless connection.
Snaxter
12-31-06, 07:20 PM
I played around with this a bit more today and continue to be really puzzled by the whole thing.
I have been using ushare (open source server similar in function to Twonky) to experiment with some of the settings. ushare exhibits exactly the same behavior on my system where almost all songs play very slowly. The only exceptions are songs that have a really low bitrate (64kbps)
I had ushare print the size of the requests coming from the HR20 along with the number of bytes that the server is returning. Irrespective of the song bitrate, the HR20 requests just over 1MB every 10-15 seconds. While I wasn't able to do any sort of controlled experiment, the request rated did not seem to change when I varied the load on my network.
I hacked ushare so that it returned 1/2 the requested number of bytes and then hacked it again so that it returned 2x the request. So, the HR20 would request 1MB and ushare would return 512KB in one experiment and 2MB in the other experiment. I was pretty surprised that this didn't break the HR20 playback, but it didn't. And, to my surprise, it didn't make any difference at all in the playback - it still sounded slow. Wow.
I also pulled down a 3rd party wav editor and played back some of the wav files that Lame decoded. As with WMP, this editor played back the wav files at normal speed. Those experiments aren't totally conclusive as the HR20 only plays back wav files with the headers removed and the other programs require the headers.
I poked a bit at Twonky to see if the UPnP library is common with ushare. As far as I can tell, Twonky uses a totally independent library. So, it is unlikely that ushare and Twonky exhibit the same behavior because a bug in the underlying library.
I think the biggest mystery is that Twonky works just fine for some people and for others, the playback is just broken (plays slow). There's got to be something obvious here.....
Snaxter
12-31-06, 08:13 PM
Also, forgot to mention that I tried Lame 3.98alpha11 as well. Exactly the same result - audio still plays slow.
Spanky_Partain
12-31-06, 09:33 PM
Are you using any other type of software to serve the files up to the HR20, like WMP11?
Are there any errors being reported in the network stats?
What type of router/gateway are you using to make the connection to the HR20?
Ok, now I am really confused. Installed Twonky on my XP Pro SP2 laptop for comparison, HR20 plays the mp3s fine. Went back to my W2k desktop, noticed for some reason that .mp3 was not associated with any program. Set them to open with WMP, restarted Twonky... HR20 now plays these same MP3 files properly !! Could not believe it, reset the .mp3 filetype to default, restarted Twonky. HR20 still plays .mp3 files fine... I can't think of anything thing else that changed... makes no sense.. BTW ... Happy New Year
Spanky_Partain
12-31-06, 11:43 PM
Wow. Now whats up with that?
Sounds like it may be a Windows feature.:lol:
May never figure that one out!
Perhaps Snaxter can come up with something.
I tried looking at cgi-lame the other day to see if I could reverse engineer it and create a plugin for a different decoder.
Here's a question, why does the HR20 play mp3s fine off of WMP, but not Twonky? What does WMP do differently?
Snaxter
01-01-07, 01:05 PM
Wow - crazy.
I tried out HDinVT's process and was shocked when it worked for me. Right click on the mp3 file and set them to always open with WMP. Killed & restarted Twonky and it worked. I still can't believe that worked.
Unfortunately, that didn't fix the problem with my Linux system. Songs still play slow using Twonky off of my Linux system. I wonder if there is some sort of mime setting that might fix things there.
It really doesn't make sense to me.
Oliwa - are a couple of hints on cgi-lame:
Twonky calls cgi-lame as:
cgi-bin/cgi-lame "?source=/usr/local/TwonkyVision/tst.mp3&from=audio/mpeg&to=audio/L16&cache=/usr/local/TwonkyVision"
Then, cgi-lame calls Lame with:
lame --silent --decode -t -x tst.mp3 tst.mp3.lpcm
That file is written to the cache file - someplace like c:\program files\twonkyvision\twonkmedia.db\cache on a Windows machine. I haven't tried it, but it seems like you ought to be able to replace cgi-lame with a script that invokes a decoder that dumps files into the cache area.
However, given the bizarre results (success?) that HDinVT and I have had with setting the default program in Windows, I'm pretty sure that Lame really isn't the problem.
Bizarre is the right word... My next issue is that 90% of my audio content is WMA. From what I can see all of my WMA content in Twonky shows up with an X on the HR20. Have you guys stumbled across something like lame that will do wma to lpcm?
P.S. Oliwa, do you have your HR20 all setup up for Stevie's jersey retirement tomorrow?
Spanky_Partain
01-01-07, 04:40 PM
Yes, I see it as well. The HR20 only supports MP3, not WMA. Since WMP now lets you rip music in mp3, I have set mp3 as the default. Prior to that I had paid for a plugin that would rip music and save it as mp3.
I converted my wma files to mp3 and only save in a mp3 format. It seems there would be a tool to do that, I am not aware of one. I acutally re-ripped the music and saved it.
At least just about any player will read the mp3 format.
P.S. Oliwa, do you have your HR20 all setup up for Stevie's jersey retirement tomorrow?
Yes I do! I'll do you one better, I'm heading to Detroit this morning and I'll be watching it in person!
My mp3s are already set to WMP. I'm going to try unsetting and resetting it.
Well, I tried setting mp3s to open with Winamp and WMP and neither fixed the slow playback for me. I restarted the service after each change.
Well, I tried setting mp3s to open with Winamp and WMP and neither fixed the slow playback for me. I restarted the service after each change.
Serves you right for being at the Joe tonight !!!!!!!! :D
HaiChinGow
01-02-07, 09:05 PM
I too was having half-speed playback. As they say in Oz, it was Totally Wonky, or Twonky for short :)
I downloaded TVersity (Bonus, it is free, but feel free to donate)
http://www.tversity.com/
Set it to always decode, selected Xbox 360 profile and voila! Works fine.
-hai
That is a definite alternative, but I really like the iTunes integration with Twonky.
magellanmtb
01-07-07, 09:53 PM
has anyone figured out the slow play problem? Tried downloading and installing WMP11, Tversity and twonky. Seems as if Twonky is the only way for my HR20 to see the files on my "server" computer. Most of the the songs are Itunes. Photo slide show is slow and songs play even slower. Is ther anyway to adjust the time between photos disply?
I've given up. I just hook my iPod to my receiver and it works great.
Anyone have any updates to this issue or a possible resolution?
Anyone have any updates to this issue or a possible resolution?
Nothing new. Twonky works fine since associating .mp3 with WMP. I am running W2k Pro and I can't go beyond WMP 9. Almost time for a new PC, can't complain I've gotten over 6 years out of it....
BTW, what a night at the Joe. How was it to be there ?
Nothing new. Twonky works fine since associating .mp3 with WMP. I am running W2k Pro and I can't go beyond WMP 9. Almost time for a new PC, can't complain I've gotten over 6 years out of it....
BTW, what a night at the Joe. How was it to be there ?
:mad: :mad: :mad: :mad:
I guess I'll just hook my iPod up to my stereo. I guess it's not that big of a deal considering the navigation menu on the HR20 sucks when you have a lot of music.
Stevie's night was awesome! I got a lot of cool mementos and bought the book "Nineteen". I could really feel how much the fans loved him, and how much the liked several of the other alumni. Probert got a huge ovation, Ted Lyndsey (sp?) had a big ovation, and when Konstantinov came out on his walker the roof about blew off the place!
It was definitely a night to remember. The only thing that kinda sucks was that it lasted for about 90 minutes, so I have the 1st hour on the Redwings Pregame and the other 30 minutes on the actual game.
vBulletin® v3.7.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.