Video playback lag on XBMC
#1
So I bought a 2TB external HD, hooked it up to the apple tv, have loaded 3/4 of my movie collection onto it and am using the xbmc library feature to sort my movies. I am currenlty using the mediastream lite skin if that means anything. However, I have noticed during video playback there is a little bit lag that shows up every now and then. I use handbrake to rip the dvds to m4V format with H.264 codec. Does anyone know how to reduce this/stop it altogether?

Any help is appreciated! It is a real kick in the guts to find that there is a problem with the system when I've invested so much time converting my DVDs to m4V format.
Reply
#2
tooshna Wrote:So I bought a 2TB external HD, hooked it up to the apple tv, have loaded 3/4 of my movie collection onto it and am using the xbmc library feature to sort my movies. I am currenlty using the mediastream lite skin if that means anything. However, I have noticed during video playback there is a little bit lag that shows up every now and then. I use handbrake to rip the dvds to m4V format with H.264 codec. Does anyone know how to reduce this/stop it altogether?

Any help is appreciated! It is a real kick in the guts to find that there is a problem with the system when I've invested so much time converting my DVDs to m4V format.

please define "little bit lag". I can think of several interpretations.
Reply
#3
Alright, for instance I was watching Happy Gilmore this afternoon. Every 5 mins or so the picture would seem to stutter for a few seconds with the audio still playing fine and once it has finished having its hissy fit the playback continues normally until 5 minutes later when the video stutters again. Its most noticeable when the camera pans or a car drives by and you see the pictures start stop very quickly.
Reply
#4
pastebin xbmc.log please. Is "vsync always" turned on ?
Reply
#5
Hi,

Yes vsync is always enabled. The following is my xbmc log when watching POTC.
http://pastebin.com/wEwP7zvs
Reply
#6
And this is from tonight while watching Star Trek. Even my Dad noticed it paused in certain spots a few times, now thats saying something... http://pastebin.com/Mpmm3cXN
Reply
#7
WARNING: Process - Could not detect frame rate for: /Users/frontrow/Movies/External Media/Star Trek XI/VIDEO_TS/VIDEO_TS.IFO. Using default of 25.000 fps for conversion of any commercial break frame markers to times.

For both. Are these really 25 fps content ? Use MediaInfo (google for it) and check.
Reply
#8
Just to chime in. I had this exact same lag problem on my AppleTV with content stored on an external usb hard drive (also did it with files on the internal hard drive). Most divx and xvid files were affected. I tried enabling/disabling "journaling" on the hard drive. I even swapped a couple of different usb devices to see if the drives was the problem. Sorry I do not have any logs. I observed the lag regularly over the many months I was using the ATV (mostly with the stable r28256 SVN)

I FINALLY solved it all by using the Ubuntu CrystalHD install that Sam Narzarko posted (I have a CrystalHD card installed). I am now running Sam's image from an external 2.5 usb hard drive and ALL video plays silky smooth (including all my 720p mkv stuff). No lags at all now, even with content streamed via SMB from my iMac running Snow Leopard.
Reply
#9
Hi guys,

Thanks for your replies. The Star Trek DVD is 25fps. That doesn't sound good bigjuggler, so the only way to fix the problem is crack open the ATV and install a new card + install new drivers etc? I really want to avoid this if at all possible...
Reply
#10
PAL DVDs are always 25fps, and the resulting handbrake rips of them would be too, so that aspect of it doesn't seem unexpected to me. :-) (It's probably also not relevant to the problem. If it's a framerate/refresh-rate mismatch eg: 25fps movie played on 60Hz display, I think the symptoms are different.)
Reply
#11
No need to mess with the internals Tooshna. Sorry I was not clear. Look at this thread http://forum.xbmc.org/showthread.php?tid=74992. Sam.Nazarko has put together a wonderful disk image version of XBMC. This can run off a USB flash drive. You copy the image to an 8 GB USB flash drive, stick it in your ATV and reboot. It boots straight into XBMC (with no alternation at all to you internal setup....you can try it out without messing at all with your setup).

The main reasons to do it: the CrystalHD card (if you buy and install one) works perfectly under Ubuntu (plays 720p and 1080p content smoothly) and the interface is snappier. The downside for your setup? The flash drive is sticking out of your USB port, so there is nowhere to plug in your external 2TB drive.

My solution was to attach the 2TB external drive to my iMac and pull all the content over the network with SMB sharing. Works perfectly! You can throw a few files on the ATV internal drive before you start for testing (it can be accessed when booted under Ubuntu).

A long term solution? Later in that thread, there are instructions about how to install the Ubuntu build on the internal drive on the ATV. Then you could run it off the internal drive and connect your 2TB drive to the ATV directly. So far for me, the network solution is easier.

Hope this helps.

P.S. To solve my lag before, I even tried reverting to the a fresh install of Apple's ATV software and reflashing the whole thing. Made no difference. All very mysterious
Reply
#12
I also notice a lag so now and then. It happened after using the new svn Dharma installs. I read somewhere else it can happen because of the auto update feature of the add-ons?

I'll try to find something in the logs next time. Do I have to look in the debug logs or the normal ones?
Reply
#13
bigjuggler Wrote:You copy the image to an 8 GB USB flash drive, stick it in your ATV and reboot. It boots straight into XBMC (with no alternation at all to you internal setup....you can try it out without messing at all with your setup).

So I can just try it by placing in in the usb slot and then take it out and it'll work like normal again? The reason I ask is because I have made my external hard drive the primary drive. Will this mess that up?

bigjuggler Wrote:A long term solution? Later in that thread, there are instructions about how to install the Ubuntu build on the internal drive on the ATV. Then you could run it off the internal drive and connect your 2TB drive to the ATV directly. So far for me, the network solution is easier.

I started reading the process but it seems a bit complicated with parts I don't understand. I wish there was just a simple fix... no stutter! that's all i ask!
Reply
#14
Yes, I have to agree that installing the Ubuntu build to the internal hard drive is a little daunting to me as well (you have to repartition your internal drive, backup your ATV install and stuff....lots of terminal code....well laid out by those who know what they are doing, but still a bit scary to a non-coder guy).

I have to say though that running XBMC off the usb drive could not be easier and it does not change your current setup at all. I have been using XBMC on the ATV for a couple of years now, and this is the smoothest, most compatible, most stable version i have used. No problems at all for me. You have nothing to lose, grab a usb stick, copy the image and boot it up to see if you prefer it.

I am not sure how common the lag problem is (not a lot of others have reported it) and I assumed it was just my problem. Still this Ubuntu solved it.

Best of all, if you are interested in playing HD content using the CrystalHD card, it is GREAT. So far, it plays all my HD files smoothly. This to me is completely worth changing the setup.

Good luck.
Reply
#15
My only concern is that if i share my external 2TB hard drive over the network through my mac with ubuntu running via usb thumb, it will be too slow and the vids will still lag, but as you say i have nothing to lose so ill give it a try.

im wondering whether i could just get a powered usb hub and connect both the thumb drive with ubuntu and the external hd to the ATV. would it work?
Reply

Logout Mark Read Team Forum Stats Members Help
Video playback lag on XBMC1