ATV2 with subtitles enabled causes lag
#35
Hi guys, I can assure this is not only happening on the ATV2 but also on an iPad2 running iOS 5.0.1 (Apple TV Second Generation: 4.4.4 Based on iOS 5.0.1 wikipedia).
I found it really surprising since it all worked on the 4.3.3 JB. I never updated until a few weeks ago when 5.0.1 got jailbroken so I could install XBMC immediately.
This is kind of weird and I also think it has something to do with iOS itself.

First of all, it is noticable that I don't use twitter/facebook/w/e in my notification center. I even removed ALL apps from the notification center except for the calendar app.

Secondly, I have all location services turned off, no 3G and bluetooth turned off if that should cause any performance issue. Mail app is not used so doesn't fetch anything and iCloud is not used. Facetime is also turned off.
This would leave only SBSettings that's running constantly in the background with Activator I guess.

Then the video I am trying to playback is this:
http://pastebin.com/bdjzBqMu (mediainfo log)
http://dl.dropbox.com/u/40617370/%5BTh3a...0D7%5D.mkv
The video is played on the device itself (I'm kind of against streaming because you can just play on the PC itself that you stream on. Why stream if the iPad2 is capable of doing things itself and enjoy everything on the go?)

This video used to play smoothly without any lags with the subtitles turned on on 4.3.3 on the nightlies since november till Eden 11b1. (Later releases were released when I went over to iOS 5.0.1)

Some findings about this video:
The xbmc.log:
http://pastebin.com/6z5UsibD

The video would lag somewhere around 00:30 (mmConfuseds)
The xbmc.log would then show the warning

11:55:29 T:804790272 WARNING: CRenderManager::FlipPage - timeout waiting for previous frame
11:55:29 T:71880704 WARNING: Previous line repeats 1 times.
11:55:29 T:71880704 ERROR: Get - failed to get stream

Note that when this video is played, you clearly see the grey color buffer ahead of the playback, so this shouldn't be an issue.

I also experimented:

- Rebooting iOS (I thought there were some weird issues)

- Restore -> Re-jailbreak -> reinstall XBMC (because I was afraid there were some failures of the CPU because of iOS or so)

- Turning the subtitles off, and that would play the video flawlessly. Unfortunately, I can't understand japanese :p.

- Playing the video with another fansubber's subtitles. This was quite interesting because it would lag around another time.

- Switching the mkv container into an m4v container and changed the FLAC audio into ALAC with external subs. This unfortunately shows the same symptoms as the original mkv file. Although the m4v CAN be played outside XBMC (i.e. iFile/GoodReader/web viewer).

- Use an advancedgui.xml to turn on skiploopfilter (tried values 8, 16 and 32) in the hope that some frames might be skipped to get normal playback again. This only causes XBMC to buffer faster which is good, but for some reason playback is still laggy.


I don't know if this is supposed to show, but when you go to Settings -> System info -> Hardware the CPU is blank at it doesn't really show whether it has a second CPU or not. When debug logging is enabled however it says:
CPU: CPU0: 0.0% CPU1: 0.0% (CPU-XBMC XX.YY%) so this also shouldn't be the issue.

I also have all addons disabled in XBMC (by removing all metadata involving addons in XBMC.app/XBMCData/XBMCHome/addons/) so XBMC wouldn't load anything unnecessary to only view videos.
The skin I use is Touched, Navigation sounds turned off, no thumbnailing, No vertical blank sync, Audio output on Optical/Coax. Just everything you can imagine to let XBMC be minimalistic.

My theory is that because iOS 5.0.1 is also using some GPU resources now and hardware acceleration to make iOS run smooth, the video memory or whatever was used is partially taken and causes this lag.

So... I think the text was quite long, but I hope it will help you guys fix the problem. And for your information, I'm a 3rd year computer science student. And I'm quite new to development of video applications, so I doubt I can be of much help if I were to dive into your code.

Thanks in advance!

UPDATE:
So I was browsing cydia and saw that you can install "top".
I installed it and ssh'd from my computer to my ipad, ran top and on launched XBMC to play the video. The CPU info said ~57% around the lag while XBMC CPU said 95-101% XBMC-CPU usage. Maybe this is something that could be fixed too.
Reply


Messages In This Thread
[No subject] - by Ned Scott - 2012-01-22, 10:32
[No subject] - by zhango - 2012-01-22, 10:41
[No subject] - by Memphiz - 2012-01-22, 12:31
[No subject] - by basslover - 2012-01-22, 15:47
[No subject] - by maruchan - 2012-01-22, 17:51
[No subject] - by Memphiz - 2012-01-22, 22:37
[No subject] - by Haohmaru - 2012-01-22, 23:38
[No subject] - by maruchan - 2012-01-23, 02:21
[No subject] - by whitecom - 2012-01-23, 02:34
[No subject] - by tarjan - 2012-01-27, 18:39
[No subject] - by linusyang - 2012-02-10, 06:59
[No subject] - by Ned Scott - 2012-02-10, 07:59
[No subject] - by linusyang - 2012-02-10, 08:06
[No subject] - by Ned Scott - 2012-02-10, 11:55
[No subject] - by Voinage - 2012-02-11, 15:54
[No subject] - by Ned Scott - 2012-02-11, 17:36
[No subject] - by maruchan - 2012-02-11, 18:07
[No subject] - by tarjan - 2012-02-12, 22:45
[No subject] - by linusyang - 2012-02-13, 19:10
[No subject] - by Ned Scott - 2012-02-14, 07:48
[No subject] - by tarjan - 2012-02-14, 20:04
[No subject] - by Haohmaru - 2012-02-14, 20:29
[No subject] - by Memphiz - 2012-02-15, 00:14
[No subject] - by linusyang - 2012-02-15, 05:56
[No subject] - by davilla - 2012-02-15, 06:53
[No subject] - by Haohmaru - 2012-02-15, 07:41
[No subject] - by linusyang - 2012-02-15, 08:18
[No subject] - by davilla - 2012-02-15, 09:54
[No subject] - by macf1an - 2012-02-15, 12:51
[No subject] - by tarjan - 2012-02-15, 15:32
[No subject] - by davilla - 2012-02-15, 16:09
[No subject] - by Memphiz - 2012-02-15, 16:22
[No subject] - by tarjan - 2012-02-15, 17:12
Some findings - by Th3avatar - 2012-02-18, 13:23
[No subject] - by biGdada - 2012-02-18, 15:10
[No subject] - by tarjan - 2012-02-18, 17:56
[No subject] - by Th3avatar - 2012-02-18, 18:49
[No subject] - by Ned Scott - 2012-02-19, 02:34
[No subject] - by Th3avatar - 2012-02-19, 10:31
[No subject] - by biGdada - 2012-02-23, 15:38
[No subject] - by Ned Scott - 2012-02-23, 18:46
[No subject] - by davilla - 2012-02-23, 22:17
[No subject] - by biGdada - 2012-02-23, 22:30
[No subject] - by Th3avatar - 2012-02-23, 22:30
[No subject] - by davilla - 2012-02-24, 01:12
[No subject] - by Ned Scott - 2012-02-24, 13:12
[No subject] - by Th3avatar - 2012-02-24, 13:33
[No subject] - by Scott R - 2012-02-26, 17:51
[No subject] - by Th3avatar - 2012-02-26, 20:50
[No subject] - by tarjan - 2012-02-28, 03:00
[No subject] - by Memphiz - 2012-02-28, 10:28
[No subject] - by Th3avatar - 2012-02-28, 13:04
[No subject] - by Ushae - 2012-02-29, 23:07
[No subject] - by Th3avatar - 2012-03-05, 20:59
Logout Mark Read Team Forum Stats Members Help
ATV2 with subtitles enabled causes lag0