This question is answered.


Permlink Replies: 8 - Pages: 1 - Last Post: 12-Jul-2019 20:44 Last Post By: AndreWolff
jGromit

Posts: 7,469
Registered: 31-Jan-2006
How to access video metadata?
Posted: 04-Jul-2019 13:33
 
  Click to reply to this thread Reply
If I add a typical video to an album project, and ask jAlbum to List metadata, I see a number of video metadata fields, for example, Mp4 video.Frame Rate. How can a skin access those metadata? The meta variable is always void, so the usual routine doesn't work:
fr = meta.get("Mp4 video.Frame Rate");
jAlbum is clearly extracting the information, but if a skin can't get to it, it's not of much use.
RobM

Posts: 3,104
Registered: 4-Aug-2006
Re: How to access video metadata?
Posted: 04-Jul-2019 15:46   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Using the metadata extractor you could get the video’s metadata directory first, then get the specific metadata, or use JavaFX media player to get the data. Interesting topic, will have a play unless someone posts a solution.
jGromit

Posts: 7,469
Registered: 31-Jan-2006
Re: How to access video metadata?
Posted: 04-Jul-2019 16:38   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Ideally, I'd like to see these bound to the meta variable - my skins that offer metadata display could then glom onto them without needing any code changes at all.
davidekholm

Posts: 3,583
Registered: 18-Oct-2002
Re: How to access video metadata?
Posted: 10-Jul-2019 00:07   in response to: jGromit in response to: jGromit
Correct
  Click to reply to this thread Reply
I've now made v18.3.2 available as a core update. It shouldn't limit meta data to images only like jAlbum has done in the past. Please let me know how it works for you, if it breaks anything else etc. This was what simply printing ${meta} for a QuickTime movie generated:
{ Quicktime video.Opcolor=32768 32768 32768, Quicktime.Duration in Seconds=00:00:05, Quicktime video.Compression Type=H.264, Quicktime.Poster Time=0, Quicktime.Modification Time=Mon Sep 26 03:40:58 +02:00 2011, Quicktime.Minor Version=537199360, Quicktime.Next Track ID=2, Quicktime video.Horizontal Resolution=72, Quicktime video.Spatial Quality=0, Quicktime video.Creation Time=Mon Sep 26 03:40:58 CEST 2011, Quicktime video.Vertical Resolution=72, File type.Detected File Type Name=MOV, Quicktime video.Width=432 pixels, File type.Expected File Name Extension=mov, Quicktime.Selection Time=133761, Quicktime.Major Brand=Apple QuickTime (.MOV/QT), Quicktime.Compatible Brands=[Apple QuickTime (.MOV/QT), Unknown, Unknown, Unknown], Quicktime video.Depth=24-bit color, Quicktime video.Color Table=None, File type.Detected File Type Long Name=QuickTime Movie, Quicktime video.Modification Time=Mon Sep 26 03:40:58 CEST 2011, Quicktime video.Temporal Quality=0, File.File Modified Date=Fri Oct 19 00:52:11 +02:00 2018, Quicktime.Selection Duration=0, Quicktime.Duration=133761, File.File Size=469597 bytes, Quicktime.Current Time=0, Quicktime.Preferred Volume=1, Quicktime video.Frame Rate=29,97, Quicktime.Media Time Scale=30000, File.File Name=Archer1.mov, Quicktime.Preferred Rate=1, Quicktime video.Height=192 pixels, Quicktime video.Graphics Mode=Dither copy, File type.Detected MIME Type=video/quicktime, Quicktime.Preview Duration=0, Quicktime video.Vendor=Unknown, Quicktime.Creation Time=Mon Sep 26 03:40:58 +02:00 2011, Quicktime.Preview Time=0 } 
jGromit

Posts: 7,469
Registered: 31-Jan-2006
Re: How to access video metadata?
Posted: 10-Jul-2019 00:54   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
So far, looks like it's doing exactly what it should. In my skins that support metadata display (Gromit, Neptune, Saturn), if a user really wants to display something from the video metadata, like Mp4.Major Brand, he can do so. No interference with anything else.

(Saw your pre-edited post, and yes, the whole camera date/originalDate thing is going to be a can of worms. No consistent standard among camera makers, time zone offsets, etc.)
davidekholm

Posts: 3,583
Registered: 18-Oct-2002
Re: How to access video metadata?
Posted: 10-Jul-2019 11:39   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
So far, looks like it's doing exactly what it should. In my skins that support metadata display (Gromit, Neptune, Saturn), if a user really wants to display something from the video metadata, like Mp4.Major Brand, he can do so. No interference with anything else.

(Saw your pre-edited post, and yes, the whole camera date/originalDate thing is going to be a can of worms. No consistent standard among camera makers, time zone offsets, etc.)


True. Each video format seems to have its own way of storing the creation date. I currently only support MP4 and QuickTime dates, but please pass me an AVI file too (that completes the video formats the underlying library can handle)
jGromit

Posts: 7,469
Registered: 31-Jan-2006
Re: How to access video metadata?
Posted: 10-Jul-2019 13:15   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
And jAlbum gets some MP4's wrong - see https://jalbum.net/forum/thread.jspa?threadID=55287

Check your email for some video links.
RobM

Posts: 3,104
Registered: 4-Aug-2006
Re: How to access video metadata?
Posted: 11-Jul-2019 00:19   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
A reminder of my external tool to get GPS data for videos, updated to populate a user variable for gpsLocation with the GPS data, e.g. 59.328945,18.065011
AndreWolff

Posts: 1,742
Registered: 14-Dec-2007
Re: How to access video metadata?
Posted: 12-Jul-2019 20:44   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Is this feature request now implemented in the next release?
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums