Author Topic: Allmost there :) - need a solution for NTSC content stuttering on 1080i 50hz TV  (Read 8621 times)

Viking

  • Addicted
  • *
  • Posts: 521
    • View Profile
Hi,

I am almost at the place that I want to be. PAL replay is smooth in LinuxMCE and in MythTV (actually Mythvideo). MythTV is updated with the avanards VDPAU update (I can really reccomend it !!)

Mythvideo plays all PAL videos really smooth - also HD content with low CPU (less than 10% on my AMD 5050 cpu). LinuxMCE plays PAL DVD and other (non HD) content smooth.


But NTSC content stutters on both :( - has anyone got an idea how to fix that ?
I would not mind letting the core recode them or whatever it takes....

Here a couple of examples - not so easy to find legal DVD's on the internet ;)

The TV Blink test DVD - http://www.tvblink.com/ - there is a selection where the skies are moving down and to the left. That is smooth on the PAL DVD, on the NTSC DVD it stutters.

The "I Am Legend" clips here play well, but Simpsons (PS3 version) not.
http://www.h264info.com/clips.html

Greetings
Viking

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
If the stuttering is genuinely from the difference in frame rate between 50 and 60Hz, then you may be stuck with it, short or re-running AV Wizard each time and changing the refresh rate of your TV (although it would be nice if LMCE allowed you to configure 2 different valid screen setups and auto switched between them based on the content :) )

Frame rate conversion is really ugly. Converting from film at 24Hz to PAL/DVB at 25Hz frame rate is not an issue - they are so close, they just don't bother, and the film replays very slightly faster. But converting from film at 24Hz to NTSC/ATSC at 29.9blahHz is too big a jump just to replay as the speed up and pitch bend is noticable. So comes the ugliness of 3:2 Pull down conversion, and I'm sure many N.A.s would be familiar with the occasional jerkiness of films played on TV from this.

There are more sophisticated methods used these days, not dissimilar to the interpolation used in some forms on deinterlacing, however they are very heavy duty and would certainly need substantial hardware acceleration. Something I am not sure whether consumer GPUs offer currently (probably the high end ones?) but its questionable whether those features are exposed through the VDPAU API at this point!!

Viking

  • Addicted
  • *
  • Posts: 521
    • View Profile
Hi collin,

thanks for your answer :)

Unfortunatly I did not have time yet to try and change to 1920x1080_60 and replay things again.

But if it helps, then one could maybe change the frequency using "xrandr --mode 1920x1080_60" /  "xrandr --mode 1920x1080_50" whenever another freq. was needed ?


Did anyone try this already ?

Greetings
Viking

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Hi,

I am almost at the place that I want to be. PAL replay is smooth in LinuxMCE and in MythTV (actually Mythvideo). MythTV is updated with the avanards VDPAU update (I can really reccomend it !!)

Mythvideo plays all PAL videos really smooth - also HD content with low CPU (less than 10% on my AMD 5050 cpu). LinuxMCE plays PAL DVD and other (non HD) content smooth.


But NTSC content stutters on both :( - has anyone got an idea how to fix that ?
I would not mind letting the core recode them or whatever it takes....

Here a couple of examples - not so easy to find legal DVD's on the internet ;)

The TV Blink test DVD - http://www.tvblink.com/ - there is a selection where the skies are moving down and to the left. That is smooth on the PAL DVD, on the NTSC DVD it stutters.

The "I Am Legend" clips here play well, but Simpsons (PS3 version) not.
http://www.h264info.com/clips.html

Greetings
Viking

I have run some tests on one of our nVidia 9300 GPU equipped MD's configured for HDMI @ 1080p here using the NTSC TVBlink test DVD and I can see any stutter when accessing the it from one of our NAS's or from a local optical drive. So my feeling is that you must have some other config/setup issues affecting your system.

All the best

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

Viking

  • Addicted
  • *
  • Posts: 521
    • View Profile
Hi Andrew,
I have run some tests on one of our nVidia 9300 GPU equipped MD's configured for HDMI @ 1080p here using the NTSC TVBlink test DVD and I can see any stutter when accessing the it from one of our NAS's or from a local optical drive. So my feeling is that you must have some other config/setup issues affecting your system.

And the part where there are some clouds on a sky that moves up (or down) and sidewards there is no stuttering on the NTSC DVD ?

So you use 1080p ? Not 1080i ?
And 50 or 60hz ?
What was the reason for gong to 1080i on MythTV ? That the TV then does the interlacing ?

Are you using 100hz TV's or ? And are any optimizations on ? What TV are you using ?

I am using an DVI to HDMI cable, but don't think it could be that.

Greetings
Viking

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Hi Andrew,
I have run some tests on one of our nVidia 9300 GPU equipped MD's configured for HDMI @ 1080p here using the NTSC TVBlink test DVD and I can see any stutter when accessing the it from one of our NAS's or from a local optical drive. So my feeling is that you must have some other config/setup issues affecting your system.

And the part where there are some clouds on a sky that moves up (or down) and sidewards there is no stuttering on the NTSC DVD ?

So you use 1080p ? Not 1080i ?
And 50 or 60hz ?
What was the reason for gong to 1080i on MythTV ? That the TV then does the interlacing ?

Are you using 100hz TV's or ? And are any optimizations on ? What TV are you using ?

I am using an DVI to HDMI cable, but don't think it could be that.

Greetings
Viking


Hi again,

Sorry to clarify ...we used 1080p over HDMI @ 60Hz (standard AVwizard config with no changes or optimisations) to an LG-42LF66 42" LCD Panel. That config was already in use on that MD. The 'Clouds' test was run and several of the others too. All seemed to be free of stutter & tearing.

DVI -> HDMI would not cause any problems.

Do you have another MD that you can use to make a comparison?

All the best

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

Viking

  • Addicted
  • *
  • Posts: 521
    • View Profile
Sorry to clarify ...we used 1080p over HDMI @ 60Hz (standard AVwizard config with no changes or optimisations) to an LG-42LF66 42" LCD Panel. That config was already in use on that MD. The 'Clouds' test was run and several of the others too. All seemed to be free of stutter & tearing.

DVI -> HDMI would not cause any problems.

Do you have another MD that you can use to make a comparison?

Sorry for not clarifying that I was using 50hz in my first post.

OK, then you should test the TVblink PAL version instead :)

I have got the PAL Version working fine on my 1080i @ 50hz - using the 1920x1080_50i definitions of the TV. It is a Sony with 100hz. Also tried 1920x1080_50 for 1080p but that was the same.

But the NTSC version did not play fluently on that config.

I don't have another MD were i can test :(


When I find time I will try 1080p 60hz and see if that is better with both the PAL and the NTSC TVblink DVD. And with MythTV VDPAU ;)

Greetings
Viking

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Sorry to clarify ...we used 1080p over HDMI @ 60Hz (standard AVwizard config with no changes or optimisations) to an LG-42LF66 42" LCD Panel. That config was already in use on that MD. The 'Clouds' test was run and several of the others too. All seemed to be free of stutter & tearing.

DVI -> HDMI would not cause any problems.

Do you have another MD that you can use to make a comparison?

Sorry for not clarifying that I was using 50hz in my first post.

OK, then you should test the TVblink PAL version instead :)

I have got the PAL Version working fine on my 1080i @ 50hz - using the 1920x1080_50i definitions of the TV. It is a Sony with 100hz. Also tried 1920x1080_50 for 1080p but that was the same.

But the NTSC version did not play fluently on that config.

I don't have another MD were i can test :(


When I find time I will try 1080p 60hz and see if that is better with both the PAL and the NTSC TVblink DVD. And with MythTV VDPAU ;)

Greetings
Viking

Hi again,

We have both PAL & NTSC version working fine here already at 1080i as per the ealier tests with the NTSC.

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Andrew - whilst I recognise that your team have tested this extensively and I haven't really done anything meaningful in the comparison-area of this... still...

if a source is only filling the screen with 50 frames per second, even if you are vsync'ing, if the display is being driven at 60 refreshes per second, at some point (either 10 times per second or 5 times per second for interlaced) there should be an instance where the source is not yet ready to fill the screen with the next frame but the display is ready to refresh and a vsync will be missed... then the source only fills the next frame leaving the previous frame "unflipped"... that should be noticeable.... there should be a regular and fast (10 or 5 Hz) slight jerkiness, mostly noticeable in fast pans.

... in theory... don't you think?

Viking

  • Addicted
  • *
  • Posts: 521
    • View Profile
Hi,

I have now done some testing using both the normal LinuxMCE Video system (I will call it xine herafter) and Mythvideo (with avanards VDPAU update on core and MD).

If the MD is setup to 1920x1080_50i (1080i 50hz) I can play PAL videos (25FPS) without any stuttering in Mythvideo and almost perfect in xine.
NTSC videos are stuttering in Mythvideo and xine at 1920x1080_50i

If the MD is setup to 1920x1080_60 (1080p 60hz) I can play NTSC videos (approx. 30FPS) without any stuttering in Mythvideo and almost perfect in xine.
PAL videos are stuttering in Mythvideo and xine at 1920x1080_60.


You can find out the FPS and resolution using this :
Code: [Select]
mkdir /tmp/test
mount -o loop TVblink_v17_NTSC.iso /tmp/test
mplayer -identify dvd://1 -dvd-device /tmp/test/ 2>/dev/null |grep VIDEO:

Will give out lines like this :
Code: [Select]
VIDEO:  MPEG2  720x480  (aspect 2)  29.970 fps  8000.0 kbps (1000.0 kbyte/s)
VIDEO:  MPEG2  720x576  (aspect 2)  25.000 fps  8000.0 kbps (1000.0 kbyte/s)

Greetings
Viking

Viking

  • Addicted
  • *
  • Posts: 521
    • View Profile

Andrew, I am not sure how it can be that you can play NTSC and PAL on a system without stuttering !?

Maybe your TV can better cope with that than mine ...


Did you change anything in Mythtv in the General page where one can setup different modes for GUI and TV playback - see attached picture.
That could be a solution, but I did not get it working. It selects oright 1080i@50hz for LiveTV, but allways 1080p@60hz for mythvideo playback of DVD's. No matter if I did setup that it should use 1920x1080@50hz for 720x576 and 1920x1080@60hz for 720x480.


btw. in Linuxmce Video (xine) I still get some tearing. In Mythvideo picture is perfect using an GF 8400GS 512MB.

And one can change the frequncy using xrandr :

Code: [Select]
xrandr -s 1920x1080 -r 60
xrandr -s 1920x1080 -r 50
If you do it using a ssh connection, add "-d 0:0" to th line.

Just an idea, that could togehter with the above mplayer detection (or some thing else) be used to setup the right frequency for the video that we will be playing...

Greetings
Viking

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology

Andrew, I am not sure how it can be that you can play NTSC and PAL on a system without stuttering !?

Maybe your TV can better cope with that than mine ...


Did you change anything in Mythtv in the General page where one can setup different modes for GUI and TV playback - see attached picture.
That could be a solution, but I did not get it working. It selects oright 1080i@50hz for LiveTV, but allways 1080p@60hz for mythvideo playback of DVD's. No matter if I did setup that it should use 1920x1080@50hz for 720x576 and 1920x1080@60hz for 720x480.


btw. in Linuxmce Video (xine) I still get some tearing. In Mythvideo picture is perfect using an GF 8400GS 512MB.

And one can change the frequncy using xrandr :

Code: [Select]
xrandr -s 1920x1080 -r 60
xrandr -s 1920x1080 -r 50
If you do it using a ssh connection, add "-d 0:0" to th line.

Just an idea, that could togehter with the above mplayer detection (or some thing else) be used to setup the right frequency for the video that we will be playing...

Greetings
Viking

Hmmm...maybe the LG TV's are doing something very clever...all our test suite screens are LG. I will have one of my co-workers do some tests on his Bravia TV and see if we see what your seeing. Will report back here asap when he's done the tests.

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

Viking

  • Addicted
  • *
  • Posts: 521
    • View Profile
Hi Andrew,

any news on this ?

Viking