You are not logged in.
I use this script, but it dosen't work
ReNamer:Scripts:MediaInfo
http://www.den4b.com/wiki/ReNamer:Scripts:MediaInfo
I have downloaded and installed MediaInfo CLI
Offline
Open a command line box (cmd.exe) in the folder with your MP4 and test if they contain any info
MediaInfo.exe --output=General;%Encoded_Date% "here your.mp4"
Possible output:
UTC 2011-05-23 12:51:14
What do you get?
Try MediaInfo.exe "here your.mp4" to see all media info from your file
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline
Open a command line box (cmd.exe) in the folder with your MP4 and test if they contain any info
MediaInfo.exe --output=General;%Encoded_Date% "here your.mp4"
Possible output:
UTC 2011-05-23 12:51:14What do you get?
Try MediaInfo.exe "here your.mp4" to see all media info from your file
It can output mediainfo
D:\>MediaInfo.exe --output=General;%Encoded_Date% VID_20201215_102625.mp4
UTC 2020-12-15 02:26:30
Last edited by Bingman (2022-02-20 11:10)
Offline
Fine.
For me it works. I get the date extracted. (with included invalid chars, but ok so far)
Which version of ReNamer do you use?
Is the path to MediaInfo.exe correct in your script?
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline
version 7.3
I only change the path of MediaInfoCLI executable in this script, other code is completely copied into the script.
{ Extract media meta information using MediaInfo CLI }
const
MediaInfoExe = 'D:\MediaInfoCLI\MediaInfo.exe';
OutputParameter = 'General;%Encoded_Date%';
var
Command: WideString;
Output: String;
begin
Command :=
'"' + MediaInfoExe + '"' +
' --output="' + OutputParameter + '"' +
' "' + FilePath + '"';
if ExecConsoleApp(Command, Output) = 0 then
FileName := WideTrim(OemToWide(Output)) + WideExtractFileExt(FilePath);
end.
Offline
OK.
There was an underscore in the mediainfo folder name, but now you have sorted that out?
I run out of ideas.
Maybe change OemToWide to OemToAnsi?
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline
I changed the folder name, removed the underscore, it didn't work too.
Ah, I got it. My Video file path contains Chinese characters.
And I have a question, how can i change the UTC time to my time zone?
Last edited by Bingman (2022-02-20 15:24)
Offline
And I have a question, how can i change the UTC time to my time zone?
I don't know because I don't use that.
Probably with an second rule "ReformatDate" afterwards
https://www.den4b.com/wiki/ReNamer:Rules:ReformatDate
?
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline
Thanks a lot, I'll look into it again.
Also I Want to know how to make MediaInfoCLI recognize Chinese characters, @den4b
Below is a method of adjusting the time zone.
Thank you, Administrator den4b
http://www.den4b.com/forum/viewtopic.ph … 922#p11922
You can adjust the date format and add an hour using the Reformat Date rule, as follows:
> Convert to "yyyymmdd_hh-nn-ss" from "yyyy-mm-dd hh:nn:ss", whole words only, skip extension, adjust time by 1 hour.
Then, you'll just need to remove the "UTC" prefix with a separate rule.
Last edited by Bingman (2022-02-21 05:48)
Offline
I Want to know how to make MediaInfoCLI recognize Chinese characters
Extracting Unicode content via the Windows command line interface is problematic, if not impossible in some cases. You can also find a similar statement on the MediaInfo website: https://mediaarea.net/en/MediaInfo/Supp … rt#Unicode
However, MediaInfo has command line options for saving the output to a file, with full Unicode support. I think it should be the "--LogFile" option, but you might want to check all available options via "MediaInfo --Help".
If you can provide a sample file, I can give it a try.
Offline