Custom column with video resolution
Custom column with video resolution
i searched for topics on this but can't get it to work, i have the mediainfo software but i don't know how to extract the information from it to put them in a cc script
thank you in advance
thank you in advance
Re: Custom column with video resolution
Code: Select all
$mediaInfo = "<path to mediainfo>\MediaInfo.exe";
return regexreplace(runret("$mediaInfo --Inform=Video;%Width%x%Height% ""<cc_item>"""), "\r?\n");
One of my scripts helped you out? Please donate via Paypal
Re: Custom column with video resolution
even with your script the column remain blank (of course i've adjusted the mediainfo path)
Re: Custom column with video resolution
Output of the cli version!
?
Code: Select all
mediainfo.exe "<one of those video files>"
One of my scripts helped you out? Please donate via Paypal
Re: Custom column with video resolution
You may already realize this, but you need the command line version of MediaInfo, the GUI version won't work.
Re: Custom column with video resolution
and you definitely updated the path to the CLi version?
Re: Custom column with video resolution
If I'll ever get an answer?...
One of my scripts helped you out? Please donate via Paypal
Re: Custom column with video resolution
i'm sorry, i missed your replyhighend wrote: ↑14 Nov 2018 15:41 Output of the cli version!?Code: Select all
mediainfo.exe "<one of those video files>"
this is the output
Code: Select all
General
Unique ID : 225408706383733205341920486861547349990 (0xA994234299E1FE0FABC263374645A7E6)
Complete name : E:\Film\Wall-E.mkv
Format : Matroska
Format version : Version 2
File size : 12.6 GiB
Duration : 1 h 38 min
Overall bit rate : 18.3 Mb/s
Movie name : assodicuori
Encoded date : UTC 2011-04-22 23:00:15
Writing application : mkvmerge v2.9.8 ('C'est le bon') built on Aug 13 2009 12:49:06
Writing library : libebml v0.7.7 + libmatroska v0.8.1
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 1 h 38 min
Bit rate : 14.0 Mb/s
Width : 1 920 pixels
Height : 800 pixels
Display aspect ratio : 2.40:1
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.380
Stream size : 9.41 GiB (75%)
Title : Wall-E (2008) FullHD 1080p assodicuori
Writing library : x264 core 104 r1703 cd21d05
Encoding settings : cabac=1 / ref=4 / deblock=1:-3:-3 / analyse=0x3:0x113 / me=umh / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=32 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=2pass / mbtree=1 / bitrate=14000 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00
Language : English
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Audio #1
ID : 2
Format : DTS ES
Format/Info : Digital Theater Systems
Commercial name : DTS-ES Matrix
Codec ID : A_DTS
Duration : 1 h 38 min
Bit rate mode : Constant
Bit rate : 1 509 kb/s
Channel(s) : 6 channels
Channel(s)_Original : 7 channels
Channel layout : C L R Ls Rs Cb LFE
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 24 bits
Compression mode : Lossy
Delay relative to video : 10 ms
Stream size : 1.04 GiB (8%)
Title : Italian DTS
Language : Italian
Default : Yes
Forced : No
Audio #2
ID : 3
Format : AC-3
Format/Info : Audio Coding 3
Commercial name : Dolby Digital
Codec ID : A_AC3
Duration : 1 h 38 min
Bit rate mode : Constant
Bit rate : 640 kb/s
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 452 MiB (3%)
Title : Italian AC3
Language : Italian
Service kind : Complete Main
Default : No
Forced : No
Audio #3
ID : 4
Format : DTS ES
Format/Info : Digital Theater Systems
Commercial name : DTS-ES Matrix
Codec ID : A_DTS
Duration : 1 h 38 min
Bit rate mode : Constant
Bit rate : 1 509 kb/s
Channel(s) : 6 channels
Channel(s)_Original : 7 channels
Channel layout : C L R Ls Rs Cb LFE
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 24 bits
Compression mode : Lossy
Delay relative to video : 10 ms
Stream size : 1.04 GiB (8%)
Title : English DTS
Language : English
Default : No
Forced : No
Audio #4
ID : 5
Format : AC-3
Format/Info : Audio Coding 3
Commercial name : Dolby Digital
Codec ID : A_AC3
Duration : 1 h 38 min
Bit rate mode : Constant
Bit rate : 640 kb/s
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 452 MiB (3%)
Title : English AC3
Language : English
Service kind : Complete Main
Default : No
Forced : No
Text #1
ID : 6
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Title : Italian Regular
Language : Italian
Default : Yes
Forced : No
Text #2
ID : 7
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Title : English Regular
Language : English
Default : No
Forced : No
Text #3
ID : 8
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Title : English Hearing Impaired
Language : English
Default : No
Forced : NoRe: Custom column with video resolution
And now the output of:
and this time, show me a screenshot of the command prompt window after executing that command (because I'm guessing that the mediainfo.exe is within a path that contains spaces...)
And if this is correct, use that line in the cc instead:
Code: Select all
"<path to mediainfo>\mediainfo.exe" --Inform=Video;%Width%x%Height% "E:\Film\Wall-E.mkv"And if this is correct, use that line in the cc instead:
Code: Select all
return regexreplace(runret("""$mediaInfo"" --Inform=Video;%Width%x%Height% ""<cc_item>"""), "\r?\n");One of my scripts helped you out? Please donate via Paypal
Re: Custom column with video resolution
the terminal returns me correctly "1920x800"highend wrote: ↑15 Nov 2018 15:08 And now the output of:and this time, show me a screenshot of the command prompt window after executing that command (because I'm guessing that the mediainfo.exe is within a path that contains spaces...)Code: Select all
"<path to mediainfo>\mediainfo.exe" --Inform=Video;%Width%x%Height% "E:\Film\Wall-E.mkv"
And if this is correct, use that line in the cc instead:Code: Select all
return regexreplace(runret("""$mediaInfo"" --Inform=Video;%Width%x%Height% ""<cc_item>"""), "\r?\n");
and no, the path to mediainfo.exe do not contain space
something it's wrong on my cc configuration: i've only set the name of it, in type i've selected script and pasted your script (with my mediainfo.exe path)
Last edited by Wublide on 15 Nov 2018 15:38, edited 2 times in total.
Re: Custom column with video resolution
And both (or at least the line beginning with "return") are indented by at least 1 space?
I'm tired of guessing things here. Open the configuration for that custom column, right click the "Clear"
button, choose "Copy as Snippet" and insert what's now in the clipboard in your next posting (in code tags!)
I'm tired of guessing things here. Open the configuration for that custom column, right click the "Clear"
button, choose "Copy as Snippet" and insert what's now in the clipboard in your next posting (in code tags!)
One of my scripts helped you out? Please donate via Paypal
Re: Custom column with video resolution
I DID IT!highend wrote: ↑15 Nov 2018 15:36 And both (or at least the line beginning with "return") are indented by at least 1 space?
I'm tired of guessing things here. Open the configuration for that custom column, right click the "Clear"
button, choose "Copy as Snippet" and insert what's now in the clipboard in your next posting (in code tags!)
i was missing a " in the first variable (the path to mediainfo.exe)
really thank you, i own you a couple of beers goddamn! <3
Re: Custom column with video resolution
Then look at my signature^^
One of my scripts helped you out? Please donate via Paypal
XYplorer Beta Club