PDA

View Full Version : HD playback stutters/stalls when streaming


midgetspy
2008-09-28, 23:32
Hey guys,

I've been having a lot of problems with HD mkv playback. Here is the description of my problem:

I will be streaming a 720p mkv file via gigabit ethernet when suddenly the video will freeze on a certain frame. The audio will freeze as well, playing a short (half second?) clip over and over again. This happens for between 5-15 seconds, after which the video either resumes playback or sometimes it kicks me back to the menu.

Things to note:

a) This does not happen if I copy the file to the computer's HD and play them there, then they play 100% fine.
b) This doesn't always happen in the same spot - it could freeze somewhere and if I rewind it it'll play past that same spot with no problems.
c) Sometimes movies of the same resolution streamed from the same spot play with no problems, and sometimes the problem occurs every few minutes.

The debug log: http://pastebin.ca/1213031

I start playing the movie around line 650. Line 813 is where the playback froze, and as you can see absolutely nothing happened for the next 17 seconds while it sat there frozen. It then booted me back to the menu. It should be noted that directly after I made this debug log I played the file again skipped to the part where it had skipped before and it played past it fine.

This is on a fresh install of Windows XP. Probably unrelated, but also noteworthy is the warning for missing DLL files at lines 514-523.

Any suggestions of what to try? I tried increasing the cache and it didn't seem to help. It's clearly not the network speed, I can copy the whole file to the XBMC computer in 3 minutes so streaming it should be no problem. I also watched a few minutes of the same file from my Vista computer with MPC and it played with no problems.

midgetspy
2008-10-02, 19:18
Update to this issue:

- I just watched a full 1080p mkv streamed off the exact same share that's usually giving me troubles and it played without interruption. I then opened up the file I used in the log above and tried it and noticed that it played fine BUT it had a weird color problem periodically.

The color problem I'm describing looks like a single frame gets "stuck" on the screen and the pixels remain "stuck" until they get updated to a new color or something. This happens if you skip forward a wmv in VLC, same thing.

Does anybody else get either of these 2 problems or is your guys' mkv playback flawless? If I copy it to the PC it's 100% flawless so it's gotta be an issue with streaming in some facet - I don't know if it's the PC, XBMC, ffdshow, or what but I'd like to track it down.

Inimical
2008-10-06, 17:15
I have the same problem here.. I think it's an issue with the codec that is used. What is your cache set to?

720p plays fine, but there is visible stutter.. 1080p plays completely out of sync.

Maybe there's a way to prioritize codecs, and use a different one?

midgetspy
2008-10-06, 23:49
Unfortunately XBMC doesn't use codecs.

Inimical
2008-10-08, 21:29
Shows how much I know.

So is there any actual support for this issue?

live2give
2008-10-09, 00:45
have you tried updating lan drivers, graphic drivers, etc etc??

tebicenter
2008-10-31, 18:46
Any news about this?

I have problem when playing 720p videos too, after a couple of minutes playing it crash my machine.

renegades15
2008-11-09, 08:08
:oo:...Gents I am getting the same issue...any ideas..?? Is it becasue of the size of the data being streamed..I a have noticed with large streams, the image will tend to freeze..

cold_realms
2008-11-09, 11:26
One thing to keep in mind when asking for help is post your system specs. Namely the CPU as ALL video processing is done via the CPU (as opposed to the video card).

Also check the wiki on how to get a debug log and how to post it here.

angryjack
2008-11-09, 12:16
i discovered the same effect but i would suggest that it has nothing to do with the performance of the PC

Before i came to XBMC, i was using Mediaportal with Mplayer as external player and with the same movies i never got this on the same hardware base.

Also i have a set-top box which is modded to play m3u playlists with VOB's using the TCPMP player. It is based on Windows Mobile 5 and has a Celeron 733 MHz with 128MB Ram only inside but playing the movies without any stuttering.

Cause i am using a 32" LCD-TV, i set up the skin inside XBMC to 1366x768 pixel with bicubic automatic upscaling. Then i discovered the problem and changed it to 720p without upscaling and now it seems to work.

angryjack

cold_realms
2008-11-09, 13:43
i discovered the same effect but i would suggest that it has nothing to do with the performance of the PC

Before i came to XBMC, i was using Mediaportal with Mplayer as external player and with the same movies i never got this on the same hardware base.

Also i have a set-top box which is modded to play m3u playlists with VOB's using the TCPMP player. It is based on Windows Mobile 5 and has a Celeron 733 MHz with 128MB Ram only inside but playing the movies without any stuttering.

Cause i am using a 32" LCD-TV, i set up the skin inside XBMC to 1366x768 pixel with bicubic automatic upscaling. Then i discovered the problem and changed it to 720p without upscaling and now it seems to work.

angryjack

You forget that mediaportal's player utilized the GPU for video playback, and the set top box isn't using the 733 as it's only video acceleration...XBMC (ffmpeg) currently does not and is 100% CPU bound.

SMALZ
2008-11-16, 05:34
So from what i gather here, the reason that i may be getting video stutter when playing back 720p x.264 files is because it is relying on my cpu power rather than the ability of my gpu? Forgive me if i am wrong. Updating my memory which is currently 1536mb would not solve the issue, neither would be the issue of updating my ATI Radeon 128 MB graphics card to a better one. From what i have should that be more than enough to run those types of files without stutter?

Pentium P4 2.8 HT
ATI Radeon 128
1536MB Memory
HD: WD 400GB MyBook

midgetspy
2008-11-16, 12:23
The bug this thread was originally created for has nothing to do with CPU/GPU stutter. I'm not talking about playback stutter, this is something to do with a streaming error. When this bug happens my CPU is less than 10%... it's not a playback problem. Every time it happens there is a "stillframe detected" entry in my log, but copying it to my local HD plays the file fine. Playing past the same spot in the file works fine on second try, it's not a problem with the source files.

In short, anybody talking about stuttering because of your PC being too slow is in the wrong thread :0)

bradn
2008-11-18, 05:50
I seem to be having the same problem. HD .mkv files load (although they don't show the "loading" window and progress bar that regular files bring up) and then freeze after about 5 seconds. They play fine from the local drive, and they play fine over wifi with MPC.

I am using XBMC Atlantis, DL'd and installed 2 days ago.

EDIT: Actually, I take that back. XBMC won't play any HD files at all, not on the local drive, not over ethernet or wifi. They play about 5 secs and then freeze (video and audio), but the counter keeps going.

wh0f4rted
2008-12-30, 10:36
Any luck on this? I am having the same shuttering and audio\video sync issues.


CPU: AMD 9600 Phenom
Memory: 4G 1066Mhz
Video Card: ATI RADEON 4670 512MB

Jester
2008-12-30, 10:48
@midgetspy

try and download the latest SVN build, re-test, since you use gigE, if your NAS supports jumboframes please turn them on.

ashlar
2008-12-30, 12:48
midgetspy, I'm on gigabit too and all my media is on an external server. No problems such as the ones you're describing, with both 720p and 1080p material.

midgetspy
2009-01-31, 12:45
OK this is driving me insane. Same problem, over and over. I confirmed a few things tonight:

- It happens whether I watch movies over a mapped drive or over a smb:// source in XBMC
- I turned the cache for Local HDD and Audio/Video Local Network as high as it would go, but I still encountered the problem. It seemed less frequent but I don't really have enough testing to say that for sure.
- Sometimes it is nothing more than a slight stutter, sometimes the video freezes and audio loops for only a fraction of a second, and sometimes it lasts for 10 or 15+ seconds. When it lasts really long playback usually doesn't recover (it kicks me back to the menu).
- Every single time I can find the exact same thing in my xbmc.log:

22:04:15 T:3932 M:571875328 WARNING: CDVDMessageQueue(audio)::Get - retrieved last data packet of queue
22:04:16 T:3132 M:571895808 WARNING: CDVDMessageQueue(video)::Get - retrieved last data packet of queue
22:04:16 T:3132 M:571879424 INFO: CDVDPlayerVideo - Stillframe detected, switching to forced 23.975986 fps
22:04:21 T:1888 M:566857728 DEBUG: Alloc resources: 1.12ms (0.00 ms skin load, 0.46 ms preload)
22:04:21 T:3132 M:563761152 INFO: CDVDPlayerVideo - Stillframe left, switching to normal playback

22:41:07 T:3792 M:549785600 WARNING: CDVDMessageQueue(audio)::Get - retrieved last data packet of queue
22:41:08 T:3404 M:550055936 WARNING: CDVDMessageQueue(video)::Get - retrieved last data packet of queue
22:41:08 T:3404 M:550191104 INFO: CDVDPlayerVideo - Stillframe detected, switching to forced 23.975986 fps
22:41:19 T:1516 M:559529984 DEBUG: Alloc resources: 13.40ms (0.00 ms skin load, 0.41 ms preload)
22:41:19 T:1516 M:557912064 DEBUG: Error: Requested setting (lcd.enableonpaused) was not found. It must be case-sensitive
22:41:19 T:3404 M:557912064 INFO: CDVDPlayerVideo - Stillframe left, switching to normal playback
22:41:19 T:3792 M:557912064 DEBUG: CDVDPlayerAudio:: Discontinuty - was:2515348604.177156, should be:2503995562.509298, error:-11353041.667858
22:41:20 T:1516 M:557137920 DEBUG: Error: Requested setting (lcd.enableonpaused) was not found. It must be case-sensitive

23:28:04 T:612 M:562483200 WARNING: CDVDMessageQueue(audio)::Get - retrieved last data packet of queue
23:28:04 T:3736 M:560807936 WARNING: CDVDMessageQueue(video)::Get - retrieved last data packet of queue
23:28:05 T:3736 M:560820224 INFO: CDVDPlayerVideo - Stillframe detected, switching to forced 23.975986 fps
23:28:21 T:612 M:561889280 DEBUG: CDVDPlayerAudio:: Discontinuty - was:5061375229.192257, should be:5045226666.666668, error:-16148562.525589
23:28:21 T:1908 M:563519488 DEBUG: Alloc resources: 17.38ms (0.00 ms skin load, 0.55 ms preload)
23:28:21 T:3736 M:561496064 INFO: CDVDPlayerVideo - Stillframe left, switching to normal playback
23:28:22 T:612 M:553627648 DEBUG: CDVDPlayerAudio:: Discontinuty - was:5046232666.666668, should be:5045877333.333335, error:-355333.333333

These are from 3 separate xbmc.log files trying to play the same file 3 different ways (from mapped drive, from smb:// source, and from smb:// source with cache all the way up)

Note the timestamps: when it detects the stillframe absolutely nothing happens for the next few seconds - this is time when XBMC is showing a single frame and looping the audio. The log resumes when the video starts again (many seconds later). What is XBMC doing during this time? Why is there nothing logged? Shouldn't it at least say "Trying to read video, buffer empty" or something over and over while it's frozen?

Also of note is that if I copy the movie to my local HD it always plays flawlessly.

The "retrieved last data packet" part of the log makes me think it must be some kind of network problem. Is there any way I can increase the buffer size to something ridiculous to see if that helps?

I'm streaming them from a linux box running samba - I will try streaming something from my Vista box and see what happens (it's really difficult to test because it occurs maybe 5 times in a whole movie so I end up just watching entire movies with debug on, heh).

This has been happening to be since before the Atlantis alphas all the way to my current svn 17261 build.

Any insight would be appreciated.

salnajjar
2009-01-31, 17:33
It might not fix it, but...

I play back HD files (MKV's mostly) via my Gig lan without problems. The one difference I have is that I don't use the XBMC share client and instead map my drives directly in windows.

This is also coming off a Linux box running samba that I use as my primary file server.

If this still doesn't work then I can send you the additional tuning parameters I used on my XP network stack and the sysctl.conf tuning settings I used on my fileserver to increase throughput.

It might be worth trying.

Seri

DoughBoy
2009-04-03, 06:57
I have same problem on a new Vista 64-bit system. I am using the killa sample.mkv and it pauses with audio still looping almost immediately. I also experience on many other mkv. I am serving off a readynas. Just for fun, I copied the killa sample over to an older linux box which is only 100Mbit btw, and it plays back perfect streaming (although it does drop a few frames because killa sample is demanding).

Not sure how to go about fixing now.

DoughBoy
2009-04-03, 08:48
An update...

I figured out that the problem is a result of some ethernet hardware and/or drivers and certain Samba servers. My case it is an Asus P5N-EM HDMI board with onboard Nvidia Gigabit ethernet and a Netgear ReadyNAS NV.

The only ethernet device I had around to test in this machine was an Apple USB to Ethernet dongle used for my Macbook Air.

I searched how to hack driver to install in Vista 64.

After install, I plugged ethernet into the USB dongle and now I can stream perfectly! Not one stutter or audio loop/crash!

I am going to look for a PCI-X Ethernet tomorrow so I can keep all inside the case nicer.

FYI, my system is an Asus P5N-EM HDMI and uses NnForce 630i chipset. I tried latest Nvidia ethernet driver and it didn't solve the problem.

Tomorrow I am also going to redo with Vista 32-bit since the store I bought it all from accidentally provided 64-bit along with it. Be interesting to see if Vista 32-bit works with onboard lan.

Hope this helps someone... just change to a different ethernet card.

midgetspy
2009-04-03, 10:23
The problem for me was the linux driver for the chipset on the onboard NIC on my NAS didn't work properly. Turns out the RealTek 8168/8169 drivers are garbage on linux and it's a know issue that they suck :-|

I just bought a different NIC with a different chipset and it has been working perfectly ever since.

DoughBoy
2009-04-03, 20:29
I just installed a Dlink DGE-530T and it works fine - no stutter or pausing whatsoever! The USB adapter I had tested was not quite fast enough to stream some HD content and XBMC would drop frames (unrelated to stuttering/pausing issue).

paninari
2009-04-03, 23:45
hi there i actually have an antec fusion case with the AMD variant of the motherboard you mentioned above this uses the nvidia nforce 630 chipset.

shall i just replace the network card also? will this solve the issue?

thanks in advance.