INTERACT FORUM

Please login or register.

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

Author Topic: File play duration in MCWS  (Read 1681 times)

miketl

  • Guest
File play duration in MCWS
« on: January 28, 2015, 11:28:09 pm »

Using the http command http://%localhost%:52199/MCWS/v1/Playback/Playlist?action=MPL&Zone=-1 to get the MPL. I would like to know what is the field <Field Name="Duration"> because if it supposed to show the file play time in seconds then this number does not reflect the real play time of the files.


Thanks
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: File play duration in MCWS
« Reply #1 on: January 28, 2015, 11:39:42 pm »

It's probably in ms.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: File play duration in MCWS
« Reply #2 on: January 28, 2015, 11:48:32 pm »

Nope.  Mine are in seconds...

Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<MPL Version="2.0" Title="MCWS - Files - 8952">
<Item>
<Field Name="Key">16999968</Field>
<Field Name="Filename">M:\Recordings\NOVA-S40E08-RiseoftheDrones-24801539-0.ts</Field>
<Field Name="Name">Rise of the Drones</Field>
<Field Name="File Type">ts</Field>
<Field Name="Genre">Documentary</Field>
<Field Name="Date">41297</Field>
<Field Name="Bitrate">5738</Field>
<Field Name="Image File">NOVA-S40E08-RiseoftheDrones-24801539-0.jpg</Field>
<Field Name="Media Type">Video</Field>
<Field Name="File Size">2582363544</Field>
<Field Name="Duration">3599</Field>
<Field Name="Date Created">1420797599</Field>
<SNIP>
</Item>
<Item>
<Field Name="Key">16710944</Field>
<Field Name="Filename">M:\Recordings\NOVA-S41E21-EmperorsGhostArmy-24061120-0.ts</Field>
<Field Name="Name">Emperor’s Ghost Army</Field>
<Field Name="File Type">ts</Field>
<Field Name="Genre">Documentary</Field>
<Field Name="Date">41955</Field>
<Field Name="Bitrate">5847</Field>
<Field Name="Image File">NOVA-S41E21-EmperorsGhostArmy-24061120-0.jpg</Field>
<Field Name="Media Type">Video</Field>
<Field Name="File Size">2623475188</Field>
<Field Name="Duration">3589</Field>
<Field Name="Date Created">1415843999</Field>

Rise of the Drones duration: 59:59 minutes in MC (3599 / 60 = 59.98333...)
Emporer's Ghost Army duration: 59:49 minutes in MC (3589 / 60 = 59.816666...)
etc...
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

miketl

  • Guest
Re: File play duration in MCWS
« Reply #3 on: January 29, 2015, 12:11:27 am »

Could you try a music FLAC file and not a video file. Because in every music file that I try if I divide the duration by 60 it is never the play time of the file files.

Thanks
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: File play duration in MCWS
« Reply #4 on: January 29, 2015, 12:25:18 am »

Yep. Something is funky with FLAC files in particular.

I tested with MP3s and the value provided is an integer value of the file's duration in seconds, as described above.  I tested with a FLAC file though, and I get a floating point value that has no easy-to-discern relationship to the file's playback duration.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42389
  • Shoes gone again!
Re: File play duration in MCWS
« Reply #5 on: January 29, 2015, 10:35:14 am »

I get values like this:
<Field Name="Duration">271.2266667000000098</Field>

That's a number of seconds as a decimal (for maximum precision).
Logged
Matt Ashland, JRiver Media Center

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42389
  • Shoes gone again!
Re: File play duration in MCWS
« Reply #6 on: January 29, 2015, 12:17:34 pm »

Thats okay that the number is very precise but divide this number by 60 and compare it to the flac file actual length and it is never the same.

It works out perfectly for me.
Logged
Matt Ashland, JRiver Media Center

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: File play duration in MCWS
« Reply #7 on: January 29, 2015, 08:33:24 pm »

Hmmmm...  Now I can't confirm it, and even looking at the playlist I made last night as a test, they do seem to match.  I think I must have failed at math or something.

Sorry.  Here's an example I just made: http://glynor.com/files/jriver/Playlist-Today.mpl

Here's the track listing for that album: http://www.allmusic.com/album/syro-mw0002727829

At least the handful I checked today all are roughly accurate.  I didn't do the decimal conversion to confirm the remaining seconds, but it is close enough to call it "almost certainly right".
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/
Pages: [1]   Go Up