INTERACT FORUM
More => Old Versions => JRiver Media Center 20 for Windows => Topic started by: miketl 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
-
It's probably in ms.
-
Nope. Mine are in seconds...
<?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...
-
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
-
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.
-
I get values like this:
<Field Name="Duration">271.2266667000000098</Field>
That's a number of seconds as a decimal (for maximum precision).
-
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.
-
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".