my testing really seems to be pointing to issues with the buffer on xbmc, or lackthereof. specifically, I have an mkv that still buffers on the 2/1/11 nightly build. It's buffering less, only did it twice in the 45 minute length last night. Still, this same file converted to m4v via mkvtools (which just repackages, no transcoding done so the file is essentially the same, bitrates unaffected) when played through the stock appletv firmware from an itunes share does not have these issues. In fact, after just 3 minutes I paused at a point that caused buffering last night on xbmc (fairly high bitrate spike) and in the timeline at the bottom it showed at least another 3-4 minutes already in the buffer. To me, this says that network throughput is not the issue but rather how xbmc is handling the file. It seems, at least in my test environment, there's a bottleneck somewhere in how xbmc is handling the file. I'm hopeful that it's an issue that can be resolved once we have some control over the buffer size.
If any of the coders are keeping up with this thread..do we have any indication what the buffer is on xbmc right now? It really seems like this is the issue, and would explain why the streaming is perfectly fine for some people, but not others. Excellent network conditions probably wouldn't see an issue, but if the buffer is too small then slight lags or hiccups might be enough to throw off the stream.
I can post a full pastebin, but here's what looks like the relevant info from the debug log. This stuff is mostly greek to me, but it looks like it gets to a point where it's requesting data and doesn't get anything. Again, since it streams just fine through itunes when just repackaged and not reencoded, it makes me think there's not enough of a buffer (if itunes buffers more, it would make sense that by the 3 minute mark there was already a few more minutes in there, and no hiccups were seen). Watching the codec info screen the cpu never goes above 80 or 81%. Doesn't seem as if decoding is the issue.
Code:
22:27:48 T:149921792 M: 72097792 DEBUG: HttpApi Start command: GetGUIStatus paras: GetGUIStatus
22:27:49 T:169062400 M: 72093696 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
22:27:51 T:149921792 M: 72097792 WARNING: Previous line repeats 1 times.
22:27:51 T:149921792 M: 72097792 DEBUG: HttpApi Start command: GetVolume paras: GetVolume
22:27:51 T:169062400 M: 72097792 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
22:27:51 T:149921792 M: 72097792 DEBUG: HttpApi Start command: GetGUIStatus paras: GetGUIStatus
22:27:52 T:169062400 M: 72097792 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
22:27:53 T:167563264 M: 72097792 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available
22:27:53 T:166678528 M: 72097792 DEBUG: CDVDPlayer::SetCaching - caching state 1
22:27:53 T:166678528 M: 72097792 DEBUG: CDVDPlayer::HandleMessages - player started 2
22:27:53 T:166678528 M: 72097792 DEBUG: CDVDPlayer::HandleMessages - player started 1
22:27:53 T:149921792 M: 72097792 DEBUG: ------ Window Init (DialogSeekBar.xml) ------
22:27:54 T:149921792 M: 71700480 DEBUG: HttpApi Start command: GetVolume paras: GetVolume
22:27:54 T:149921792 M: 71700480 DEBUG: HttpApi Start command: GetGUIStatus paras: GetGUIStatus
22:27:57 T:149921792 M: 71688192 DEBUG: HttpApi Start command: GetVolume paras: GetVolume
22:27:57 T:149921792 M: 71688192 DEBUG: HttpApi Start command: GetGUIStatus paras: GetGUIStatus
22:28:00 T:149921792 M: 71667712 DEBUG: HttpApi Start command: GetVolume paras: GetVolume
22:28:00 T:149921792 M: 71667712 DEBUG: HttpApi Start command: GetGUIStatus paras: GetGUIStatus
22:28:01 T:166678528 M: 71663616 DEBUG: CDVDPlayer::SetCaching - caching state 0
22:28:01 T:169062400 M: 71663616 DEBUG: CDVDPlayerAudio:: Discontinuity - was:126084922.540147, should be:126048028.290147, error:-36894.250000
22:28:01 T:149921792 M: 71659520 DEBUG: ------ Window Deinit (DialogSeekBar.xml) ------
22:28:03 T:149921792 M: 68403200 DEBUG: HttpApi Start command: GetVolume paras: GetVolume
22:28:03 T:149921792 M: 68317184 DEBUG: HttpApi Start command: GetGUIStatus paras: GetGUIStatus
22:28:04 T:169062400 M: 72024064 DEBUG: CDVDPlayerAudio:: Discontinuity - was:129085251.331813, should be:129095285.562785, error:10034.230972
22:28:06 T:167563264 M: 72024064 DEBUG: CPullupCorrection: detected pattern of length 1: 33366.67, frameduration: 33366.666667