INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Calculated time for PAL films  (Read 1565 times)

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Calculated time for PAL films
« on: April 13, 2013, 05:22:42 pm »

I have a number of PAL films in my collection, but I use Video Clock to play them back at the original 24fps framerate. (well, 24/1.001 as Windows 8 doesn't seem to like switching to 24Hz)

When Video Clock is enabled, would it be possible to have Media Center display the correct playback time based on your selection in Video > Display Settings > PAL?

I am currently using this code to at least display the correct duration in the library:
Code: [Select]
if(!isequal([FPS],25),[Duration],formatduration(math([Duration,0]*(25/23.97602397602398)),0))(I would have used 25/(24/1.001), but it doesn't seem to work)

but the progress bar still shows the original times when actually playing the film, so it's off by four or five minutes in most cases. The worst example I have is 2:46:54 displayed as 2:40:04
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Calculated time for PAL films
« Reply #1 on: April 15, 2013, 12:52:56 pm »

(I would have used 25/(24/1.001), but it doesn't seem to work)

Doesn't work, or is inaccurate?  See attached.
Logged
The opinions I express represent my own folly.

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Calculated time for PAL films
« Reply #2 on: April 15, 2013, 03:09:55 pm »

I was using:

math(25/(24/1.001))

Which wasn't working. It needs to be 25 ÷ (24/1.001) and not (25÷24)÷1.001, which is what math(25 / 24 / 1.001) does.

But reformatting it as
Code: [Select]
if(!isequal([FPS],25),[Duration],formatduration(math([Duration,0]*(1.001 / 24 * 25)),0))
Works as intended. Though when you're only displaying it as hh:mm:ss, just using 25/23.97602397602398 was probably sufficient.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Calculated time for PAL films
« Reply #3 on: April 15, 2013, 04:23:02 pm »

Place spaces around the / and the (, as otherwise MC gets confused that /( is not an escaped paren - hence the divide gets eaten).
Logged
The opinions I express represent my own folly.

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Calculated time for PAL films
« Reply #4 on: April 15, 2013, 04:45:17 pm »

Place spaces around the / and the (, as otherwise MC gets confused that /( is not an escaped paren - hence the divide gets eaten).
Oh, of course. Thanks.

Still, this only displays the correct times in the library, it would be nice if the progress bar could automatically be corrected based on the speed the file is being played back at using Video Clock, rather than the file itself.
Logged
Pages: [1]   Go Up