Information regarding
Text
is totally ignored from scratch. But it is expected to tag the parameter with the EmptyValue
.Text
is totally ignored from scratch. But it is expected to tag the parameter with the EmptyValue
.Code: Select all
Microsoft Windows [Version 10.0.19041.630]
(c) 2020 Microsoft Corporation. All rights reserved.
C:\Program Files\MediaInfo_CLI_20.09_Windows_x64>MediaInfo.exe -i "Y:\Test\3 [22-11-2020][23-35-59]\1.mp4"
General
Complete name : Y:\Test\3 [22-11-2020][23-35-59]\1.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/mp41)
File size : 1.57 GiB
Duration : 1 h 37 min
Overall bit rate : 2 296 kb/s
Writing application : Lavf58.2.103
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, Reference frames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 1 h 37 min
Bit rate : 2 150 kb/s
Width : 1 920 pixels
Height : 816 pixels
Display aspect ratio : 2.35: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.057
Stream size : 1.46 GiB (94%)
Writing library : x264 core 152
Encoding settings : cabac=1 / ref=4 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-3 / threads=12 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=2pass / mbtree=1 / bitrate=2150 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=31250 / vbv_bufsize=31250 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Language : English
Tagged date : UTC 2020-05-30 01:16:09
Codec configuration box : avcC
Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 1 h 37 min
Source duration : 1 h 37 min
Source_Duration_LastFrame : -13 ms
Bit rate mode : Constant
Bit rate : 144 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 100 MiB (6%)
Source stream size : 100 MiB (6%)
Language : English
Default : Yes
Alternate group : 1
Tagged date : UTC 2020-05-30 01:16:09
Code: Select all
TextCount=%TextCount%Cover=%Cover%Title=%Title%Genre=%Genre%Director=%Director%Actor=%Actor%LongDescription=%LongDescription%
Leads to:
General_TextCount=N/A#::#General_Cover=#::#General_Title=N/A#::#General_Genre=#::#General_Director=N/A#::#General_Actor=#::#General_LongDescription=N/A
N/A, empty, N/A, empty, N/A, empty, N/A
Code: Select all
$result = regexreplace($result, "(#::#[a-z0-9]+?_[a-z0-9]+?=)(#::#|$)", "$1" . $EmptyValue . "$2");
Code: Select all
$result = regexreplace($result, "([a-z0-9]+?_[a-z0-9]+?=)(#::#|$)", "$1" . $EmptyValue . "$2");
It's very weird. Because parameters of General_Cover, General_Genre, General_Director, General_LongDescription, and General_Title are exactly the same in terms of EXISTENCE. But some are randomly tagged withhighend wrote: ↑22 Nov 2020 21:46 Ok, my guess: It does happen for all items (that have no N/A) when they don't exist (or if they are empty?) and it is some kind of interleaved...
Correct?Code: Select all
TextCount=%TextCount%Cover=%Cover%Title=%Title%Genre=%Genre%Director=%Director%Actor=%Actor%LongDescription=%LongDescription% Leads to: General_TextCount=N/A#::#General_Cover=#::#General_Title=N/A#::#General_Genre=#::#General_Director=N/A#::#General_Actor=#::#General_LongDescription=N/A N/A, empty, N/A, empty, N/A, empty, N/A
N/A
and some are skipped.Code: Select all
#::#General_Format=MPEG-4#::#General_Duration=01:37:36.518#::#General_OverallBitRate=2 296 kb/s#::#General_AudioCount=1#::#General_VideoCount=1#::#General_FrameRate=23.976#::#General_TextCount=0#::#General_Cover=No#::#General_Title=N/A#::#General_Genre=N/A#::#General_Director=N/A#::#General_Actor=N/A#::#General_LongDescription=N/A#::#Video_Width=1920#::#Video_Height=816#::#Video_DisplayAspectRatio=2.35:1#::#Video_Title=N/A#::#Video_BitRate=2 150 kb/s#::#Video_VideoFormatList=AVC#::#Audio_Channels=2#::#Audio_BitRate=144 kb/s#::#Audio_Title=N/A#::#Audio_AudioLanguageList=eng#::#Audio_AudioFormatList=AAC
N/A
in General
section is resolved.Text
section is totally ignored in tagging.Yeah, but that's the fault of MediaInfo.Still Text section is totally ignored in tagging.
But the behavior of MediaInfo is exactly similar in returning values if a missing parameter is requested:
Code: Select all
C:\Program Files\MediaInfo_CLI_20.09_Windows_x64>MediaInfo.exe --Inform=General;%Duration/String3% "Y:\Test\3 [22-11-2020][23-35-59]\1.mp4"
01:37:36.518
C:\Program Files\MediaInfo_CLI_20.09_Windows_x64>MediaInfo.exe --Inform=General;%Genre% "Y:\Test\3 [22-11-2020][23-35-59]\1.mp4"
C:\Program Files\MediaInfo_CLI_20.09_Windows_x64>MediaInfo.exe --Inform=Text;%Language% "Y:\Test\3 [22-11-2020][23-35-59]\1.mp4"
C:\Program Files\MediaInfo_CLI_20.09_Windows_x64>
Code: Select all
$result = trim(runret("""$MediaInfoFile"" ""--Inform=file://$TemplateFile"" ""$file"""), <crlf>);
text $result;
after it and you'll see that the string returned does contain Text_... entries for files that have that section and nothing for files that are missing that section.Code: Select all
v0.6
+ MediaInfo does not return attribute strings for sections that don't exist
in a file. But if the template contains them these attributes won't be
in the tag database afterwards. This should now happen
! The regex to create empty value names wasn't accurate enough which lead
to attributes missing their empty value
I know what you mean. I just thought that the nature of the fault is similar and this MediaInfo Fault could also be covered by some revisions in the script, like the other fault which they return empty values and has been resolved by the script throughhighend wrote: ↑22 Nov 2020 22:58 Similar? Maybe. The same? No.
add aCode: Select all
$result = trim(runret("""$MediaInfoFile"" ""--Inform=file://$TemplateFile"" ""$file"""), <crlf>);
text $result;
after it and you'll see that the string returned does contain Text_... entries for files that have that section and nothing for files that are missing that section.
EmptyValue
.