ratoaq2 / knowit

Know better your media files
MIT License
29 stars 5 forks source link

Language Not Provided for Advanced Sub Station Alpha Subtitles #39

Closed bpoxy closed 1 year ago

bpoxy commented 3 years ago
Example... ``` PS Z:\Videos\Shows\Heroes (2006)> knowit --provider ffmpeg "Z:\Videos\Shows\Heroes (2006)\01x23 - How to Stop an Exploding Man.mkv" For: Z:\Videos\Shows\Heroes (2006)\01x23 - How to Stop an Exploding Man.mkv Knowit 0.4.0 found: { "path": "Z:\\Videos\\Shows\\Heroes (2006)\\01x23 - How to Stop an Exploding Man.mkv", "duration": "0:44:56", "size": "369.34 MB", "bit_rate": "1.1 Mbps", "container": "mkv", "video": [ { "id": 0, "width": "1920 pixel", "height": "1080 pixel", "scan_type": "Progressive", "aspect_ratio": "1.778", "pixel_aspect_ratio": "1.0", "resolution": "1080p", "frame_rate": "23.976 FPS", "codec": "H.265", "profile": "Main", "default": true } ], "audio": [ { "id": 1, "name": "Surround", "codec": "AAC", "profile": "High Efficiency", "channels_count": 6, "channels": "5.1", "sampling_rate": "48.0 KHz", "default": true } ], "subtitle": [ { "id": 2, "format": "ASS" }, { "id": 3, "format": "ASS" }, { "id": 4, "format": "ASS" }, { "id": 5, "format": "ASS" }, { "id": 6, "format": "ASS" }, { "id": 7, "format": "ASS" }, { "id": 8, "format": "ASS" }, { "id": 9, "format": "ASS" }, { "id": 10, "format": "ASS" } ], "provider": { "name": "ffmpeg", "version": { "B:\\Utilities\\ffmpeg-4.3.2-2021-02-02-essentials_build\\bin\\ffprobe.exe": "v4.3.2-2021-02-02-essentials_build-www.gyan.dev" } } } ```
MediaInfo does provide the language, so it is available... ``` General Unique ID : 19797109430564447244166178328723164391 (0xEE4C8DAA8919ED0DBD45CEE25998CE7) Complete name : Z:\Videos\Shows\Heroes (2006)\01x23 - How to Stop an Exploding Man.mkv Format : Matroska Format version : Version 2 File size : 352 MiB Duration : 44 min 56 s Overall bit rate : 1 096 kb/s Encoded date : UTC Writing application : HandBrake 0.10.2 2015060900 Writing library : Lavf55.12.0 Video ID : 1 Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main@L4@Main Codec ID : V_MPEGH/ISO/HEVC Duration : 44 min 56 s Bit rate : 900 kb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Bits/(Pixel*Frame) : 0.018 Stream size : 289 MiB (82%) Writing library : x265 1.5:[Windows][GCC 4.9.0][64 bit] Encoding settings : wpp / ctu=64 / tu-intra-depth=1 / tu-inter-depth=1 / me=1 / subme=2 / merange=57 / no-rect / no-amp / max-merge=2 / temporal-mvp / no-early-skip / no-fast-cbf / rdpenalty=0 / no-tskip / no-tskip-fast / strong-intra-smoothing / no-lossless / no-cu-lossless / no-constrained-intra / fast-intra / open-gop / interlace=0 / keyint=240 / min-keyint=24 / scenecut=40 / rc-lookahead=15 / bframes=4 / bframe-bias=0 / b-adapt=0 / ref=2 / weightp / no-weightb / aq-mode=1 / aq-strength=1.00 / cbqpoffs=0 / crqpoffs=0 / rd=2 / psy-rd=0.30 / psy-rdoq=0.00 / signhide / lft / sao / no-sao-non-deblock / b-pyramid / cutree / rc=2 / pass / bitrate=900 / qcomp=0.60 / qpmin=0 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ipratio=1.40 / pbratio=1.30 Default : Yes Forced : No Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 Audio ID : 2 Format : AAC LC SBR Format/Info : Advanced Audio Codec Low Complexity with Spectral Band Replication Commercial name : HE-AAC Format settings : NBC Codec ID : A_AAC-5 Duration : 44 min 56 s Bit rate : 192 kb/s Channel(s) : 6 channels Channel layout : C L R Ls Rs LFE Sampling rate : 48.0 kHz Frame rate : 23.438 FPS (2048 SPF) Compression mode : Lossy Delay relative to video : -105 ms Stream size : 61.7 MiB (18%) Title : Surround Default : Yes Forced : No Text #1 ID : 3 Format : ASS Codec ID : S_TEXT/ASS Codec ID/Info : Advanced Sub Station Alpha Duration : 44 min 16 s Bit rate : 52 b/s Count of elements : 633 Compression mode : Lossless Stream size : 16.9 KiB (0%) Language : Arabic Default : No Forced : No Text #2 ID : 4 Format : ASS Codec ID : S_TEXT/ASS Codec ID/Info : Advanced Sub Station Alpha Duration : 44 min 4 s Bit rate : 67 b/s Count of elements : 375 Compression mode : Lossless Stream size : 21.8 KiB (0%) Language : Danish Default : No Forced : No Text #3 ID : 5 Format : ASS Codec ID : S_TEXT/ASS Codec ID/Info : Advanced Sub Station Alpha Duration : 44 min 5 s Bit rate : 68 b/s Count of elements : 357 Compression mode : Lossless Stream size : 22.2 KiB (0%) Language : Dutch Default : No Forced : No Text #4 ID : 6 Format : ASS Codec ID : S_TEXT/ASS Codec ID/Info : Advanced Sub Station Alpha Duration : 42 min 26 s Bit rate : 86 b/s Count of elements : 538 Compression mode : Lossless Stream size : 26.8 KiB (0%) Language : English Default : No Forced : No Text #5 ID : 7 Format : ASS Codec ID : S_TEXT/ASS Codec ID/Info : Advanced Sub Station Alpha Duration : 42 min 46 s Bit rate : 110 b/s Count of elements : 614 Compression mode : Lossless Stream size : 34.7 KiB (0%) Language : French Default : No Forced : No Text #6 ID : 8 Format : ASS Codec ID : S_TEXT/ASS Codec ID/Info : Advanced Sub Station Alpha Duration : 42 min 26 s Bit rate : 106 b/s Count of elements : 618 Compression mode : Lossless Stream size : 33.0 KiB (0%) Language : German Default : No Forced : No Text #7 ID : 9 Format : ASS Codec ID : S_TEXT/ASS Codec ID/Info : Advanced Sub Station Alpha Bit rate : 0 b/s Count of elements : 0 Compression mode : Lossless Stream size : 0.00 Byte (0%) Language : Persian Default : No Forced : No Text #8 ID : 10 Format : ASS Codec ID : S_TEXT/ASS Codec ID/Info : Advanced Sub Station Alpha Duration : 42 min 46 s Bit rate : 103 b/s Count of elements : 614 Compression mode : Lossless Stream size : 32.5 KiB (0%) Language : Spanish Default : No Forced : No Text #9 ID : 11 Format : ASS Codec ID : S_TEXT/ASS Codec ID/Info : Advanced Sub Station Alpha Bit rate : 0 b/s Count of elements : 0 Compression mode : Lossless Stream size : 0.00 Byte (0%) Language : Vietnamese Default : No Forced : No ```

I'm not 100% certain that this is because of the subtitles being Advanced Sub Station Alpha but I have several files exhibiting this behavior and they all feature Advanced Sub Station Alpha subtitles.

bpoxy commented 3 years ago
I've encountered the same issue with PGS subtitles... ``` PS Z:\Videos\Shows (Prospective)\Band of Brothers (2001)> knowit --provider=ffmpeg '.\01x01 - Currahee.mkv' For: .\01x01 - Currahee.mkv Knowit 0.4.0 found: { "path": ".\\01x01 - Currahee.mkv", "duration": "1:13:14", "size": "983.00 MB", "bit_rate": "1.8 Mbps", "container": "mkv", "video": [ { "id": 0, "width": "1920 pixel", "height": "1080 pixel", "scan_type": "Progressive", "aspect_ratio": "1.778", "pixel_aspect_ratio": "1.0", "resolution": "1080p", "frame_rate": "23.976 FPS", "codec": "H.265", "profile": "Main", "default": true } ], "audio": [ { "id": 1, "name": "Surround", "codec": "AAC", "profile": "High Efficiency", "channels_count": 6, "channels": "5.1", "sampling_rate": "48.0 KHz", "default": true } ], "subtitle": [ { "id": 2, "format": "PGS" } ], "provider": { "name": "ffmpeg", "version": { "B:\\Utilities\\ffmpeg-4.3.2-2021-02-02-essentials_build\\bin\\ffprobe.exe": "v4.3.2-2021-02-02-essentials_build-www.gyan.dev" } } } ```
Again, MediaInfo does provide the language... ``` General Unique ID : 276991716314405050219729082088610137162 (0xD062AA0120C809E77FB64766EA81044A) Complete name : Z:\Videos\Shows (Prospective)\Band of Brothers (2001)\01x01 - Currahee.mkv Format : Matroska Format version : Version 2 File size : 937 MiB Duration : 1 h 13 min Overall bit rate : 1 790 kb/s Writing application : HandBrake 0.10.1 2015030800 Writing library : Lavf55.12.0 Video ID : 1 Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main@L4@Main Codec ID : V_MPEGH/ISO/HEVC Duration : 1 h 13 min Bit rate : 1 501 kb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Bits/(Pixel*Frame) : 0.030 Stream size : 786 MiB (84%) Writing library : x265 1.5:[Windows][GCC 4.9.0][64 bit] Encoding settings : wpp / ctu=64 / tu-intra-depth=1 / tu-inter-depth=1 / me=1 / subme=2 / merange=57 / no-rect / no-amp / max-merge=2 / temporal-mvp / no-early-skip / no-fast-cbf / rdpenalty=0 / no-tskip / no-tskip-fast / strong-intra-smoothing / no-lossless / no-cu-lossless / no-constrained-intra / no-fast-intra / open-gop / interlace=0 / keyint=240 / min-keyint=24 / scenecut=40 / rc-lookahead=20 / bframes=4 / bframe-bias=0 / b-adapt=2 / ref=3 / weightp / no-weightb / aq-mode=1 / aq-strength=1.00 / cbqpoffs=0 / crqpoffs=0 / rd=3 / psy-rd=0.30 / psy-rdoq=0.00 / signhide / lft / sao / no-sao-non-deblock / b-pyramid / cutree / rc=2 / pass / bitrate=1500 / qcomp=0.60 / qpmin=0 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ipratio=1.40 / pbratio=1.30 Default : Yes Forced : No Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 Audio ID : 2 Format : AAC LC SBR Format/Info : Advanced Audio Codec Low Complexity with Spectral Band Replication Commercial name : HE-AAC Format settings : NBC Codec ID : A_AAC-5 Duration : 1 h 13 min Bit rate : 256 kb/s Channel(s) : 6 channels Channel layout : C L R Ls Rs LFE Sampling rate : 48.0 kHz Frame rate : 23.438 FPS (2048 SPF) Compression mode : Lossy Delay relative to video : -105 ms Stream size : 134 MiB (14%) Title : Surround Language : English Default : Yes Forced : No Text ID : 3 Format : PGS Codec ID : S_HDMV/PGS Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs Duration : 1 h 13 min Bit rate : 30.4 kb/s Count of elements : 1518 Stream size : 15.9 MiB (2%) Language : English Default : No Forced : No ```

Am I missing something obviously wrong with these files?

bpoxy commented 3 years ago

I just realized there's a --debug flag, here are those two examples with it specified:

Example 1 ``` PS Z:\> knowit --provider ffmpeg "Z:\Videos\Shows\Heroes (2006)\01x23 - How to Stop an Exploding Man.mkv" --debug For: Z:\Videos\Shows\Heroes (2006)\01x23 - How to Stop an Exploding Man.mkv Detected os: windows Detected os: windows FFmpeg cli detected: B:\Utilities\ffmpeg-4.3.2-2021-02-02-essentials_build\bin\ffprobe.exe v4.3.2-2021-02-02-essentials_build-www.gyan.dev Detected os: windows MkvMerge cli detected: C:\Program Files\MKVToolNix\mkvmerge.exe v56.1.0 Video 'Z:\\Videos\\Shows\\Heroes (2006)\\01x23 - How to Stop an Exploding Man.mkv' scanned using ffmpeg 'B:\\Utilities\\ffmpeg-4.3.2-2021-02-02-essentials_build\\bin\\ffprobe.exe' has raw data: { "streams": [ { "index": 0, "codec_name": "hevc", "codec_long_name": "H.265 / HEVC (High Efficiency Video Coding)", "profile": "Main", "codec_type": "video", "codec_time_base": "1001/24000", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "width": 1920, "height": 1080, "coded_width": 1920, "coded_height": 1080, "closed_captions": 0, "has_b_frames": 2, "sample_aspect_ratio": "1:1", "display_aspect_ratio": "16:9", "pix_fmt": "yuv420p", "level": 120, "color_range": "tv", "color_space": "bt709", "color_transfer": "bt709", "color_primaries": "bt709", "refs": 1, "r_frame_rate": "24000/1001", "avg_frame_rate": "24000/1001", "time_base": "1/1000", "start_pts": 105, "start_time": "0:00:00.105000", "disposition": { "default": 1, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "BPS": "900213", "DURATION": "00:44:56.485708333", "NUMBER_OF_FRAMES": "64651", "NUMBER_OF_BYTES": "303426574", "_STATISTICS_WRITING_APP": "mkvpropedit v56.1.0 ('My Friend') 64-bit", "_STATISTICS_WRITING_DATE_UTC": "2021-05-04 20:01:51", "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES" } }, { "index": 1, "codec_name": "aac", "codec_long_name": "AAC (Advanced Audio Coding)", "profile": "HE-AAC", "codec_type": "audio", "codec_time_base": "1/48000", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "sample_fmt": "fltp", "sample_rate": "48000", "channels": 6, "channel_layout": "5.1", "bits_per_sample": 0, "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/1000", "start_pts": 0, "start_time": "0:00:00.000000", "disposition": { "default": 1, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "title": "Surround", "LANGUAGE": "und", "BPS": "192003", "DURATION": "00:44:56.661000000", "NUMBER_OF_FRAMES": "63204", "NUMBER_OF_BYTES": "64720897", "_STATISTICS_WRITING_APP": "mkvpropedit v56.1.0 ('My Friend') 64-bit", "_STATISTICS_WRITING_DATE_UTC": "2021-05-04 20:01:51", "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES" } }, { "index": 2, "codec_name": "ass", "codec_long_name": "ASS (Advanced SSA) subtitle", "codec_type": "subtitle", "codec_time_base": "0/1", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/1000", "start_pts": 0, "start_time": "0:00:00.000000", "duration_ts": 2696704, "duration": "0:44:56.704000", "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "LANGUAGE": "ara", "BPS": "52", "DURATION": "00:44:16.953000000", "NUMBER_OF_FRAMES": "633", "NUMBER_OF_BYTES": "17309", "_STATISTICS_WRITING_APP": "mkvpropedit v56.1.0 ('My Friend') 64-bit", "_STATISTICS_WRITING_DATE_UTC": "2021-05-04 20:01:51", "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES" } }, { "index": 3, "codec_name": "ass", "codec_long_name": "ASS (Advanced SSA) subtitle", "codec_type": "subtitle", "codec_time_base": "0/1", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/1000", "start_pts": 0, "start_time": "0:00:00.000000", "duration_ts": 2696704, "duration": "0:44:56.704000", "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "LANGUAGE": "dan", "BPS": "67", "DURATION": "00:44:04.904000000", "NUMBER_OF_FRAMES": "375", "NUMBER_OF_BYTES": "22318", "_STATISTICS_WRITING_APP": "mkvpropedit v56.1.0 ('My Friend') 64-bit", "_STATISTICS_WRITING_DATE_UTC": "2021-05-04 20:01:51", "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES" } }, { "index": 4, "codec_name": "ass", "codec_long_name": "ASS (Advanced SSA) subtitle", "codec_type": "subtitle", "codec_time_base": "0/1", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/1000", "start_pts": 0, "start_time": "0:00:00.000000", "duration_ts": 2696704, "duration": "0:44:56.704000", "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "LANGUAGE": "dut", "BPS": "68", "DURATION": "00:44:05.016000000", "NUMBER_OF_FRAMES": "357", "NUMBER_OF_BYTES": "22698", "_STATISTICS_WRITING_APP": "mkvpropedit v56.1.0 ('My Friend') 64-bit", "_STATISTICS_WRITING_DATE_UTC": "2021-05-04 20:01:51", "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES" } }, { "index": 5, "codec_name": "ass", "codec_long_name": "ASS (Advanced SSA) subtitle", "codec_type": "subtitle", "codec_time_base": "0/1", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/1000", "start_pts": 0, "start_time": "0:00:00.000000", "duration_ts": 2696704, "duration": "0:44:56.704000", "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "LANGUAGE": "eng", "BPS": "86", "DURATION": "00:42:26.950000000", "NUMBER_OF_FRAMES": "538", "NUMBER_OF_BYTES": "27436", "_STATISTICS_WRITING_APP": "mkvpropedit v56.1.0 ('My Friend') 64-bit", "_STATISTICS_WRITING_DATE_UTC": "2021-05-04 20:01:51", "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES" } }, { "index": 6, "codec_name": "ass", "codec_long_name": "ASS (Advanced SSA) subtitle", "codec_type": "subtitle", "codec_time_base": "0/1", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/1000", "start_pts": 0, "start_time": "0:00:00.000000", "duration_ts": 2696704, "duration": "0:44:56.704000", "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "LANGUAGE": "fre", "BPS": "110", "DURATION": "00:42:46.719000000", "NUMBER_OF_FRAMES": "614", "NUMBER_OF_BYTES": "35540", "_STATISTICS_WRITING_APP": "mkvpropedit v56.1.0 ('My Friend') 64-bit", "_STATISTICS_WRITING_DATE_UTC": "2021-05-04 20:01:51", "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES" } }, { "index": 7, "codec_name": "ass", "codec_long_name": "ASS (Advanced SSA) subtitle", "codec_type": "subtitle", "codec_time_base": "0/1", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/1000", "start_pts": 0, "start_time": "0:00:00.000000", "duration_ts": 2696704, "duration": "0:44:56.704000", "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "LANGUAGE": "ger", "BPS": "106", "DURATION": "00:42:26.746000000", "NUMBER_OF_FRAMES": "618", "NUMBER_OF_BYTES": "33788", "_STATISTICS_WRITING_APP": "mkvpropedit v56.1.0 ('My Friend') 64-bit", "_STATISTICS_WRITING_DATE_UTC": "2021-05-04 20:01:51", "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES" } }, { "index": 8, "codec_name": "ass", "codec_long_name": "ASS (Advanced SSA) subtitle", "codec_type": "subtitle", "codec_time_base": "0/1", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/1000", "start_pts": 0, "start_time": "0:00:00.000000", "duration_ts": 2696704, "duration": "0:44:56.704000", "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "LANGUAGE": "per", "BPS": "0", "DURATION": "00:00:00.000000000", "NUMBER_OF_FRAMES": "0", "NUMBER_OF_BYTES": "0", "_STATISTICS_WRITING_APP": "mkvpropedit v56.1.0 ('My Friend') 64-bit", "_STATISTICS_WRITING_DATE_UTC": "2021-05-04 20:01:51", "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES" } }, { "index": 9, "codec_name": "ass", "codec_long_name": "ASS (Advanced SSA) subtitle", "codec_type": "subtitle", "codec_time_base": "0/1", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/1000", "start_pts": 0, "start_time": "0:00:00.000000", "duration_ts": 2696704, "duration": "0:44:56.704000", "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "LANGUAGE": "spa", "BPS": "103", "DURATION": "00:42:46.719000000", "NUMBER_OF_FRAMES": "614", "NUMBER_OF_BYTES": "33286", "_STATISTICS_WRITING_APP": "mkvpropedit v56.1.0 ('My Friend') 64-bit", "_STATISTICS_WRITING_DATE_UTC": "2021-05-04 20:01:51", "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES" } }, { "index": 10, "codec_name": "ass", "codec_long_name": "ASS (Advanced SSA) subtitle", "codec_type": "subtitle", "codec_time_base": "0/1", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/1000", "start_pts": 0, "start_time": "0:00:00.000000", "duration_ts": 2696704, "duration": "0:44:56.704000", "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "LANGUAGE": "vie", "BPS": "0", "DURATION": "00:00:00.000000000", "NUMBER_OF_FRAMES": "0", "NUMBER_OF_BYTES": "0", "_STATISTICS_WRITING_APP": "mkvpropedit v56.1.0 ('My Friend') 64-bit", "_STATISTICS_WRITING_DATE_UTC": "2021-05-04 20:01:51", "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES" } } ], "format": { "filename": "Z:\\Videos\\Shows\\Heroes (2006)\\01x23 - How to Stop an Exploding Man.mkv", "nb_streams": 11, "nb_programs": 0, "format_name": "matroska,webm", "format_long_name": "Matroska / WebM", "start_time": "0:00:00.000000", "duration": "0:44:56.704000", "size": "369338385", "bit_rate": "1095673", "probe_score": 100, "tags": { "CREATION_TIME": "", "ENCODER": "Lavf55.12.0" } } } Handling general track Handling video track Handling audio track Invalid audio codec: 'HE-AAC' Invalid audio language: 'Surround' Handling subtitle track Handling subtitle track Handling subtitle track Handling subtitle track Handling subtitle track Handling subtitle track Handling subtitle track Handling subtitle track Handling subtitle track Knowit 0.4.0 found: { "path": "Z:\\Videos\\Shows\\Heroes (2006)\\01x23 - How to Stop an Exploding Man.mkv", "duration": "0:44:56", "size": "369.34 MB", "bit_rate": "1.1 Mbps", "container": "mkv", "video": [ { "id": 0, "width": "1920 pixel", "height": "1080 pixel", "scan_type": "Progressive", "aspect_ratio": "1.778", "pixel_aspect_ratio": "1.0", "resolution": "1080p", "frame_rate": "23.976 FPS", "codec": "H.265", "profile": "Main", "default": true } ], "audio": [ { "id": 1, "name": "Surround", "codec": "AAC", "profile": "High Efficiency", "channels_count": 6, "channels": "5.1", "sampling_rate": "48.0 KHz", "default": true } ], "subtitle": [ { "id": 2, "format": "ASS" }, { "id": 3, "format": "ASS" }, { "id": 4, "format": "ASS" }, { "id": 5, "format": "ASS" }, { "id": 6, "format": "ASS" }, { "id": 7, "format": "ASS" }, { "id": 8, "format": "ASS" }, { "id": 9, "format": "ASS" }, { "id": 10, "format": "ASS" } ], "provider": { "name": "ffmpeg", "version": { "B:\\Utilities\\ffmpeg-4.3.2-2021-02-02-essentials_build\\bin\\ffprobe.exe": "v4.3.2-2021-02-02-essentials_build-www.gyan.dev" } } } ```
Example 2 ``` PS Z:\> knowit --provider ffmpeg "Z:\Videos\Shows (Prospective)\Band of Brothers (2001)\01x01 - Currahee.mkv" --debug For: Z:\Videos\Shows (Prospective)\Band of Brothers (2001)\01x01 - Currahee.mkv Detected os: windows Detected os: windows FFmpeg cli detected: B:\Utilities\ffmpeg-4.3.2-2021-02-02-essentials_build\bin\ffprobe.exe v4.3.2-2021-02-02-essentials_build-www.gyan.dev Detected os: windows MkvMerge cli detected: C:\Program Files\MKVToolNix\mkvmerge.exe v56.1.0 Video 'Z:\\Videos\\Shows (Prospective)\\Band of Brothers (2001)\\01x01 - Currahee.mkv' scanned using ffmpeg 'B:\\Utilities\\ffmpeg-4.3.2-2021-02-02-essentials_build\\bin\\ffprobe.exe' has raw data: { "streams": [ { "index": 0, "codec_name": "hevc", "codec_long_name": "H.265 / HEVC (High Efficiency Video Coding)", "profile": "Main", "codec_type": "video", "codec_time_base": "1001/24000", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "width": 1920, "height": 1080, "coded_width": 1920, "coded_height": 1080, "closed_captions": 0, "has_b_frames": 2, "sample_aspect_ratio": "1:1", "display_aspect_ratio": "16:9", "pix_fmt": "yuv420p", "level": 120, "color_range": "tv", "color_space": "bt709", "color_transfer": "bt709", "color_primaries": "bt709", "refs": 1, "r_frame_rate": "24000/1001", "avg_frame_rate": "24000/1001", "time_base": "1/1000", "start_pts": 105, "start_time": "0:00:00.105000", "disposition": { "default": 1, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "BPS": "1500697", "DURATION": "01:13:14.056708333", "NUMBER_OF_FRAMES": "105352", "NUMBER_OF_BYTES": "824268753", "_STATISTICS_WRITING_APP": "mkvpropedit v56.1.0 ('My Friend') 64-bit", "_STATISTICS_WRITING_DATE_UTC": "2021-05-27 15:27:05", "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES" } }, { "index": 1, "codec_name": "aac", "codec_long_name": "AAC (Advanced Audio Coding)", "profile": "HE-AAC", "codec_type": "audio", "codec_time_base": "1/48000", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "sample_fmt": "fltp", "sample_rate": "48000", "channels": 6, "channel_layout": "5.1", "bits_per_sample": 0, "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/1000", "start_pts": 0, "start_time": "0:00:00.000000", "disposition": { "default": 1, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "title": "Surround", "LANGUAGE": "eng", "BPS": "256002", "DURATION": "01:13:12.106000000", "NUMBER_OF_FRAMES": "102941", "NUMBER_OF_BYTES": "140548779", "_STATISTICS_WRITING_APP": "mkvpropedit v56.1.0 ('My Friend') 64-bit", "_STATISTICS_WRITING_DATE_UTC": "2021-05-27 15:27:05", "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES" } }, { "index": 2, "codec_name": "hdmv_pgs_subtitle", "codec_long_name": "HDMV Presentation Graphic Stream subtitles", "codec_type": "subtitle", "codec_time_base": "0/1", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/1000", "start_pts": 0, "start_time": "0:00:00.000000", "duration_ts": 4394162, "duration": "1:13:14.162000", "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "LANGUAGE": "eng", "BPS": "30412", "DURATION": "01:13:02.712000000", "NUMBER_OF_FRAMES": "1518", "NUMBER_OF_BYTES": "16660969", "_STATISTICS_WRITING_APP": "mkvpropedit v56.1.0 ('My Friend') 64-bit", "_STATISTICS_WRITING_DATE_UTC": "2021-05-27 15:27:05", "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES" } } ], "format": { "filename": "Z:\\Videos\\Shows (Prospective)\\Band of Brothers (2001)\\01x01 - Currahee.mkv", "nb_streams": 3, "nb_programs": 0, "format_name": "matroska,webm", "format_long_name": "Matroska / WebM", "start_time": "0:00:00.000000", "duration": "1:13:14.162000", "size": "983004345", "bit_rate": "1789655", "probe_score": 100, "tags": { "ENCODER": "Lavf55.12.0" } } } Handling general track Handling video track Handling audio track Invalid audio codec: 'HE-AAC' Invalid audio language: 'Surround' Handling subtitle track Knowit 0.4.0 found: { "path": "Z:\\Videos\\Shows (Prospective)\\Band of Brothers (2001)\\01x01 - Currahee.mkv", "duration": "1:13:14", "size": "983.00 MB", "bit_rate": "1.8 Mbps", "container": "mkv", "video": [ { "id": 0, "width": "1920 pixel", "height": "1080 pixel", "scan_type": "Progressive", "aspect_ratio": "1.778", "pixel_aspect_ratio": "1.0", "resolution": "1080p", "frame_rate": "23.976 FPS", "codec": "H.265", "profile": "Main", "default": true } ], "audio": [ { "id": 1, "name": "Surround", "codec": "AAC", "profile": "High Efficiency", "channels_count": 6, "channels": "5.1", "sampling_rate": "48.0 KHz", "default": true } ], "subtitle": [ { "id": 2, "format": "PGS" } ], "provider": { "name": "ffmpeg", "version": { "B:\\Utilities\\ffmpeg-4.3.2-2021-02-02-essentials_build\\bin\\ffprobe.exe": "v4.3.2-2021-02-02-essentials_build-www.gyan.dev" } } } ```

ffprobe is supplying the language.

ratoaq2 commented 3 years ago

Ok, they provide the language in a separate tags structure. Thanks for the info

bpoxy commented 3 years ago
It works in other cases where the language is in a separate tags structure though... ``` C:\Users\User>knowit --provider=ffmpeg "Z:\Videos\Shows\Anger Management (2012)\01x03 - Charlie Tries Sleep Deprivation.mkv" --debug For: Z:\Videos\Shows\Anger Management (2012)\01x03 - Charlie Tries Sleep Deprivation.mkv Detected os: windows Detected os: windows FFmpeg cli detected: B:\Utilities\ffmpeg-4.3.2-2021-02-02-essentials_build\bin\ffprobe.exe v4.3.2-2021-02-02-essentials_build-www.gyan.dev Detected os: windows MkvMerge cli detected: C:\Program Files\MKVToolNix\mkvmerge.exe v56.1.0 Video 'Z:\\Videos\\Shows\\Anger Management (2012)\\01x03 - Charlie Tries Sleep Deprivation.mkv' scanned using ffmpeg 'B:\\Utilities\\ffmpeg-4.3.2-2021-02-02-essentials_build\\bin\\ffprobe.exe' has raw data: { "streams": [ { "index": 0, "codec_name": "h264", "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10", "profile": "High", "codec_type": "video", "codec_time_base": "1001/48000", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "width": 1920, "height": 1080, "coded_width": 1920, "coded_height": 1088, "closed_captions": 0, "has_b_frames": 2, "sample_aspect_ratio": "1:1", "display_aspect_ratio": "16:9", "pix_fmt": "yuv420p", "level": 41, "chroma_location": "left", "field_order": "progressive", "refs": 1, "is_avc": "true", "nal_length_size": "4", "r_frame_rate": "24000/1001", "avg_frame_rate": "24000/1001", "time_base": "1/1000", "start_pts": 0, "start_time": "0:00:00.000000", "bits_per_raw_sample": "8", "disposition": { "default": 1, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "language": "eng", "title": "X264" } }, { "index": 1, "codec_name": "dts", "codec_long_name": "DCA (DTS Coherent Acoustics)", "profile": "DTS", "codec_type": "audio", "codec_time_base": "1/48000", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "sample_fmt": "fltp", "sample_rate": "48000", "channels": 6, "channel_layout": "5.1(side)", "bits_per_sample": 0, "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/1000", "start_pts": 0, "start_time": "0:00:00.000000", "bit_rate": "1536000", "disposition": { "default": 1, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "language": "eng", "title": "DTS" } }, { "index": 2, "codec_name": "subrip", "codec_long_name": "SubRip subtitle", "codec_type": "subtitle", "codec_time_base": "0/1", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/1000", "start_pts": 0, "start_time": "0:00:00.000000", "duration_ts": 1291126, "duration": "0:21:31.126000", "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "language": "eng", "title": "English" } }, { "index": 3, "codec_name": "subrip", "codec_long_name": "SubRip subtitle", "codec_type": "subtitle", "codec_time_base": "0/1", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/1000", "start_pts": 0, "start_time": "0:00:00.000000", "duration_ts": 1291126, "duration": "0:21:31.126000", "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "language": "eng", "title": "English 2" } } ], "format": { "filename": "Z:\\Videos\\Shows\\Anger Management (2012)\\01x03 - Charlie Tries Sleep Deprivation.mkv", "nb_streams": 4, "nb_programs": 0, "format_name": "matroska,webm", "format_long_name": "Matroska / WebM", "start_time": "0:00:00.000000", "duration": "0:21:31.126000", "size": "1563630953", "bit_rate": "9688479", "probe_score": 100, "tags": { "encoder": "libebml v1.3.0 + libmatroska v1.4.0", "creation_time": "1970-01-01T00:00:01.357218Z" } } } Handling general track Handling video track Skipping rule language since property is already present: Handling audio track Skipping rule language since property is already present: Handling subtitle track Skipping rule language since property is already present: Handling subtitle track Skipping rule language since property is already present: Knowit 0.4.0 found: { "path": "Z:\\Videos\\Shows\\Anger Management (2012)\\01x03 - Charlie Tries Sleep Deprivation.mkv", "duration": "0:21:31", "size": "1.56 GB", "bit_rate": "9.7 Mbps", "container": "mkv", "video": [ { "id": 0, "name": "X264", "language": "English", "width": "1920 pixel", "height": "1080 pixel", "scan_type": "Progressive", "aspect_ratio": "1.778", "pixel_aspect_ratio": "1.0", "resolution": "1080p", "frame_rate": "23.976 FPS", "bit_depth": "8 bit", "codec": "H.264", "profile": "High", "default": true } ], "audio": [ { "id": 1, "name": "DTS", "language": "English", "codec": "DTS", "channels_count": 6, "channels": "5.1", "bit_rate": "1.5 Mbps", "sampling_rate": "48.0 KHz", "default": true } ], "subtitle": [ { "id": 2, "name": "English", "language": "English", "format": "SubRip" }, { "id": 3, "name": "English 2", "language": "English", "format": "SubRip" } ], "provider": { "name": "ffmpeg", "version": { "B:\\Utilities\\ffmpeg-4.3.2-2021-02-02-essentials_build\\bin\\ffprobe.exe": "v4.3.2-2021-02-02-essentials_build-www.gyan.dev" } } } ```

What is the difference between this one that works and those (previously described) that don't?

ratoaq2 commented 3 years ago

LANGUAGE and language