Author Topic: Setting right refresh rate for media playback = judderfree playback  (Read 10948 times)

Viking

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

I have a request. It is already now possible to do this in 0810 using MythTV video plugin for playback of video content (see links below). But it would be realy nice if LiunxMCE could do this when playing media.

I am pretty sure that all of you have some kind of juddering (or stuttering) when playing media that is 23.97Hz (Hz is also frames per second) or 59.94Hz (NTSC) or 50Hz (PAL). Try all of them and you will see that in camera pan where the movie is moving sidewards.

If you have setup 24Hz and the movie is 23.97hz, then only every 100 picture will stop for a splitsecond. So you will have to have a pan in the movie of more than 4 seconds !!
At other rates the juddering might be higher! But I know for some it is REALLY difficult to see it. It is probably easier in the dark.

Here you can download some trailers to test with http://www.h264info.com/clips.html

The first "I Am Legend – 1080p Trailer" is ok for testing  - take it to 0:49 seconds and watch the top of the TV, you will see that it judders just a little when the movies pans up in the city or in the gras a little later.
If you setup xorg.conf as descried in the mythtv.org link, you can setup 23.97 hz with "xrandr -d 0:0 -r 53" (can be done though ssh) then play it again and you will see that it is really smooth :-) change back to 50hz with "xrandr -d 0:0 -r 50" or 60hz with "xrandr -d 0:0 -r 51". You can pause the clip and then rewind and change forth and back. I am sure you will then see the difference.



More infos how it is setup in MythTV you can see here (important is changing Option "DynamicTwinView" to "true" !!! ) :
http://www.mythtv.org/wiki/User_Manual:JudderFree

My xorg.conf for 0810 is here :
http://wiki.linuxmce.org/index.php/Sony_KDL-46W4500

At the moment I have really nice judderfree playback of 23.97Hz materiel and LiveTV using the above setup :-)
Only PAL 60Hz is not working (yet) but I might find the solution.


I suppose it should not be so difficult to test the materiel and use "xrandr - r 51" or whatever to change the rates. The biggest problem will probably be to change the AV wizard to support the setup of xorg.conf for this. Here I mean testing if all the modes are working.

Regards Viking
« Last Edit: July 10, 2012, 12:25:22 pm by Viking »

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Setting right refresh rate for media playback = judderfree playback
« Reply #1 on: July 10, 2012, 01:00:37 pm »
Do you know of an easy way to detect the frame rate of a specific file?

Viking

  • Addicted
  • *
  • Posts: 521
    • View Profile
Re: Setting right refresh rate for media playback = judderfree playback
« Reply #2 on: July 10, 2012, 01:12:10 pm »
Hmm, not at the computer at the moment ;-) but I know that mplayer has offen been used in scripts.

What do we need?
Maybe I can find out something...

Thanks for looking at it :-)

Regards Viking

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: Setting right refresh rate for media playback = judderfree playback
« Reply #3 on: July 10, 2012, 03:17:54 pm »
Do you know of an easy way to detect the frame rate of a specific file?

Mediainfo.  # apt-get install mediainfo

DESCRIPTION
       MediaInfo supplies technical and tag information about a video or audio
       file

       What information can I get from MediaInfo?

       - General: title, author, director, album, track number, date, duration...
       - Video: codec, aspect, fps, bitrate...
       - Audio: codec, sample rate, channels, language, bitrate...
       - Text: language of subtitle
       - Chapters: number of chapters, list of chapters

       What format does MediaInfo support?

       - Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1, MPEG-2, MPEG-4, DVD (VOB)...
       - Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...
       - Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
       - Subtitles: SRT, SSA, ASS, SAMI...

       What can I do with it?

       - Read many video and audio file formats
       - View information in different formats (text, sheet, tree, HTML...)
       - Customise these viewing formats
       - Export information as text, CSV, HTML...
       - Graphical Interface, Command Line, or library versions available

EXAMPLES
   Display information about a video file
        $ mediainfo foo.mkv

   Display aspect ratio
        $ mediainfo --Inform="Video;%DisplayAspectRatio%" foo.mkv
        $ mediainfo --Inform="Video;file://Video.txt" foo.mkv

       Both forms are equivalent if Video.txt contains:
        %DisplayAspectRatio%

   Display aspect ration and audio format
        $ mediainfo --Inform="file://Text.txt foo.mkv

       If Text.txt contains:

       - "Video;%DisplayAspectRatio%"
           Then the display aspect ratio is printed out.

       - "Audio;%Format%"
           Then the audio format is printed out.

HTH!

/Mike

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Setting right refresh rate for media playback = judderfree playback
« Reply #4 on: July 10, 2012, 03:28:14 pm »
It is more about providing a lib that we can use directly. UpdateMedia and/or media plugin must be changed to get the information.

Viking

  • Addicted
  • *
  • Posts: 521
    • View Profile
Re: Setting right refresh rate for media playback = judderfree playback
« Reply #5 on: July 10, 2012, 05:56:25 pm »
Here is also a libmediainfo0 :
http://mediainfo.sourceforge.net/en/Download/Ubuntu

Would that be it ?

That would be a killer feature :-) Thanks again for looking into it.
Will it be possible also in 0810 ?

Viking
« Last Edit: July 10, 2012, 06:11:32 pm by Viking »

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Setting right refresh rate for media playback = judderfree playback
« Reply #6 on: July 10, 2012, 07:20:42 pm »
810 will not get any new features.

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Setting right refresh rate for media playback = judderfree playback
« Reply #7 on: July 10, 2012, 07:22:42 pm »
And regarding a great feature: Setting the refresh rate to the same rate as the media is helpful for judderfree playback, but it is not the only thing needed. In essence: It is not possible to get perfect playback atm. But setting the refresh rate is something that helps a lot, especially when people are judder detectors.
* posde always thinks the judder is on purpose :D

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Setting right refresh rate for media playback = judderfree playback
« Reply #8 on: July 11, 2012, 06:43:27 pm »
We won't get judder free playback until we can move either to Wayland or a straight framebuffer.

-Thom

Viking

  • Addicted
  • *
  • Posts: 521
    • View Profile
Re: Setting right refresh rate for media playback = judderfree playback
« Reply #9 on: July 11, 2012, 08:35:35 pm »
Hmm, might be that the theory does not allow 100% judderfree!? I don't know.

But I have tested a lot on my 0810 with Mythvideo plugin and when it is allowed with this config :
http://www.mythtv.org/wiki/User_Manual:JudderFree

I have also activated both vsync options in nvidia-settings for a long time. And have the feeling it is REALLY judderfree. At least I am pretty feely with that and when playing 23.97 on 24hz I saw "jumps" on some pan's when they were long. Now with the above config I have not noticed anything yet. But it has only been running for a couple of days ;-)
I would say it is really important to implement it as when testing replay with the normal playback of xine and changing the rates I notoced a big difference!

Try it yourself with the above config or my xorg.conf from here (might work) but notice: it is important is changing Option "DynamicTwinView" to "true" !!!
http://wiki.linuxmce.org/index.php/Sony_KDL-46W4500

Regards Viking

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Setting right refresh rate for media playback = judderfree playback
« Reply #10 on: July 11, 2012, 11:20:13 pm »
Viking,

I think having the ability to playback media at the original rate is something that a media playback solution should allow. Open a feature ticket in trac, leave information in it (detailed, but dense, and no links).

thanks.