Extract infor from a file using GetMediaInfo

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
Post Reply
Baina
Posts: 1
Joined: 2020-06-08 01:49:58

Extract infor from a file using GetMediaInfo

Post by Baina »

Hi.

I am trying to create a script to extract information from a video. The idea is to extract the "Title" field from the video track provided by MediaInfo and then dump it into an AMC boss (I'm thinking of "Source").

I've thought about using the LoadMedia and GetMediaInfo commands to extract the information, but I can't find a clear explanation of the syntax I should be using. Or even if this is possible.

Can anybody help me. Thanks for everything.
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Extract infor from a file using GetMediaInfo

Post by antp »

Hi,
Have you checked the help file? (Tech info -> script files)
It does not look like there is something to retrive the title (if it is what you want, if it is somehow embedded in the video).
Only info that are already processed by AMC seem to be accessible.
These functions were added by Mickael, not by me, but it looks like you have to call LoadMedia with the file name, e.g. if it is stored in the File Path field:

Code: Select all

if LoadMedia(GetField(fieldFilePath)) then
begin
...
end;
Then in the "..." put the code retrieving and processing the info, using GetMediaInfo and a constant starting by "media" as listed in the help file.
Post Reply