get data video files with script?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
drjs5x
Posts: 131
Joined: 18 Nov 2015 18:12
Location: Turkey

get data video files with script?

Postby drjs5x » 18 Mar 2018 08:17

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???
newbie or not...........

jupe
Posts: 754
Joined: 20 Oct 2017 21:14

Re: get data video files with script?

Postby jupe » 18 Mar 2018 08:32

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.

drjs5x
Posts: 131
Joined: 18 Nov 2015 18:12
Location: Turkey

Re: get data video files with script?

Postby drjs5x » 18 Mar 2018 08:42

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.
newbie or not...........

jupe
Posts: 754
Joined: 20 Oct 2017 21:14

Re: get data video files with script?

Postby jupe » 18 Mar 2018 08:51

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.

drjs5x
Posts: 131
Joined: 18 Nov 2015 18:12
Location: Turkey

Re: get data video files with script?

Postby drjs5x » 18 Mar 2018 08:53

thanks i will tray
newbie or not...........

jupe
Posts: 754
Joined: 20 Oct 2017 21:14

Re: get data video files with script?

Postby jupe » 18 Mar 2018 08:57

MediaInfo can be used something like this:

Code: Select all

text runret("Mediainfo.exe --inform=Video;%CodecID% ""<curitem>""");

drjs5x
Posts: 131
Joined: 18 Nov 2015 18:12
Location: Turkey

Re: get data video files with script?

Postby drjs5x » 18 Mar 2018 09:07

great working thanks
newbie or not...........

jupe
Posts: 754
Joined: 20 Oct 2017 21:14

Re: get data video files with script?

Postby jupe » 18 Mar 2018 09:21

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>""");

drjs5x
Posts: 131
Joined: 18 Nov 2015 18:12
Location: Turkey

Re: get data video files with script?

Postby drjs5x » 18 Mar 2018 09:43

""
"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.
:appl:
newbie or not...........

drjs5x
Posts: 131
Joined: 18 Nov 2015 18:12
Location: Turkey

Re: get data video files with script?

Postby drjs5x » 18 Mar 2018 10:28

"****" text runret("D:\MediaInfo3\Mediainfo.exe ""<curitem>"" --inform=Video;'%StreamSize%':'%Width%':'%Height%':'%BitRate%':'%Duration%'");
newbie or not...........

jupe
Posts: 754
Joined: 20 Oct 2017 21:14

Re: get data video files with script?

Postby jupe » 18 Mar 2018 10:38

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>);

drjs5x
Posts: 131
Joined: 18 Nov 2015 18:12
Location: Turkey

possible array feature script?

Postby drjs5x » 18 Mar 2018 11:34

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?
newbie or not...........

jupe
Posts: 754
Joined: 20 Oct 2017 21:14

Re: possible array feature script?

Postby jupe » 18 Mar 2018 11:43

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, ":");

drjs5x
Posts: 131
Joined: 18 Nov 2015 18:12
Location: Turkey

Re: possible array feature script?

Postby drjs5x » 18 Mar 2018 11:48

great thanks dear
newbie or not...........


Return to “Tips & Tricks, Questions & Answers”



Who is online

Users browsing this forum: No registered users and 1 guest