You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed in MKVToolnix that one of the videos has two tags (one global and one regular) and out of curiosity decided to look into what they are (MediaInfo debug mode was very helpful in this regard):
global tag = container format tag "Lavf57.51.100"
regular tag = video stream tag "Lavc57.64.101 libx265"
I've also noticed that MediaInfo only displays the first tag in the General section (Writing library aka Encoded_Library (which replaces "ENCODER" tag name)), but the second tag is not shown!
Looking through the source code to figure out why this tag is missing I've stumbled upon this function that overwrites the previous Encoded_Library field (which did have the regular tag "Lavc57.64.101 libx265") when it encounters a separately parsed Name/Version with a custom string created from these parsed values.
I think it's better if the behavior were consistent and the video stream Encoder tag should also be preserved just like the container format tag is. I'll submit a patch shortly that fixes this issue by storing the original video stream tag in a separate variable and then appending it after the File__Analyze_Encoded_Library_String function generates a custom Encoded_Library field, though not sure this is the best way to fix it.
P.S. I've also noticed that File__Analyze_Streams_Finish.cpp has mixed line endings, which complicates editing it in a modern text editor (e.g. Sublime Text) as it automatically normalize them, which pollutes a commit. Can I send a separate patch to fix it?
The headers for these two tags are provided below for your reference, the regular tag has two extra fields TargetType and TagTrackUID
I've noticed in MKVToolnix that one of the videos has two tags (one global and one regular) and out of curiosity decided to look into what they are (MediaInfo debug mode was very helpful in this regard):
I've also noticed that MediaInfo only displays the first tag in the General section (Writing library aka Encoded_Library (which replaces "ENCODER" tag name)), but the second tag is not shown!
Looking through the source code to figure out why this tag is missing I've stumbled upon this function that overwrites the previous Encoded_Library field (which did have the regular tag "Lavc57.64.101 libx265") when it encounters a separately parsed Name/Version with a custom string created from these parsed values.
I think it's better if the behavior were consistent and the video stream Encoder tag should also be preserved just like the container format tag is. I'll submit a patch shortly that fixes this issue by storing the original video stream tag in a separate variable and then appending it after the
File__Analyze_Encoded_Library_String
function generates a custom Encoded_Library field, though not sure this is the best way to fix it.P.S. I've also noticed that File__Analyze_Streams_Finish.cpp has mixed line endings, which complicates editing it in a modern text editor (e.g. Sublime Text) as it automatically normalize them, which pollutes a commit. Can I send a separate patch to fix it?
The headers for these two tags are provided below for your reference, the regular tag has two extra fields
TargetType
andTagTrackUID
Global tag (Lavf57.51.100 is displayed@General)
Tag (60 bytes)
Header (10 bytes)
Name: 13171 (0x3373)
Size: 50 (0x00000000000032)
Targets (14 bytes)
Header (10 bytes)
Name: 9152 (0x23C0)
Size: 4 (0x00000000000004)
TargetTypeValue - 50 (0x32) (4 bytes)
Header (3 bytes)
Name: 10442 (0x28CA)
Size: 1 (0x01)
Data: 50 (0x32)
SimpleTag (36 bytes)
Header (10 bytes)
Name: 10184 (0x27C8)
Size: 26 (0x0000000000001A)
TagName - ENCODER (10 bytes)
Header (3 bytes)
Name: 1443 (0x05A3)
Size: 7 (0x07)
Data: ENCODER
TagString - Lavf57.51.100 (16 bytes)
Header (3 bytes)
Name: 1159 (0x0487)
Size: 13 (0x0D)
Data: Lavf57.51.100
Stream tag (Lavc57.64.101 libx265 is not displayed anywhere)
Tag (433 bytes)
Header (10 bytes)
Name: 13171 (0x3373)
Size: 423 (0x000000000001A7)
Targets (26 bytes)
Header (10 bytes)
Name: 9152 (0x23C0)
Size: 16 (0x00000000000010)
TargetTypeValue - 50 (0x32) (4 bytes)
Header (3 bytes)
Name: 10442 (0x28CA)
Size: 1 (0x01)
Data: 50 (0x32)
TargetType - MOVIE (8 bytes)
Header (3 bytes)
Name: 9162 (0x23CA)
Size: 5 (0x05)
Data: MOVIE
TagTrackUID - 1 (0x1) (4 bytes)
Header (3 bytes)
Name: 9157 (0x23C5)
Size: 1 (0x01)
Data: 1 (0x01)
SimpleTag (44 bytes)
Header (10 bytes)
Name: 10184 (0x27C8)
Size: 34 (0x00000000000022)
TagName - ENCODER (10 bytes)
Header (3 bytes)
Name: 1443 (0x05A3)
Size: 7 (0x07)
Data: ENCODER
TagString - Lavc57.64.101 libx265 (24 bytes)
Header (3 bytes)
Name: 1159 (0x0487)
Size: 21 (0x15)
Data: Lavc57.64.101 libx265
The text was updated successfully, but these errors were encountered: