Page 1 of 1

Extract infor from a file using GetMediaInfo

Posted: 2020-06-08 01:56:43
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.

Re: Extract infor from a file using GetMediaInfo

Posted: 2020-06-09 06:18:28
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.