PDA

View Full Version : HD content and DVDPlayer decoder


ultrabrutal
2007-09-13, 22:46
After two months of repair my plasma is finally home. :) I loaded my Xbox with latest XBMC version and went to watch a divx hd encode at 1280x544, only to find that it was unwatchable (too many dropped frames).. I noticed that subtitle support has been added though.
I guess the changes done to DVDPlayer decoder is done for the Linux version and the changes also affects the Xbox. Disabling subtitles does not help on the dropped frames really, so I was wondering which older version of DVDPlayer I should revert back to - a version before decoding speed was touched in a negative way. I used to be able to watch these encodes with none or few dropped frames. Now it's totally unwatchable :(

Thanks for the help in advance

Gamester17
2007-09-13, 23:23
Moving to the support forum, as this does not belong in the develpers forum unless you are a developers yourself working on this.

ultrabrutal
2007-09-14, 00:12
sorry gamester... I am a developer and working on finding the optimal version hehe. JK... Just figured that the problems are related to the recent development hence the choice of forum

elupus
2007-09-14, 01:22
can't say i know anything that has changed in dvdplayer that could affect performance. haven't done much at all.

ultrabrutal
2007-09-14, 11:08
elupus, subtitle support was added recently right? and I believe I read about other stuff being done for the Linux branch?
sadly I didn't save all the old versions so I cannot really backtrack to find a working one if you have no idea what changes can have affected performance in such a way

plugh
2007-09-14, 20:39
'brutal - just a thought...

perhaps you should also look for a (new?) thread consuming cpu time, or perhaps there were smb changes, or ...

ie it may not be dvdplayer, but the environment and/or supporting code that changed

ultrabrutal
2007-09-14, 21:44
plugh, I thought about that too, however I know that changes were done to dvdplayer (subtitle support for example which is nice but not if it drops frames for me). Tonight I downloaded all the t3ch builds going back to July first. I will go through them all to find where the drops began to appear. Then I'm gonna go through the change log between those two versions and hopefully I can spot what could be the culprit.

elupus
2007-09-14, 23:03
check for this fix..
fixed: application thread wasted 10ms each loop waiting for dvddrive detection.

alot of people started reporting odd stuff at that change (or around it). was done 2007-08-06 18:31:18

ultrabrutal
2007-09-15, 13:49
Ok, I've tested latest build from 09-10, 07-01, 03-04... All have the same problem. I'm pretty sure it used to work back in March with no drops in these movies which are all streamed from the same NAS.

Here are my settings (let me know if a full debug log is useful and in which versions):

HQPS v1 or v2 (doesn't matter - v2 is not in 03-04 build)
No flicker filter
720p output
Calibrated video output to match screen
Digital Audio enabled
Constant fan speed
Front led as is (no cycle!)
Cache as is
All network services disabled
No DVD dongle attached, only the logitech wireless receiver

Going back to 03-04 and still not working, pretty much rules out the Linux branch changes to DVDPlayer.

Here is a snip of the normal log (not debug):

05:24:52 M: 36507648 NOTICE: DVDPlayer: Opening: smb://DNS323/Volume_1/bent/Movies/MPEG4 HD/Serenity.avi
05:24:52 M: 36507648 NOTICE: CDVDPlayer::CloseFile()
05:24:52 M: 36507648 NOTICE: DVDPlayer: waiting for threads to exit
05:24:52 M: 36507648 NOTICE: DVDPlayer: finished waiting
05:24:52 M: 35983360 NOTICE: Creating InputStream
05:24:52 M: 35983360 NOTICE: Creating Demuxer
05:24:55 M: 25366528 NOTICE: Opening audio stream: 1
05:24:55 M: 25366528 NOTICE: Finding audio codec for: 86020
05:24:55 M: 25051136 NOTICE: Creating audio thread
05:24:55 M: 24526848 NOTICE: running thread: CDVDPlayerAudio::Process()
05:24:55 M: 24526848 NOTICE: Opening video stream: 0
05:24:55 M: 24526848 ERROR: CDVDPlayerVideo::OpenStream - Invalid framerate 30000, using forced 25fps and just trust timestamps
05:24:55 M: 24526848 NOTICE: Creating video codec with codec id: 13
05:24:55 M: 24526848 NOTICE: Creating video thread
05:24:55 M: 23994368 NOTICE: Creating audio device with codec id: 86020, channels: 2, sample rate: 48000, pass-through
05:24:55 M: 24367104 NOTICE: running thread: video_thread
05:24:55 M: 20959232 NOTICE: Initializing video device
05:24:55 M: 20701184 NOTICE: fps: 25.000000, pwidth: 1280, pheight: 544, dwidth: 1280, dheight: 544
05:24:55 M: 20701184 NOTICE: Display resolution USER : 720p 16:9 (1)

NB! The movie is not 25 fps nor 2 channels. Not sure if it matters. Something else in on the lose here. Anyone have any ideas?
The NAS is the same as before attached via a switched gigabit network. I guess I could move the movie to a Windows server and even to the xbox harddrive eventhough it will be truncated, just to rule out the NAS - which used to stream these movies with few or no drops. Now they are unwatchable with long pauses and audio drops too.

Tnx

Gamester17
2007-09-15, 15:52
I could move the movie to a Windows server and even to the xbox harddrive eventhough it will be truncated, just to rule out the NASYou should deffinitly start by copying the file to the Xbox local built-in harddrive.
Then post a full debug log to pastebin and upload a sample video to somewhere:
http://xboxmediacenter.com/wiki/index.php?title=HOW-TO_Submit_a_Proper_Bug_Report

PS! No offence but please avoid making any assumptions, read this article why:
http://www.catb.org/%7Eesr/faqs/smart-questions.html#id272017

ultrabrutal
2007-09-16, 13:05
After some more testing, this is what I found:

NAS - SMB: Shitload of drops
NAS - FTP: Shirt load of drops
Windows - SMB: Normal level of drops - same as NAS used to be
Xbox HDD: Little improvement over Windows -SMB

The following log is from NAS - SMB: http://pastebin.com/m10b1f8d2

Stuff like this looks weird:


03:53:04 M: 18038784 WARNING: CDVDVideoCodecFFmpeg::Decode - avcodec_decode_video didn't consume the full packet
03:53:04 M: 18137088 INFO: CDVDPlayerVideo - Stillframe detected, switching to forced 23 fps
03:53:04 M: 17993728 INFO: CDVDPlayerVideo - Stillframe left, switching to normal playback
03:53:04 M: 17960960 DEBUG: CDVDPlayerAudio:: Discontinuty - was:222229798, should be:221920582, error:-309216


The NAS is able to copy the whole movie in about 5-10 minutes. Does this rule out a cache underrun?
For fun I tried setting cache to 8 mb instead of just 2. Didn't change anything though.

Still want a sample? If so how big should it be?

elupus
2007-09-16, 15:26
nah it doesn't rule it out. check the vq/aq values ( reminds me that one of them are named wrong ). one of them should be around 100% all the time. if it isn't the filesystem isn't providing data quick enough.

it does look like something odd is going on with your nas. some sort of incompatibility with xbmc. since you had same issue over ftp, it seems like a network issue. I would try moving the nas closer to the xbox and use a different switch perhaps.

pike
2007-09-16, 16:20
maybe a case of Jumbo frames ? (just throwing it out there)

ultrabrutal
2007-09-16, 17:02
elupus, vq (for video) is hitting 0% often and it seems that when it does it drop frames. cpu use totally at about 70%... later on cpu use is at 100% (action scene) and both vq and aq is around 100%.
move nas closer? they are both in the same gigabit switch. I do have another brand new gigabit switch I could try or I can even connect NAS directly to the Xbox. However the computer is also in same switch and it does not have the problem.

elupus
2007-09-16, 18:40
the xbox has troubles with some switches. if you have an old 100mbit switch around connect it too that instead.