get data video files with script?

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

get data video files with script?

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

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: get data video files with script?

Post 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.

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

Re: get data video files with script?

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

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: get data video files with script?

Post 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.

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

Re: get data video files with script?

Post by drjs5x »

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

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: get data video files with script?

Post by jupe »

MediaInfo can be used something like this:

Code: Select all

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

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

Re: get data video files with script?

Post by drjs5x »

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

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: get data video files with script?

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

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

Re: get data video files with script?

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

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

Re: get data video files with script?

Post by drjs5x »

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

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: get data video files with script?

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

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

possible array feature script?

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

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: possible array feature script?

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

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

Re: possible array feature script?

Post by drjs5x »

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

Post Reply