Page 1 of 1
get data video files with script?
Posted: 18 Mar 2018 08:17
by drjs5x
hi
get data video files with script?
example
get(video_bitrate, $file)
get(video_width, $file)
get(video_height, $file)
get(video_duration, $file)
get(video_codec, $file)
etc...
possible???
Re: get data video files with script?
Posted: 18 Mar 2018 08:32
by jupe
Yes, you can paste the following into the XY address bar for more information if you are interested:
Code: Select all
::help "idh_scripting_comref.htm#idh_sc_property";
Here are a couple quick examples:
Code: Select all
text property("System.Video.FrameWidth");
text property("System.Video.FrameHeight");
you can also do it via 3rd party Mediainfo command line app, do a search of the forum it is explained many times how to use that.
Re: get data video files with script?
Posted: 18 Mar 2018 08:42
by drjs5x
text <prop 'System.Video.FrameWidth'>x<prop 'System.Video.FrameHeight'>bitrate:<prop 'System.Video.TotalBitrate'>
i found only width,size,bitrate i cant find duration and codec.
thanks for support.
Re: get data video files with script?
Posted: 18 Mar 2018 08:51
by jupe
Cheats way of duration: text property("*Length"); or on Windows 10 text property("#27");
you may need to go the Mediainfo route for Codec identification.
Re: get data video files with script?
Posted: 18 Mar 2018 08:53
by drjs5x
thanks i will tray
Re: get data video files with script?
Posted: 18 Mar 2018 08:57
by jupe
MediaInfo can be used something like this:
Code: Select all
text runret("Mediainfo.exe --inform=Video;%CodecID% ""<curitem>""");
Re: get data video files with script?
Posted: 18 Mar 2018 09:07
by drjs5x
great working thanks
Re: get data video files with script?
Posted: 18 Mar 2018 09:21
by jupe
I would probably recommend using Mediainfo for bitrate too, it can be done something like this:
Code: Select all
text runret("Mediainfo.exe --Inform=General;%OverallBitRate/String% ""<curitem>""");
Re: get data video files with script?
Posted: 18 Mar 2018 09:43
by drjs5x
""
"video format" text runret("D:\MediaInfo3\Mediainfo.exe ""<curitem>"" --inform=Video;%Format%");
"video bitrate" text runret("D:\MediaInfo3\Mediainfo.exe ""<curitem>"" --inform=Video;%BitRate%");
"video duration" text runret("D:\MediaInfo3\Mediainfo.exe ""<curitem>"" --inform=Video;%Duration%");
"video width" text runret("D:\MediaInfo3\Mediainfo.exe ""<curitem>"" --inform=Video;%Width%");
"video height" text runret("D:\MediaInfo3\Mediainfo.exe ""<curitem>"" --inform=Video;%Height%");
"**video seq size" text runret("D:\MediaInfo3\Mediainfo.exe ""<curitem>"" --inform=Video;%StreamSize%");
that values great. thanks for help.
Re: get data video files with script?
Posted: 18 Mar 2018 10:28
by drjs5x
"****" text runret("D:\MediaInfo3\Mediainfo.exe ""<curitem>"" --inform=Video;'%StreamSize%':'%Width%':'%Height%':'%BitRate%':'%Duration%'");
Re: get data video files with script?
Posted: 18 Mar 2018 10:38
by jupe
You might find the output of these variables nicer:
%StreamSize/String%
%BitRate/String%
%Duration/String%
or outputting on separate lines could be done something like this:
Code: Select all
text replace(runret("d:\MediaInfo3\Mediainfo.exe --Inform=Video;%StreamSize/String%:%Width/String%:%Height/String%:%BitRate/String%:%Duration/String% ""<curitem>"""), ":", <crlf>);
possible array feature script?
Posted: 18 Mar 2018 11:34
by drjs5x
hi dears
dear xyplorer possible array etc:
4600:857:yes:75:disable:4563
how can string to array
arrayCustom(1);text arrayCustom(4);
possible array feature script?
Re: possible array feature script?
Posted: 18 Mar 2018 11:43
by jupe
I think what you want to do it just access each item, which can be done like this for example:
Code: Select all
$string = "4600:857:yes:75:disable:4563";
echo gettoken($string, 1, ":");
echo gettoken($string, 2, ":");
Re: possible array feature script?
Posted: 18 Mar 2018 11:48
by drjs5x
great thanks dear