View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 11 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Mon May 15, 2006 7:12 am 
Offline
Joined: Sun Dec 04, 2005 1:44 pm
Posts: 403
Location: Central NJ
My HD playback speed is a little shaky at times, and I know it is because XF86 is hogging my CPU since I upgraded to the nvidia 8178 drivers. (these are very CPU intenstive, and leave very few spare cycles.) The reason I went to 8178 is because otherwise my 1080i output is split down the middle. (It's like someone drew a vertical line down the middle of the screen, and then swapped the left and right sides.) Both the 6629 and 7174 drivers did this.

The only drivers that I've found that display the 1080i screen correctly are 8174 and 8178, but they are so CPU intensive. 8756 is no help either.

Does anyone know of a driver that isn't a CPU hog, but still displays a 1080i display correctly? What is everyone else using?


My current config:

I'm using standard MPEG2 decoding (libmpeg2 is problematic on my machine) with XV turned off.

Aggressive Sound card Buffering - checked
Deinterlacing playback - checked with Bob 2x
Enable opengl v-sync for timing - unchecked
Enable realtime priority threads - checked
Use video as timebase - unchecked
Extra audio buffering - checked

Comm flag is off. Closed captioning is off.

_________________
Currently running: R5.5, HD5000 x 2, PVR150, Athlon 64 3000+, Chaintech VNF4, 1GB RAM, 2 x 250GB in LVM, MSI NX6200TC -> AA 9A60 -> HDTV


Last edited by ed3120 on Mon May 15, 2006 8:54 am, edited 3 times in total.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 15, 2006 7:58 am 
Offline
Joined: Fri May 21, 2004 11:55 pm
Posts: 1206
Location: Silicon Valley, CA
First try a few things. I get much smoother playback when I turn OFF the "opengl sync" option. I think my CPU usage went down a bunch too. I also turned OFF the "suid root" option (I forget what it's called). Both options were on the TV/Playback screen of the standard frontend "setup" screens.

_________________
Do you code to live, or live to code?
Search LinHES forum through Google


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 15, 2006 8:13 am 
Offline
Joined: Sun Dec 04, 2005 1:44 pm
Posts: 403
Location: Central NJ
My open gl sync is off (that's what I meant by unchecked). I don't see anything about "SUID root" in any of the playback setup screens. Is it definitely listed in the menus?

Either way, I'm more interested in a driver that will work well with my system. I think that is the problem.

_________________
Currently running: R5.5, HD5000 x 2, PVR150, Athlon 64 3000+, Chaintech VNF4, 1GB RAM, 2 x 250GB in LVM, MSI NX6200TC -> AA 9A60 -> HDTV


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 15, 2006 8:31 am 
Offline
Joined: Tue Jan 18, 2005 2:07 am
Posts: 1532
Location: California
Two suggestions:

1. If you are driving your display at 1920x1080 interlaced (aka 1080i), you should not deinterlace your video during playback. So uncheck the "deinterlace" option. This will save some CPU time.

2. I am currently using version 8756 successfully, but when I moved from 6629 to 8756 I had to remove the "Option NvAGP 1" line from my XF86Config-4 file. When I removed this option my CPU utilization went down significantly.

3. Prior to using 8756 I found driver version 6629 to be the best choice. Worked for me at 720p and 1080i via VGA. Might want to try 6629.

4. Many people have commented that the real-time priority stuff causes problems. While probably not applicable to your current situation, I thought I would mention it while I am replying.

Not sure if this is useful, but here is how I manage my playback:

1. 480i recordings: Display set to 720p and kerneldint for deinterlacing. I wrote a shell scropt to set the kerneldint filter for all recordings that originate from 480i channels. Run it once and you don't have to fiddle with the deinterlace filter in setup anymore.

2. 720p recordings: Display set at 720p, no deinterlace.

3. 1080i recordings: Display set at 1080i, no deinterlace.


Marc


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 15, 2006 8:52 am 
Offline
Joined: Sun Dec 04, 2005 1:44 pm
Posts: 403
Location: Central NJ
marc.aronson wrote:
Two suggestions:

1. If you are driving your display at 1920x1080 interlaced (aka 1080i), you should not deinterlace your video during playback. So uncheck the "deinterlace" option. This will save some CPU time.


The reason I use deinterlace is because otherwise all of my SD recordings look bad.

Quote:
2. I am currently using version 8756 successfully, but when I moved from 6629 to 8756 I had to remove the "Option NvAGP 1" line from my XF86Config-4 file. When I removed this option my CPU utilization went down significantly.


I don't have "Option NvAGP 1" in my XF86Config-4. My video card is PCI-E, not AGP.

Quote:
3. Prior to using 8756 I found driver version 6629 to be the best choice. Worked for me at 720p and 1080i via VGA. Might want to try 6629.


I tried 6629, it gives me that screen split-down-the-middle problem.

Quote:
4. Many people have commented that the real-time priority stuff causes problems. While probably not applicable to your current situation, I thought I would mention it while I am replying.


I'll try turning that off.

Quote:

1. 480i recordings: Display set to 720p and kerneldint for deinterlacing. I wrote a shell scropt to set the kerneldint filter for all recordings that originate from 480i channels. Run it once and you don't have to fiddle with the deinterlace filter in setup anymore.


That's a very interesting idea. Can you please post that script, as well as instructions on how you've implemented it?

Quote:

2. 720p recordings: Display set at 720p, no deinterlace.

3. 1080i recordings: Display set at 1080i, no deinterlace.


I assume you just turn deinterlace off in the general settings and run these normally and they naturally don't need to be deinterlaced.

Thanks!

_________________
Currently running: R5.5, HD5000 x 2, PVR150, Athlon 64 3000+, Chaintech VNF4, 1GB RAM, 2 x 250GB in LVM, MSI NX6200TC -> AA 9A60 -> HDTV


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 15, 2006 10:14 am 
Offline
Joined: Tue Jan 18, 2005 2:07 am
Posts: 1532
Location: California
Ed3120, here are my detailed notes, tweaked to remove the stuff that isn't relevant.

Marc

My general strategy:

1. Play 1920x1080 recordings with the display resolution set to 1080i so that my TV will do the de-interlacing.
2. Play 1280x720p is played with the display set to 1280x720 resolution.
3. Play 720x480i is played with the display set to 1280x720 resolution. I have set up per-channel filtering to deinterlace 480i channels on playback with the “+kerneldint” filter. Results are way better than playing them back with display set to 1080i. I apply filters using the bash script provided below.
4. I don’t use the DVI connector because the Samsung xx67 series will not accept 1920x1080 through the DVI connector.
5. I am using version 8756 of the nvidia drivers.

My configuration:

Knoppmyth version R5A30.2
System: P4-2.8GHZ, HT enabled, 512MB ram
ECS motherboard with SIS chipset
Video card: Powerspec FX5200
Tuner#1: Motorola DCT-6200 connected via firewire
Tuner#2: Hauppauge PVR-250
Video signal source: Comcast cable
Nvidia driver version: 8756
XVMC is turned off
Display: Samsung HLR-5067 50” DLP TV
Connection via VGA, accepts resolutions up to 1920x1080i

Key setup elements under “Utilities/Setup -> Setup->appearance”

1. Video mode settings (3rd screen): “Separate video modes for GUI and TV playback” is selected. The GUI display is configured as “GUI=1280x720; video output=1920x1080; rate=any; aspect=16x9”. I have filled in two rows under “Overrides for specific video sizes”.
a. The first row is “X=1280; Y=720; Output=1280x720; Rate=any; aspect=16x9”.
b. The second row is “X=720; Y=480; Output=1270x720; Rate=any; Aspect=16x9”.

Key setup elements under “Utilities/Setup -> Setup->TV->Playback”

1. General Playback (1st screen):
• Deinterlace=off
• Use libmpeg2 for decoding=on
• Enable realtime priority threads=off
• Use video as timebase=off
• Extra audio buffering=on
• Aspect override=off.
2. Hardware decoding settings (5th screen)
• Use PVR-350=off
• enable openGL vertical sync=on (turn this off if using driver < 8756)
• use hardware XvMC mpeg decoding=off
• use HW XVMC VLD decoding (via only)=off.
3. Overscan settings (8th screen)
• Vert over/underscan = 0
• Horiz over/under = 0
• Scan displacement (X) = 0
• Scan Displacement (Y) = 0

Recording profiles
1. MPEG2 Encoders->“Default” is used to record all 4x3 material from my PVR-250. Settings: Resolution=720x480; stream-type=mpeg-2 PS; Aspect ratio=4:3; bitrate=3500; max bitrate=3500; audio sampling rate = 48000; audio bitrate-384.

Here is the script. Some of the lines > 80-characters, so be sure line breaks look correct after you copy/paste it.
Code:
#!/bin/sh
#
# If called without any options, this script will set
# various "per-channel" filters.
# If called with the "-c" option, this script will clear all
# per-channel filters.
#
# Filters available: +denoise3d, +kerneldeint, +linearblend
#
if [ "$1" == "-c" ]
then
  sdfilter=""
  hdfilter=""
else
  sdfilter="+kerneldeint"
  hdfilter=""
fi
echo Setting filters, Sdef=$sdfilter   Hdef=$hdfilter
#
# 702 & 707 are hidef 720p -- do not deinterlace.
#
mysql -uroot  mythconverg -B --exec \
  "update channel set outputfilters = \"\" where channel.channum IN (702,707) ;"
#
# Set hdef deinterlace filter for all other channels.
#
mysql -uroot  mythconverg -B --exec \
  "update channel set outputfilters = \"$hdfilter\" where channel.channum NOT IN (702,707) ;"
#
# Channels < 700 are standard definition -- apply sdef deinterlace filter.
#
mysql -uroot  mythconverg -B --exec \
  "update channel set outputfilters = \"$sdfilter\" where channel.channum < 700 ;"
echo Done


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 15, 2006 11:57 am 
Offline
Joined: Fri May 21, 2004 11:55 pm
Posts: 1206
Location: Silicon Valley, CA
Say, Marc, that would make a rather nice KnoppMythWiki page!

_________________
Do you code to live, or live to code?
Search LinHES forum through Google


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 15, 2006 12:32 pm 
Offline
Joined: Sun Dec 04, 2005 1:44 pm
Posts: 403
Location: Central NJ
Thanks, this is very helpful. How do you actually invoke the script? ...or is that script the +kerneldint that you are referring to. I think I'm missing the big picture as to how and when that script gets applied.

For my SD, I have the s-video input on my PVR150 set to record at 640x480. I believe that is the resolution that my Comcast digital cable comes in at. How come you chose 720x480? SD is supposedly 4:3 ratio.

Anyway, for my playback of the DS material, I set “Separate video modes for GUI and TV playback” to play 640x480 at 640x480.

I have a modeline defined in my XF86Config-4 that encapsulates 640x480 within 1080i. Hence my TV thinks it is getting a 1080i signal. It ends up looking pretty good.

Modeline "640x480" 26.964 640 704 768 856 480 486 492 525 -hsync -vsync

You may want to try it this way so that you are only scaling once. Otherwise you scale 640x480 to 1280x720, and then again to 1920x1080 (scaled by your TV). With my method, Myth scales once from 640x480 to 1920x1080 and the TV doesn't have to scale at all.

I think the output is less blocky this way.

_________________
Currently running: R5.5, HD5000 x 2, PVR150, Athlon 64 3000+, Chaintech VNF4, 1GB RAM, 2 x 250GB in LVM, MSI NX6200TC -> AA 9A60 -> HDTV


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 15, 2006 8:16 pm 
Offline
Joined: Tue Jan 18, 2005 2:07 am
Posts: 1532
Location: California
Liv2cod -- that's a good point. I'll pull together the rest of my notes, including my work-around for the nasty "NVRM/xid" problem and create a wiki page.

Ed3120:

Here are the answers to your various questions:

1. How to invoke the script: I placed it into a file named /usr/local/bin/marc-set-filters.sh, chmod a+x /usr/local/bin/marc-set-filters.sh and then I simply call the script once by typing "marc-set-filters.sh". This modifies the mythtv database so that Kernel deinterlacing is automatically applied to the specified channel. Note that you need to tweak the script to apply the filter to the appropraite channel numbers.. Once you do this, you never need to toggle the deinterlace filters in myth setup again.

2. I record at 720x480 because that is the NTSC standard. 640x480 is not NTSC standard and will give you problems if you burn to DVD. I am working from long-ago memories, but my recollection is that NTSC is 720x480 but still 4:3 aspect ratio because the pixel's aren't square. On the other hand, the pixels on a VGA montor are "square", so for VGA you use 640x480.

3. I use 720p resolution for playing back 480i recordings because my HDTV's native resolution is 720p. This means that everything gets rescaled to 720p by the TV set, so I only have 1 re-scale occur.

If your TV's native resolution is 1080i, then your best bet is to play back your 480i recordings at 1080i. Your TV will do the deinterlacing for you, you won't need to worry about the script and you will only have 1 round of re-scaling. I've tried this approach with my HDTV and it worked, but since my native resolution is 720p, it resulted in two rounds of re-scaling (480i -> 1080i -> 720p), and hence some loss in detail in the image.

Marc


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 17, 2006 9:20 am 
Offline
Joined: Sun Dec 04, 2005 1:44 pm
Posts: 403
Location: Central NJ
I understand now...this is a really great idea!

I originally thought you were running the script when the recording was played back. I can now see that it just needs to be run once.

One more question:

You obviously turn deinterlace OFF for 720p channels.
You obviously turn deinterlace ON for SD channels.

I'm a little confused with what this script does for your 1080i channels. In your original description, you said that you don't want to deinterlace 1080i (let your TV do it).

How come the script runs a different command for channels (above 700, but not 702 or 707)...which I assume to be your 1080i channels. Or is this section just there for future compatibility to change more options? It would seem easier to just turn deinterlace OFF for all HD (both 720p and 1080i) and ON for SD.

_________________
Currently running: R5.5, HD5000 x 2, PVR150, Athlon 64 3000+, Chaintech VNF4, 1GB RAM, 2 x 250GB in LVM, MSI NX6200TC -> AA 9A60 -> HDTV


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 18, 2006 8:32 am 
Offline
Joined: Tue Jan 18, 2005 2:07 am
Posts: 1532
Location: California
ed3120, good question. I should have been explained this in my previous posting. In my area, channels 700 and above are HD. 702 and 707 are 720p; all other HD channels are 1080i. I did some experimenting with looking at the difference between playing back my 1080i channels at 1080i vs. having mythtv deinterlace them and playing them back at 720p. My conclusion, for my setup, is that playing back 1080i recordings at 720p, deinterlaced, results in a slightly sharper image. This makes sense since my hdtv's native resolution is 720p. What I have also conclused is that my system does not have enough CPU power to do this and record from both the HD and SD tuners at the same time. So I've gone back to playing 1080i recordings at 1080i resolution, but kept the hooks in the script in case I want to try it again in the future.

My CPU is a P4-2.8ghz HT system. If I had 3.0ghz or higher, I would have enough CPU to let myth do the deinterlacing for 1080i. Alternatively, I could use the liener blend deinterlace, which uses less CPU time that kernel deinterlacing, but that results in an image that doesn't look as good as playback at 1080i.

Marc


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 5 guests


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 post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu