Log in Register FAQ Memberlist Search pcHDTV Forum Index
pcHDTV Forum

pcHDTV Forum Index -> General pcHDTV topics -> Dropping frames during playback, processor usage only at 15% Goto page 1, 2  Next
Post new topic  This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic 
Dropping frames during playback, processor usage only at 15%
PostPosted: Thu Mar 03, 2005 11:11 am Reply with quote
bmhowe
 
Joined: 03 Mar 2005
Posts: 14




Hello, MythTV experts. I just built a system last week and am in the process of finishing up setting up MythTV. For reference, my hardware specs are:

Hardware:
AMD Barton 3200+, 400MHz FSB
Asus A7N8X Rev 2.0 (onboard audio)
2x 256MB PC3200 RAM (dual channel)
AGP 8x Nvidia 5200 FX w/ 128MB RAM
HD3000 capture card
160GB/7200/8MB cache Maxtor hard drive

Software:
KnoppMyth R5A10 (MythTV 0.17, XvMC disabled)
Nvidia 6629 drivers (latest)

With that out of the way, on to the problem... When playing back recordings, some frames are being dropped when there is a lot of movement in the scene. It is even more noticable when playing back HiDef recordings. I would normally think that that would mean that my processor can't decode fast enough, but when I telnet in to check processor usage during playback, the highest it gets is 15%.

It doesn't drop enough frames to be labeled "very choppy" or "very jumpy" (at its worst, it probably drops 15-20 frames per second), but it is definitely noticable and somewhat irritating (my wife will not be happy because we are migrating from a Panasonic DVR that didn't drop any frames Laughing ). Since the processor isn't being maxed out, then what else could it be? DMA is enabled on the hard drive, I am using AGP 8X, and the FSB is 400MHz. I don't have a clue what the problem is! Does anybody have any recommendations for something else I should check to help troubleshoot this? Thanks in advance!
View user's profile Send private message
PostPosted: Thu Mar 03, 2005 12:37 pm Reply with quote
Scott Larson
 
Joined: 15 Oct 2003
Posts: 713
Location: Portland, OR




Could you play these recordings with xine with the --verbose=8 option? It will tell you more about how many frames are being dropped and maybe why.
View user's profile Send private message
PostPosted: Thu Mar 03, 2005 1:48 pm Reply with quote
bmhowe
 
Joined: 03 Mar 2005
Posts: 14




I'll try that tonight and let you know....thanks for the tip!
View user's profile Send private message
PostPosted: Thu Mar 03, 2005 2:15 pm Reply with quote
Scott Larson
 
Joined: 15 Oct 2003
Posts: 713
Location: Portland, OR




If it drops frames just every once every few minutes, it's probably something like a cron job or something else running that suddenly requires a lot of CPU for a fraction of a second. Since it finishes quickly, it doesn't make a dent in the measured processor usage but it monopolizes the CPU long enough to make your player drop a bunch of frames.

If you're running a browser, there are a lot of sites that dynamically update every few minutes and this will often cause the player to pause and drop frames. It's best to just kill everything off and see if that solves it.
View user's profile Send private message
PostPosted: Thu Mar 03, 2005 2:31 pm Reply with quote
bmhowe
 
Joined: 03 Mar 2005
Posts: 14




Quote:
If it drops frames just every once every few minutes, it's probably something like a cron job or something else running that suddenly requires a lot of CPU for a fraction of a second. Since it finishes quickly, it doesn't make a dent in the measured processor usage but it monopolizes the CPU long enough to make your player drop a bunch of frames.


I don't think that's it because the frames that are dropped really seem to be dependent on the video....it is really noticable on American Idol when the camera pans. But, nonetheless, I will try to disable as many processes as I can. Thanks.
View user's profile Send private message
PostPosted: Thu Mar 03, 2005 5:15 pm Reply with quote
Scott Larson
 
Joined: 15 Oct 2003
Posts: 713
Location: Portland, OR




FOX is 60p which really demands good CPU scheduling for all the frames to be displayed. For example I wasn't really seeing 60 frames a second with my 2.4 kernel until I changed the time slicing to 1000HZ. Mplayer and xine were simply discarding about half of the frames because they knew they wouldn't be able to display them without causing jumps and A/V sync problems. As a result, they didn't use much CPU. Once I changed the time slicing to 1000HZ, the CPU usage went way up but i was finally seeing all the frames. It suddenly looked just as smooth as my cable STB.

If you're running a 2.6 kernel, I think you already have 1000HZ scheduling.
View user's profile Send private message
PostPosted: Thu Mar 03, 2005 6:56 pm Reply with quote
bmhowe
 
Joined: 03 Mar 2005
Posts: 14




It looks like I am running kernel 2.6.9-chw. In /usr/src/linux/include/asm/param.h, HZ is set to 1000, but USER_HZ is set to 100. Should I try to change the USER_HZ to 1000?
View user's profile Send private message
PostPosted: Thu Mar 03, 2005 7:07 pm Reply with quote
Scott Larson
 
Joined: 15 Oct 2003
Posts: 713
Location: Portland, OR




Yes yes yes! Change USER_HZ to 1000 and see if those pans suddenly get smooth and pretty. You'll also probably see your CPU usage go up quite a bit but that's good.

"American Idol" is probably the best test for this since right now. It's 60p and has some panning. If only football were still on.
View user's profile Send private message
PostPosted: Thu Mar 03, 2005 7:13 pm Reply with quote
Scott Larson
 
Joined: 15 Oct 2003
Posts: 713
Location: Portland, OR




There's another thing (now that I'm in front of my computer). If you're using XvMC, there seems to be something like a lock that XvMC and the X server fight over to get control of the screen. So say a terminal is scrolling and printing lots of stuff, it might not be taking up a lot of CPU but it's forcing XvMC to wait for the X server to finish what it's doing. So again, it's best to kill everything you can and restart things to see what might be causing the problem.
View user's profile Send private message
PostPosted: Thu Mar 03, 2005 8:36 pm Reply with quote
bmhowe
 
Joined: 03 Mar 2005
Posts: 14




OK, I'll change USER_HZ to 1000 and try again, but that will probably be tomorrow before I have enough time to do it. Thanks for your tips, Scott!
View user's profile Send private message
PostPosted: Fri Mar 04, 2005 7:18 pm Reply with quote
Guest
 




Another possibly related piece of info: when I run nuvinfo on files that MythTV has recorded, it fails. I went into the Perl module to see exactly what was happening, and the code that grabs the information from the file is returning junk (the finfo field isn't ASCII readable). My files are about 7GB+ per hour, even if the show isn't HiDef. That seems awefully high to me. Is Myth talking with my HD3000 properly?
PostPosted: Sat Mar 05, 2005 8:21 am Reply with quote
Guest
 




Well, I changed USER_HZ to 1000 and mythfrontend crash...however I still noticed some frames being dropped in xine. When I ran xine --verbose=8, it didn't say anything about dropped frames (past the initial startup), but it is clear that they are getting dropped somewhere. Should I try different nvidia drivers? Should I have other options enabled in my XF86Config-4 file?
Not dropping frames during playback - it's during capture?
PostPosted: Mon Mar 07, 2005 10:24 pm Reply with quote
bmhowe
 
Joined: 03 Mar 2005
Posts: 14




Well, I should have tried this earlier, but it didn't occur to me that frames might be being dropped during capture. I captured ~5 seconds tonight using the following command:
Code:
getatsc /dev/dtv0 42 > test.ts

I have posted this file for examination on my website. The file is 12MB. I only have 384kbit upload, so downloading should take about 4-5 minutes. I would greatly appreciate anybody's thoughts on what would be causing this. The video clip shows a pan shot of a pill bottle. If you look at the left vertical edge of the bottle during the pan, you should see it jumping. (At least I did when I ran it on Xine on my Myth box and VLC 0.8.1 on my Windows box.) Can anybody else confirm that they are seeing jumps as well?

Are there BIOS settings I can tweak to fix this? Is there any way I can confirm how many frames are being dropped? A log file? A verbose option somewhere? Thanks!
View user's profile Send private message
OK, so maybe it wasn't during capture?
PostPosted: Tue Mar 08, 2005 1:37 pm Reply with quote
bmhowe
 
Joined: 03 Mar 2005
Posts: 14




Well, I have played the above-mentioned .ts file on 3 different computers many many times now (all the computers had NVidia cards). The skipping appears to happen in different places each time I play it, so I take that to mean that the .ts file does contain all the frames, and the decoders just can't seem to keep up; however, the processor isn't being pegged, so I don't know why it couldn't keep up.

I used ProjectX to convert the .ts file to a .m2v file and played that in Windows Media Player, and it seems to perform better. Could it be that the libraries in VLC need to be tweaked (buffer size, etc)?

Is anybody else noticing the skipping when playing the .ts file? (http://www.thehowehouse.com/test_short.ts)

I may soon open a new thread with a different subject line now that the problem seems to be narrowed down and somewhat removed from MythTV.
View user's profile Send private message
Re: OK, so maybe it wasn't during capture?
PostPosted: Tue Mar 08, 2005 8:01 pm Reply with quote
maestro
 
Joined: 10 Jul 2004
Posts: 18




bmhowe wrote:
Is anybody else noticing the skipping when playing the .ts file? (http://www.thehowehouse.com/test_short.ts)


I had no problems playing the clip on a Pentium 4 M 2.0GHz laptop (ATI Radeon 7500) using VLC 0.8.1 in Windows. The clip is pretty short, but there were no skips at all (tried all four sub-programs too Smile ).
View user's profile Send private message
Dropping frames during playback, processor usage only at 15%
  pcHDTV Forum Index -> General pcHDTV topics
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 7 Hours  
Page 1 of 2  
Goto page 1, 2  Next
  
  
 Post new topic  This topic is locked: you cannot edit posts or make replies.  


Powered by phpBB © 2001-2003 phpBB Group
Theme created by Vjacheslav Trushkin