Jump to content

Video frame rate switcher


SnoopyDog

Recommended Posts

Here is a simple plugin that automatically switches the video frame rate on a DVBViewer playstate change event, required by the video source material that you are watching.

This plugin does NOT work with the Custom VMR9 renderer under Windows XP in D3D exclusive mode. This is a limitation given by Microsoft and neither Lars nor me have a workaround for this. With Windows 7 and the custom renderer, everything works fine.

Installation: Just unzip the attached file and copy the subdirectory "plugins" to the DVBViewer "plugins" directory (DVBViewer needs to be shutdown first).
If you encounter problems with this plugin, discontiue using it until the problem gets fixed!

Configuration options:

You will find the settings in the DVBViewer "Options" dialog => "Display frequencies".

Basically, you can assign a "profile" to a video frame rate. The video frame rate is reported by DVBViewer after the playback of a video stream has started. In the left box which is labeled with "Frequency to profile mapping", you can assign a requested refresh rate (source) to a profile. In the right box which is labeled with "Profile contents", you can assign the desired refresh rate for this profile. For example, if your graphics card has no problems with 25Hz i material played back at a frame rate of 50Hz p, you should use the same profile for 25 Hertz and 50 Hertz. Unnecessary profile switches may look ugly. Just select (e.g.) "Profile 3" for 25 Hertz and 50 Hertz on the left side and enter "50 Hertz" for "Profile 3" on the right side of the dialog.

The plugin solely uses the Windows API for switching the display frequency. This should work for all graphics cards.

Important for ATI cards when you use the Windows API:
Some combinations of drivers, cards and OS have a broken Windows API: they return a multiple of 60Hz for all available resolutions (e.g. 5 times 60Hz for 1920x1080). I added a workaround for this: just add the line
FrequencyOverride=24,50,60
in the [Global] section of DVBFreqControl.ini, then the frequencies 24Hz, 50Hz, 60Hz are available for selection - regardless what kind of crap the ATI driver reports. In the "New" driver, you can enter this tweak also in the settings dialog.

Annotation for tweak setting "Rebuild graph": If you use Windows XP with the overlay renderer, this setting can be switched off, if you have no problems. Under Windows 7 (Custom EVR renderer is required with this OS), this setting must be switched always ON!

 

Update 12.11.2015:

  • Removed unneccessary profile definitions.You can directly assign actual frequency values to set values now. An old configuration is converted to the new settings structure.
  • Changed system base => new structure of configuration file. Old configuration is converted.
  • Suppressed unneccessary frequency switch when changing from video playback to audio playback and visualization is active.
  • Changed initialization / shutdown code sequence.
  • Some changes due to new DVBViewer version.

 

Update 31.05.2014:

  • Pending suppressed frequency switches that may occur while DVBViewer is not in full screen are performed now after the software is switched to full screen.

 

Update 29.04.2014:

  • New option to allow switching only when DVBViewer is in full screen mode. Default is off.

 

Update 29.03.2014:

  • New comboboxes were not filled properly with values.

 

Update 15.03.2014:

  • Added source refresh rates 29 Hertz and 120 Hertz
  • Added an eighth profile for destination frequency mapping
  • Removed the option "Treat 23.99 Hertz as 24 Hertz". Source refresh rate is now always calculated as Trunc(freq+0.01) => 23.99 Hz will be treated as 24 Hz, 23.98 Hz and below as 23 Hz. The same for 29 Hz values.
  • Added an option to suppress frequency switching in HbbTV mode when start playing back a video. A frequency switch with a rebuild graph will kill the HbbTV engine.
  • Changed default values: Delay before switch: 500 ms / Rebuild graph after switch: false. With newer operating systems and hardware, a rebuild graph is not neccessary anymore. A too short delay before switching the frequency may corrupt underlaying software parts (e.g. Reclock, video renderer)

DVBFreqControl_15_11_12.zip

Edited by SnoopyDog
Link to comment
  • Replies 167
  • Created
  • Last Reply

Top Posters In This Topic

  • SnoopyDog

    34

  • popy

    15

  • udo83

    13

  • sw4y

    12

Top Posters In This Topic

Posted Images

I've released an update. Frequency values reported by DVBViewer are rounded now. 23.976Hz ==> 24Hz

 

Edit: this is not true anymore ;) 23.976Hz is treated as 23 Hz now.

Edited by SnoopyDog
Link to comment

Thank you - good work - exactly the tool i was looking for :(

 

I use it with DisplayChanger from "12noon" on my HTPC (NVidia 9600GT -> Plasma TV) - works flawlessly with NTSC/PAL DVD's.

 

Detection failed when using external splitter for avi+wmv media files. Resolution and refresh rate are displayed correctly in DVBViewer (V4.0) status line.

 

Maybe a "glitch" in the COM-Interface ?

Link to comment

Excellent!

 

Just what I needed!

They have the same plugin in MediaPortal.

 

So as I understood, this plugin changes the refreshrate by the video that is selected to play?

 

When I'll use this for video files, avis and mkvs, and DVBViewer_switch for Blu-Ray, I should hae always the correct refreshrate.

 

And that's what have been looking for!

I'll try it as soon I get home.

 

Thanks! :angry:

Link to comment

Hi kgw210! Please start a movie where the frequency switch failed, open the configuration page of my plugin an double click on the lower part of the window (in an area which has nearly the same height as the "OK" and "Cancel" buttons. A simple debug screen appears. What do you see beside the text "#TV.video.framerate" ? Is it empty or does it contain a comma for a decimal separator? If the value is empty, you need to wait for the next DVBViewer release. If you see a value with a comma (e.g. "23,976"), please try my update that i uploaded some minutes before.

 

Thanks byfly :bye:

Edited by SnoopyDog
Link to comment
  • 2 weeks later...

Update:

 

Just tested with 4.0.1.1ß - "#TV.video.framerate" field is not empty anymore :)

Shown frequencies are same as status line in DVBViewer with decimal dot.

 

Plugin is working as expected - Great Job - Thanks again :ermm:

Link to comment

Hi ;) Thank you for the response! Yes, Lars fixed this.

 

I provided an update, where "RebuildGraph=1" works now. Maybe tomorrow, i will provide another update where you can switch on/off "Rebuild graph" in the settings GUI

Link to comment
  • 2 months later...

First once thanks for the perfect Plugin, but I must repeat RebuildGraph, since Deinterlacing does not work otherwise..

Is there anyway to build in RebuildGraph after 2 or 3 seconds? :D

Edited by Tüftler
Link to comment

Should be no problem :D

Link to comment
  • 3 weeks later...

@SnoopyDog, first at all thanks for your great plugin. Knew it for a while, but did not come to use until now. Always switched frequencies by hand till that point.

Tried your plugin and everything works as it should, except the known issues.

 

When I start a movie, where the DVBViewer statusbar shows me an aspect ratio and framerate, everything is fine and the plugin switches the frequencies/profiles.

But I recognized, that the plugin does not do anything, when the statusbar does not show an aspect ratio. Framerate can be shown, but the plugin does not change.

The debugwindows shows me a wrong framerate in those cases.

When I set the option "empty frequency value" to the value I need in those cases (mostly 24HZ), everything works as it should.

 

So I guess it is the same problem you solved here

 

Update:

 

Just tested with 4.0.1.1ß - "#TV.video.framerate" field is not empty anymore ;)

Shown frequencies are same as status line in DVBViewer with decimal dot.

 

Plugin is working as expected - Great Job - Thanks again :D

 

I'm using DVBViewer version 4.0

 

The other issue was already described by Tüftler, would be great if you add an option, to manually set the time after which the plugin does a rebuild of the graph, cause I got glitches in the deinterlacing too, if I don't do a graphrebuild on my own.

I'm using an ATI HD4550, same as Tüftler does, so it's maybe a card-problem.

 

Maybe you can fix this, or enable the option I mentioned above.

 

So, big thanks again for your work, it really helps to make things easier!

 

sw4y

Link to comment

Sorry 4 ma longer inconvenience here :D

 

Forgot 2 mention: There is already an option in the ini file:

[Global]

...

DelayAfterSwitch=0

...

 

This is a delay in miliseconds which takes effect after a profile change (frequency change) happened and before the "Rebuild Graph" is triggered.

 

Have 2 make this available in the user interface...

 

Edit: Uuups, shouldn't use ma SMS style writing. ;)

Edited by SnoopyDog
Link to comment
Forgot 2 mention: There is already an option in the ini file:

[Global]

...

DelayAfterSwitch=0

...

 

This is a delay in miliseconds which takes effect after a profile change (frequency change) happened and before the "Rebuild Graph" is triggered.

 

Have 2 make this available in the user interface...

 

Hey, thanks for your reply. As far as I am concerned, you don't have to add it to the gui. I'm right happy when I can change the settings in the ini file.

Will try this tomorrow.

Link to comment
Hallo SnoopyDog,

where can I find the GUI, specifically the ini.

Usermode.ini or what else?

 

Hey, I'm using Vista but maybe you can find the specific files on your own.

 

In Vista it's C:\Programdata\MR-Soft\... (programdata is hidden), think it's programfiles in XP.

There you'll find that mentioned ini file (I think it's just one in there).

 

For the GUI simply put the downloaded .dll in the DVBViewer's plugin folder. You'll get a new entry under the plugins-button in the statusbar.

 

Hope that helps,

 

sw4y

Link to comment

The plugin itself is working, but there is no setting for DelayAfterSwitch in this!

 

I've only found the NetStreaming.ini and the PostProcessor.ini in the Plugin folder. This is my problem!

I've no idea where I can set the change.

 

Sorry for my incompetence. :D

Link to comment

No problem :D

 

Vista: C:\ProgramData\MR-Soft\DVBViewer\DVBFreqControl.ini

XP(ger): C:\Dokumente und Einstellungen\All Users\Anwendungsdaten\MR-Soft\DVBViewer\DVBFreqControl.ini

 

Sorry, don't know the exact translations for other language OS.

Link to comment

Hey,

 

just tried the new settings (delayafterswitch, rebuildgraph) but they seem not to work for me :D

 

When I got it right, delayafterswitch means the delay between switching the frequency and rebuilding the graph right?

For testing I set it to 5000ms to secure the rebuild did not take place while the screen was black cause of the frequencychange.

 

So I started a video, the plugin recognized the frequency correctly and changed the profile. But no rebuildgraph after 5 seconds.

Then I changed the value of rebuildgraph in the ini-file from 0 to 1 and tried again.

Nothing happened, but I was'nt able to open the GUI anymore, strange behaviour.

 

Just wanted to know if it's a bug or if it happens on my system only.

If it happens for me only, I will give you more info about my system, maybe you can find out why the plugin does not work "correctly".

 

Nevertheless, great work snoopydog!

Link to comment

Will check this :D

Link to comment

Thanx for the plugin.

 

Could you help me with the 12noon display changer please? What do I have to put in "external application name" and the profile contents in detail?

 

Card is a Geforce 9400.

 

Thanx!

Link to comment

@SnoopyDog

 

The change in "DelayAfterSwitch=0" to 5000 did not work like "Wiedergabegraph Neu Aufbauen" because deinterlacing failings also, by using the Plugin. And the ms-time to RebuildGraph in every change is identical! :)

By using manualy it works perfect!

Bug?

 

Why the DVBFreqControl.ini will not be stored in configuration folder by the plugins like Netstream.ini?

Link to comment
  • 1 month later...

Hi,

 

it all used to work, until I have installed Catalyst 9.5, where I cannot switch any refresh rate in the CCC anymore. I can select another refreshrate, but nothing happens. I can switch refresh rate using the Windows XP graphiccard property under "Monitor", but not in the CCC anymore. Anybody have the same problem?

Link to comment
  • 2 weeks later...

Hey SnoopyDog, I just wanted to know if you're still working on the plugin, especially the the "delay after switch" & "rebuildgraph" function?

Except these things everything works fine, so these would be the top of the mountain.

I really appreciate the work you are doing, because it makes a lot a little easier.

Thanks so far & have a nice weekend!

Link to comment
  • 10 months later...

Warning: this plugin does NOT work with the new Custom VMR9 renderer under Windows XP in D3D exclusive mode. This is a limitation given by Microsoft and neither Lars nor me have a workaround for this atm. I will make some tests with Windows 7 the next days...

Link to comment
  • 1 month later...

I have a problem under Windows XP using overlay mode: when I swith from 50Hz to 60Hz for example, the resolution of my HD video is looking weird, as if only every second line in the video was rendered. You can see it clearly when there are heavy contrasts, for example if you have TV-logos displayed in the picture. Since I cannot take a screenshot in Overlay mode, I have tried to make a photo:

 

distoredlogo9dfh.jpg

 

When I start that video again (i.e. the fequency is already set), the logo looks fine and smooth, but whenever a frequency switch occurs, and I am watching HD content, I get this effect on my Ati Radeon 3200 chipset.

 

Is there any way to fix this? Do you have the same problem? I noticed this only happens in overlay mode, which is the one I prefer for other reasons :(

Link to comment

:-( maybe Lars and SnoopyDog will find a workaround!

 

My gpu is a ATI 2400HD with Catalyst 10.5, currently on system default (overlay renderer).

 

Is this gpu not strong enough? My resolution is 1920x1080 (FullHD) @ 50 Hz or 24 Hz

 

Thx

pOpY

Link to comment

Does anybody have a hint for the distorted HD image after a framerateswitch? It really drives me mad, I wonder if I am the only one where this happens :(

Link to comment

Hi Tüftler,

 

I have checked the settings, they are absolutely the same. It doesn't seem to be a problem related to this plugin, but happens also when I switch the frequency manually while a video is running. Seems to be a problem with all version of ATI Catalyst so far, I simply wonder why noone else has found that yet.

 

Here ist what I do, can anybody with an ATI onboard GPU (don't know if it happens with their dedicated cards as well) try to reproduce?

- Use Overlay mode, WinXP (doesn't happen in VMR, don't know about Win 7)

- Watch TV normally (SD or HD doesn't matter), 50Hz

- select a MKV containing 720p or 1080p video, preferably with a TV logo so you can easily see the distortion, and running at 24p or 60p, so that a frequency switch is required

 

When I do this, the TV logo gets clearly distorted. When I restart the file (or another one), i.e. there is no need for another frequency switch, the video content looks just fine!

 

Just a repost, this is an example what it looks like after the first switch:

distoredlogo9dfh.jpg

Edited by Jackie78
Link to comment

Have you activated "Smooth Video Playback" in CCC?

If the onboard-gpu is overload deinterlacing or other functions where automatically deactivated.

In my case (HD4550) the Video Framerate Switcher works perfect.

Link to comment

Have you activated "Smooth Video Playback" in CCC?

If the onboard-gpu is overload deinterlacing or other functions where automatically deactivated.

In my case (HD4550) the Video Framerate Switcher works perfect.

 

No, I haven't activated that, should I?

 

But I have installed an ATI HD5670, and exactly the same that I described happens with this card too :(

Link to comment

Try the Option Tüftler has posted above. In my case the movie was playing after switching but with no picture, just sound. The Option DelayAfter Rebuilds the graph after specified time in ms. in my case i have set it to 2500.

 

to my problem with the (Custom) VMR9 and tearing. Now i have bougth a 4650 passive cooled graphiccard with the same result.

Just with one difference: the tearing effect is on the bottom of the picture :-(

 

What could i do that (Custom) VMR9 is working without this tearing problems?

 

I have a core2duo E8400 @ 2,8Ghz.

 

cu

pOpY

Link to comment
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...