MediaArea / MediaInfo

Convenient unified display of the most relevant technical and tag data for video and audio files.
https://MediaArea.net/MediaInfo
BSD 2-Clause "Simplified" License
1.32k stars 158 forks source link

Show the following matroska flags: hearing-impaired (SDH) (for subs), commentary (for audios) #772

Open pcroland opened 10 months ago

pcroland commented 10 months ago

Currently mediainfo doesn't report these flags (even with --full).

JeromeMartinez commented 10 months ago

Please a sample file.

pcroland commented 10 months ago

Sample: https://envs.sh/uRP.mkv ffprobe -v quiet -print_format json -show_format -show_streams sample.mkv | jq:

{
  "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_tag_string": "[0][0][0][0]",
      "codec_tag": "0x0000",
      "width": 854,
      "height": 428,
      "coded_width": 854,
      "coded_height": 428,
      "closed_captions": 0,
      "film_grain": 0,
      "has_b_frames": 2,
      "sample_aspect_ratio": "1:1",
      "display_aspect_ratio": "427:214",
      "pix_fmt": "yuv420p",
      "level": 41,
      "color_range": "tv",
      "color_space": "bt709",
      "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.000000",
      "bits_per_raw_sample": "8",
      "extradata_size": 47,
      "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,
        "captions": 0,
        "descriptions": 0,
        "metadata": 0,
        "dependent": 0,
        "still_image": 0
      },
      "tags": {
        "language": "eng",
        "BPS": "1819588",
        "DURATION": "00:01:54.823000000",
        "NUMBER_OF_FRAMES": "2753",
        "NUMBER_OF_BYTES": "26116324",
        "_STATISTICS_WRITING_APP": "mkvmerge v80.0 ('Roundabout') 64-bit",
        "_STATISTICS_WRITING_DATE_UTC": "2023-11-06 17:30:59",
        "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES"
      }
    },
    {
      "index": 1,
      "codec_name": "aac",
      "codec_long_name": "AAC (Advanced Audio Coding)",
      "profile": "LC",
      "codec_type": "audio",
      "codec_tag_string": "[0][0][0][0]",
      "codec_tag": "0x0000",
      "sample_fmt": "fltp",
      "sample_rate": "48000",
      "channels": 2,
      "channel_layout": "stereo",
      "bits_per_sample": 0,
      "initial_padding": 0,
      "r_frame_rate": "0/0",
      "avg_frame_rate": "0/0",
      "time_base": "1/1000",
      "start_pts": 14,
      "start_time": "0.014000",
      "extradata_size": 2,
      "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,
        "captions": 0,
        "descriptions": 0,
        "metadata": 0,
        "dependent": 0,
        "still_image": 0
      },
      "tags": {
        "language": "hun",
        "BPS": "146010",
        "DURATION": "00:01:54.816000000",
        "NUMBER_OF_FRAMES": "5382",
        "NUMBER_OF_BYTES": "2095536",
        "_STATISTICS_WRITING_APP": "mkvmerge v80.0 ('Roundabout') 64-bit",
        "_STATISTICS_WRITING_DATE_UTC": "2023-11-06 17:30:59",
        "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES"
      }
    },
    {
      "index": 2,
      "codec_name": "aac",
      "codec_long_name": "AAC (Advanced Audio Coding)",
      "profile": "LC",
      "codec_type": "audio",
      "codec_tag_string": "[0][0][0][0]",
      "codec_tag": "0x0000",
      "sample_fmt": "fltp",
      "sample_rate": "48000",
      "channels": 2,
      "channel_layout": "stereo",
      "bits_per_sample": 0,
      "initial_padding": 0,
      "r_frame_rate": "0/0",
      "avg_frame_rate": "0/0",
      "time_base": "1/1000",
      "start_pts": 14,
      "start_time": "0.014000",
      "extradata_size": 2,
      "disposition": {
        "default": 1,
        "dub": 0,
        "original": 0,
        "comment": 1, # this is the commentary flag
        "lyrics": 0,
        "karaoke": 0,
        "forced": 0,
        "hearing_impaired": 0,
        "visual_impaired": 0,
        "clean_effects": 0,
        "attached_pic": 0,
        "timed_thumbnails": 0,
        "captions": 0,
        "descriptions": 0,
        "metadata": 0,
        "dependent": 0,
        "still_image": 0
      },
      "tags": {
        "language": "eng",
        "title": "Commentary",
        "BPS": "147056",
        "DURATION": "00:01:54.816000000",
        "NUMBER_OF_FRAMES": "5382",
        "NUMBER_OF_BYTES": "2110550",
        "_STATISTICS_WRITING_APP": "mkvmerge v80.0 ('Roundabout') 64-bit",
        "_STATISTICS_WRITING_DATE_UTC": "2023-11-06 17:30:59",
        "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES"
      }
    },
    {
      "index": 3,
      "codec_name": "subrip",
      "codec_long_name": "SubRip subtitle",
      "codec_type": "subtitle",
      "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.000000",
      "duration_ts": 118148,
      "duration": "118.148000",
      "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,
        "captions": 0,
        "descriptions": 0,
        "metadata": 0,
        "dependent": 0,
        "still_image": 0
      },
      "tags": {
        "language": "hun",
        "title": "Forced",
        "BPS": "31",
        "DURATION": "00:00:01.501000000",
        "NUMBER_OF_FRAMES": "1",
        "NUMBER_OF_BYTES": "6",
        "_STATISTICS_WRITING_APP": "mkvmerge v80.0 ('Roundabout') 64-bit",
        "_STATISTICS_WRITING_DATE_UTC": "2023-11-06 17:30:59",
        "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES"
      }
    },
    {
      "index": 4,
      "codec_name": "subrip",
      "codec_long_name": "SubRip subtitle",
      "codec_type": "subtitle",
      "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.000000",
      "duration_ts": 118148,
      "duration": "118.148000",
      "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,
        "captions": 0,
        "descriptions": 0,
        "metadata": 0,
        "dependent": 0,
        "still_image": 0
      },
      "tags": {
        "language": "hun",
        "BPS": "36",
        "DURATION": "00:01:48.150000000",
        "NUMBER_OF_FRAMES": "22",
        "NUMBER_OF_BYTES": "492",
        "_STATISTICS_WRITING_APP": "mkvmerge v80.0 ('Roundabout') 64-bit",
        "_STATISTICS_WRITING_DATE_UTC": "2023-11-06 17:30:59",
        "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES"
      }
    },
    {
      "index": 5,
      "codec_name": "subrip",
      "codec_long_name": "SubRip subtitle",
      "codec_type": "subtitle",
      "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.000000",
      "duration_ts": 118148,
      "duration": "118.148000",
      "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,
        "captions": 0,
        "descriptions": 0,
        "metadata": 0,
        "dependent": 0,
        "still_image": 0
      },
      "tags": {
        "language": "eng",
        "BPS": "59",
        "DURATION": "00:00:56.492000000",
        "NUMBER_OF_FRAMES": "16",
        "NUMBER_OF_BYTES": "420",
        "_STATISTICS_WRITING_APP": "mkvmerge v80.0 ('Roundabout') 64-bit",
        "_STATISTICS_WRITING_DATE_UTC": "2023-11-06 17:30:59",
        "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES"
      }
    },
    {
      "index": 6,
      "codec_name": "subrip",
      "codec_long_name": "SubRip subtitle",
      "codec_type": "subtitle",
      "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.000000",
      "duration_ts": 118148,
      "duration": "118.148000",
      "disposition": {
        "default": 0,
        "dub": 0,
        "original": 0,
        "comment": 0,
        "lyrics": 0,
        "karaoke": 0,
        "forced": 0,
        "hearing_impaired": 1, # this is the hearing impaired/sdh flag
        "visual_impaired": 0,
        "clean_effects": 0,
        "attached_pic": 0,
        "timed_thumbnails": 0,
        "captions": 0,
        "descriptions": 0,
        "metadata": 0,
        "dependent": 0,
        "still_image": 0
      },
      "tags": {
        "language": "eng",
        "title": "SDH",
        "BPS": "39",
        "DURATION": "00:01:51.111000000",
        "NUMBER_OF_FRAMES": "23",
        "NUMBER_OF_BYTES": "545",
        "_STATISTICS_WRITING_APP": "mkvmerge v80.0 ('Roundabout') 64-bit",
        "_STATISTICS_WRITING_DATE_UTC": "2023-11-06 17:30:59",
        "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES"
      }
    }
  ],
  "format": {
    "filename": "/mnt/x/sample.mkv",
    "nb_streams": 7,
    "nb_programs": 0,
    "format_name": "matroska,webm",
    "format_long_name": "Matroska / WebM",
    "start_time": "0.000000",
    "duration": "118.148000",
    "size": "30377835",
    "bit_rate": "2056934",
    "probe_score": 100,
    "tags": {
      "title": "sample",
      "encoder": "libebml v1.4.4 + libmatroska v1.7.1",
      "creation_time": "2023-11-06T17:30:59.000000Z",
      "MOVIE/ENCODER": "qaac 2.71, CoreAudioToolbox 7.10.9.0, AAC-LC Encoder, TVBR q109, Quality 96"
    }
  }
}
JeromeMartinez commented 10 months ago

Oops, we forgot to support HI flag.

pcroland commented 10 months ago

And commentary flag from both audio and subtitle tracks too. Btw not just you, Bunkus also forgot to add support for mkvinfo.

JeromeMartinez commented 10 months ago

And commentary flag from both audio and subtitle tracks too.

Sample file please.

pokemaster974 commented 2 months ago

Hi, do we have any news about the support of theses flags ? Regards

JeromeMartinez commented 2 months ago

Hi, do we have any news about the support of theses flags ?

IIRC (but I may be wrong, sometimes I miss e.g. an email with private files) I was at:

Sample file please.

pokemaster974 commented 2 months ago

Hi, do we have any news about the support of theses flags ?

IIRC (but I may be wrong, sometimes I miss e.g. an email with private files) I was at:

Sample file please.

I can provide you this sample : https://1fichier.com/?8p5dx6tnausdezdl6csr First audio track is hearing_impaired, 2nd one is visual_impaired, 3rd one is comment Regards

{
    "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_tag_string": "[0][0][0][0]",
            "codec_tag": "0x0000",
            "width": 896,
            "height": 504,
            "coded_width": 896,
            "coded_height": 504,
            "closed_captions": 0,        
            "film_grain": 0,
            "has_b_frames": 3,
            "sample_aspect_ratio": "1:1",
            "display_aspect_ratio": "16:9",
            "pix_fmt": "yuvj420p",
            "level": 31,
            "color_range": "pc",
            "chroma_location": "left",     
            "field_order": "progressive",  
            "refs": 1,
            "is_avc": "true",
            "nal_length_size": "4",
            "r_frame_rate": "50/1",
            "avg_frame_rate": "50/1",
            "time_base": "1/1000",
            "start_pts": 0,
            "start_time": "0.000000",
            "bits_per_raw_sample": "8",
            "extradata_size": 54,
            "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,
                "non_diegetic": 0,
                "captions": 0,
                "descriptions": 0,
                "metadata": 0,
                "dependent": 0,
                "still_image": 0
            },
            "tags": {
                "language": "fre",
                "BPS": "2484555",
                "DURATION": "00:01:00.000000000",
                "NUMBER_OF_FRAMES": "3000",
                "NUMBER_OF_BYTES": "18634168",
                "_STATISTICS_WRITING_APP": "mkvmerge v83.0 ('Circle Of Friends') 64-bit",
                "_STATISTICS_WRITING_DATE_UTC": "2024-07-03 16:38:35",
                "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES"
            }
        },
        {
            "index": 1,
            "codec_name": "aac",
            "codec_long_name": "AAC (Advanced Audio Coding)",
            "codec_type": "audio",
            "codec_tag_string": "[0][0][0][0]",
            "codec_tag": "0x0000",
            "sample_fmt": "fltp",
            "sample_rate": "48000",
            "channels": 2,
            "channel_layout": "stereo",
            "bits_per_sample": 0,
            "initial_padding": 0,
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/1000",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 60010,
            "duration": "60.010000",
            "extradata_size": 2,
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 1,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0,
                "non_diegetic": 0,
                "captions": 0,
                "descriptions": 0,
                "metadata": 0,
                "dependent": 0,
                "still_image": 0
            },
            "tags": {
                "language": "fre",
                "BPS": "125428",
                "DURATION": "00:00:36.010000000",
                "NUMBER_OF_FRAMES": "1688",
                "NUMBER_OF_BYTES": "564586",
                "_STATISTICS_WRITING_APP": "mkvmerge v83.0 ('Circle Of Friends') 64-bit",
                "_STATISTICS_WRITING_DATE_UTC": "2024-07-03 16:38:35",
                "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES"
            }
        },
        {
            "index": 2,
            "codec_name": "aac",
            "codec_long_name": "AAC (Advanced Audio Coding)",
            "codec_type": "audio",
            "codec_tag_string": "[0][0][0][0]",
            "codec_tag": "0x0000",
            "sample_fmt": "fltp",
            "sample_rate": "48000",
            "channels": 2,
            "channel_layout": "stereo",
            "bits_per_sample": 0,
            "initial_padding": 0,
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/1000",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 60010,
            "duration": "60.010000",
            "extradata_size": 2,
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 1,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0,
                "non_diegetic": 0,
                "captions": 0,
                "descriptions": 0,
                "metadata": 0,
                "dependent": 0,
                "still_image": 0
            },
            "tags": {
                "language": "fre",
                "BPS": "125428",
                "DURATION": "00:00:36.010000000",
                "NUMBER_OF_FRAMES": "1688",
                "NUMBER_OF_BYTES": "564586",
                "_STATISTICS_WRITING_APP": "mkvmerge v83.0 ('Circle Of Friends') 64-bit",
                "_STATISTICS_WRITING_DATE_UTC": "2024-07-03 16:38:35",
                "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES"
            }
        },
        {
            "index": 3,
            "codec_name": "aac",
            "codec_long_name": "AAC (Advanced Audio Coding)",
            "codec_type": "audio",
            "codec_tag_string": "[0][0][0][0]",
            "codec_tag": "0x0000",
            "sample_fmt": "fltp",
            "sample_rate": "48000",
            "channels": 2,
            "channel_layout": "stereo",
            "bits_per_sample": 0,
            "initial_padding": 0,
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/1000",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 60010,
            "duration": "60.010000",
            "extradata_size": 2,
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 1,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0,
                "non_diegetic": 0,
                "captions": 0,
                "descriptions": 0,
                "metadata": 0,
                "dependent": 0,
                "still_image": 0
            },
            "tags": {
                "language": "fre",
                "BPS": "125428",
                "DURATION": "00:00:36.010000000",
                "NUMBER_OF_FRAMES": "1688",
                "NUMBER_OF_BYTES": "564586",
                "_STATISTICS_WRITING_APP": "mkvmerge v83.0 ('Circle Of Friends') 64-bit",
                "_STATISTICS_WRITING_DATE_UTC": "2024-07-03 16:38:35",
                "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES"
            }
        }
    ],
    "format": {
        "filename": "Sample (1).mkv",
        "nb_streams": 4,
        "nb_programs": 0,
        "nb_stream_groups": 0,
        "format_name": "matroska,webm",
        "format_long_name": "Matroska / WebM",
        "start_time": "0.000000",
        "duration": "60.010000",
        "size": "20368871",
        "bit_rate": "2715396",
        "probe_score": 100,
        "tags": {
            "encoder": "libebml v1.4.5 + libmatroska v1.7.1",
            "creation_time": "2024-07-03T16:38:35.000000Z"
        }
    }
}
pokemaster974 commented 2 months ago

Hi, do we have any news about the support of theses flags ?

IIRC (but I may be wrong, sometimes I miss e.g. an email with private files) I was at:

Sample file please.

I can provide you this sample : https://1fichier.com/?8p5dx6tnausdezdl6csr First audio track is hearing_impaired, 2nd one is visual_impaired, 3rd one is comment Regards

Is these sample ok for you @JeromeMartinez ?

JeromeMartinez commented 2 months ago

@pokemaster974 in the queue, I plan to check in a couple of days.

pokemaster974 commented 1 month ago

@pokemaster974 in the queue, I plan to check in a couple of days.

Hi, sorry to relaunch it, but is it yet on the planning ?