NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 16 17 18 19 20 … 93 Next »
Frame rate

 
  • 0 Vote(s) - 0 Average
Frame rate
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#1
2011-03-06, 04:28 PM
I was just wondering what is or isn't possible (or might be possible in the future) with NPVR with regards to it being able to detect the frame rate of whatever's playing.

Is it, for example, capable of knowing that an NTSC DVD might be playing video at 30fps when displaying the menu or some extra content, and then realising that it's changed to 23.976fps when the main movie is playing.

If it is, then I'd be interested in making a plugin that could be used to dynamically change the display frequency to match the content frequency (just like a "real" DVD or blu-ray player), but it would obviously need some feedback from NPVR for this to be possible (eg event messages) or perhaps a way of hooking into the active DirectShow graph if that's where the information comes from (note: I currently know zip about DirectShow programming Rolleyes)

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,686
Threads: 767
Joined: Nov 2003
#2
2011-03-06, 04:44 PM
Sorry, but NPVR doesnt have any idea of the frame rate, so couldnt give you this info.
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#3
2011-03-07, 08:54 AM
Bummer.

Would you be interested in adding finding out if it's possible to your massive list of things to do (at a low priority)?

I obviously don't know for sure, but reading around and browsing msdn suggests it might not be too hard to get the information. I've seen one article talking about a ConnectionMediaType pin that returns an AM_MEDIA_TYPE struct that ultimately gives you a VIDEOINFOHEADER (http://msdn.microsoft.com/en-us/library/...85%29.aspx) and that can return the average display time per frame (which could be used to determine the fps).

In fact, maybe the information is already there. I had the above typed out but not submitted, and after more searching I've found that looking at the video decoder properties in a few files dropped into graphstudio shows the following AvgTimePerFrame values in the Video Output tab:

PAL DVD: 400000
24p mkv from my digicam: 417083

MSDN says the values are the average display time in 100-nanosecond units. Doing the sums for the above gives 25 for the first case and 23.976 for the second, exactly the numbers we'd want to know. Unfortunately I don't have anything NTSC based to test at the moment, but hopefully it works with that too.

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,686
Threads: 767
Joined: Nov 2003
#4
2011-03-07, 04:42 PM
imilne Wrote:Would you be interested in adding finding out if it's possible to your massive list of things to do (at a low priority)?
All I can give you is a 'maybe in a future build'.

Quote:I obviously don't know for sure, but reading around and browsing msdn suggests it might not be too hard to get the information. I've seen one article talking about a ConnectionMediaType pin that returns an AM_MEDIA_TYPE struct that ultimately gives you a VIDEOINFOHEADER (http://msdn.microsoft.com/en-us/library/...85%29.aspx) and that can return the average display time per frame (which could be used to determine the fps).
Unfortunately this is not true with live tv or .ts playback, where the AM_MEDIA_TYPE on the pins just report the hardcoded (and usually incorrect) frame rate and resolution values I set when I create the pins. They do not reflect the real values of the stream or file that is about to be played.
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#5
2011-03-07, 05:26 PM
sub Wrote:All I can give you is a 'maybe in a future build'.
That's more than good enough for now, thanks Smile

sub Wrote:Unfortunately this is not true with live tv or .ts playback, where the AM_MEDIA_TYPE on the pins just report the hardcoded (and usually incorrect) frame rate and resolution values I set when I create the pins. They do not reflect the real values of the stream or file that is about to be played.
That's ok; I don't think it matters as the frame rate/refresh rate for Live TV will always be known (eg, always 25fps/50Hz for those of us in PAL land).

Iain
Lao Pan
Offline

Posting Freak

UK (Mendip TX)
Posts: 1,300
Threads: 114
Joined: Oct 2008
#6
2011-03-09, 01:28 PM
Is there any way to get the display rate changed on entering a folder from Videos? I use display changer to change to 60Hz when starting TMT3 as a custom task for Blu-Ray playback (It worked well in GBPVR but causes a few problems with black screens on returning to 50Hz in NPVR)
All my 720p & 1080p are at 23.97 fps and kept together in the same folders - I like my films to run at the original speed they were made at - with correct sound. Running at 60Hz stops most of the 24fps / 50Hz judder.
It's not an overly complicated system - it's more - overly simple operatives  Huh
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,686
Threads: 767
Joined: Nov 2003
#7
2011-03-09, 03:42 PM
No, there is nothing built in that would do that. It's unlikely to be something that I'd add. Sorry.
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#8
2011-03-09, 09:39 PM
If sub can add support for notification of frame rate, and if I can put together plugin that can react to it, and if it's possible to change the refresh dynamically while video is already playing without it screwing up*, then you'd be able to play back your 23.976Hz content at whatever rate you've told the plugin you want to use. A lot of "if's" though Rolleyes

* I'm hoping EVR will be happy enough with this: it seems to be with TMT anyway. VMR9 FSE (with XP) would just choke and die if you tried it.
Lao Pan
Offline

Posting Freak

UK (Mendip TX)
Posts: 1,300
Threads: 114
Joined: Oct 2008
#9
2011-03-10, 10:50 AM
You've got your self one "potential customer"
Till then I guess I will have to keep using my mapped 60Hz + 50Hz buttons from the remote - no way to run a command / bat on opening a folder?

Maybe I could use "Videos" to point to a folder of shortcuts? Have to try this weekend.
It's not an overly complicated system - it's more - overly simple operatives  Huh
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#10
2011-03-25, 05:12 PM
Just thinking sub... with the BUILDING_GRAPH event that exists now, I might actually already have everything I need from you to do this?

That event is posted before any graph is created, along with the filename, so if I could knock out some code that queries the file (would it have to build a graph itself?) to get the framerate (if it exists), then I could force a refresh rate change before any actual NPVR playback begins.

Of course, I've never actually written a line of code related to video playback/graphs/directshow/etc but there must be a ton of documentation on how to do it. Can you do it in c#?

Hmm.......
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Refresh Rate imilne 3 1,829 2011-09-04, 06:08 PM
Last Post: sub
  Determining the comskip rate. pastro 2 1,577 2007-10-07, 08:05 PM
Last Post: pastro
  Grabbing live TV video frame Snarky 1 1,354 2007-05-12, 05:30 AM
Last Post: sub
  MPEG2 Frame Capture reven 8 3,266 2005-12-08, 01:22 AM
Last Post: reven
  Looking for utility to save a frame as a jpeg Peter K 0 1,155 2005-01-12, 10:25 PM
Last Post: Peter K

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode