Author Topic: Media File Size/Duration  (Read 3972 times)

lon22

  • Veteran
  • ***
  • Posts: 85
    • View Profile
Media File Size/Duration
« on: April 05, 2008, 09:47:14 pm »
Does anyone know if there is a field somewhere in a LMCE table that has the duration of a related media file? Basiclly a field that says media X is xx:xx:xx in duration.

I didn't see ay field as such in pluto_media.

thanks

lon22

royw

  • Guru
  • ****
  • Posts: 261
    • View Profile
Re: Media File Size/Duration
« Reply #1 on: April 06, 2008, 03:06:09 am »
PlutoMedia.PlaylistEntry.Duration is probably not what you are looking for.

I'd guess the attribute "Run Time".

>> PlutoMedia::AttributeType.find(:all).collect{|c| [c.id, c.Description]}.uniq.each {|a| puts a.join(' ')}
1 Director
2 Performer
3 Album
5 Track
6 ASIN
7 CDDB
8 Genre
9 Ref #
10 Channel
11 Episode
12 Program
13 Title
14 Disc ID
15 Conductor
16 Composer/Writer
17 Studio
18 Rating
19 Release Date
20 Website
21 Chapter
22 Encoding
23 Format
24 Aspect Ratio(s)
25 Audio Encoding
26 Rated
27 DVD Release Date
28 Run Time
29 Keyword
30 Screen Saver For MD
31 Format
32 Region
33 Language
34 Aspect Ratio
35 Number of Discs
36 IMDB
37 Synopsis
38 Producer
39 Executive Producer
40 Purchase Info
41 TV Channel ID
42 TV Program ID
43 TV Series ID
44 Creation Date
45 THX Disk ID

HTH,
Roy


lon22

  • Veteran
  • ***
  • Posts: 85
    • View Profile
Re: Media File Size/Duration
« Reply #2 on: April 06, 2008, 10:32:55 pm »
roy,

It doesn't look like the attribute type run time is used for any media in the file attribute table. I would like to get the apprx runtime of a media file.

lon22

royw

  • Guru
  • ****
  • Posts: 261
    • View Profile
Re: Media File Size/Duration
« Reply #3 on: April 08, 2008, 10:57:06 pm »
Howdy,

As far as I can tell, the duration is not stored in the database.  You might have to query the id3 data directly from the file.

Here's a database dump of one of my mp3 files for 0710 beta 3:

  http://roy.wright.org/linuxmce/553.dump

The dump finds all associations for the selected record and then only the belongs_to (has a reference id column) associations of child records.

HTH,
Roy