metadata for audio titles dropped in output

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
wgf_bean
Posts: 29
Joined: Thu May 09, 2013 6:32 pm

metadata for audio titles dropped in output

Post by wgf_bean »

Description of problem or question:
When encoding the output (using x265) to MKV file, the metadata for the name of the audio tracks are not copied through from the source. For example the original file has 2 audio tracks titled: "TV Broadcast" and "98.5 Radio Broadcast". These labels are not seen in the output mkv file when viewed with either a player (I use MPC-HC 64) or opened with MKVToolNix GUI.

Currently I run a post process using MKVToolNix GUI to manually replace the lost title strings.

Can this be fixed? Perhaps I'm doing something wrong.

HandBrake version (e.g., 1.0.0):
HandBrake Nightly 20180909191723-09ed0b5-master (2018091201)

Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
OS: Microsoft Windows NT 6.1.7601 Service Pack 1

HandBrake Activity Log
You can see in the log file that handbrake sees the title strings. But it's not passing them to the output file.

Code: Select all

HandBrake Nightly 20180909191723-09ed0b5-master (2018091201)
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
Ram: 16281 MB, 
GPU Information:
  Intel(R) HD Graphics 4000 - 10.18.10.5059
Screen: 1920x1080
Temp Dir: C:\Users\Bob\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake Nightly
Data Dir: C:\Users\Bob\AppData\Roaming\HandBrake\Nightly

-------------------------------------------


# Starting Encode ...

[16:28:34] hb_init: starting libhb thread
[16:28:34] 1 job(s) to process
[16:28:34] json job:
{
  "Audio": {
    "AudioList": [
      {
        "DRC": 0.0,
        "Encoder": "copy",
        "Gain": 0.0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 48000,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:dtshd",
      "copy:dts",
      "copy:eac3",
      "copy:flac",
      "copy:mp3",
      "copy:truehd"
    ],
    "FallbackEncoder": "ac3"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      },
      {
        "Name": "Chapter 2"
      },
      {
        "Name": "Chapter 3"
      },
      {
        "Name": "Chapter 4"
      },
      {
        "Name": "Chapter 5"
      },
      {
        "Name": "Chapter 6"
      },
      {
        "Name": "Chapter 7"
      },
      {
        "Name": "Chapter 8"
      },
      {
        "Name": "Chapter 9"
      },
      {
        "Name": "Chapter 10"
      },
      {
        "Name": "Chapter 11"
      },
      {
        "Name": "Chapter 12"
      },
      {
        "Name": "Chapter 13"
      },
      {
        "Name": "Chapter 14"
      },
      {
        "Name": "Chapter 15"
      },
      {
        "Name": "Chapter 16"
      },
      {
        "Name": "Chapter 17"
      },
      {
        "Name": "Chapter 18"
      },
      {
        "Name": "Chapter 19"
      },
      {
        "Name": "Chapter 20"
      },
      {
        "Name": "Chapter 21"
      },
      {
        "Name": "Chapter 22"
      },
      {
        "Name": "Chapter 23"
      },
      {
        "Name": "Chapter 24"
      },
      {
        "Name": "Chapter 25"
      },
      {
        "Name": "Chapter 26"
      },
      {
        "Name": "Chapter 27"
      },
      {
        "Name": "Chapter 28"
      },
      {
        "Name": "Chapter 29"
      },
      {
        "Name": "Chapter 30"
      },
      {
        "Name": "Chapter 31"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "I:\\Handbrake\\Patriots s2018e09 (Green Bay Packers at New England Patriots with 98.5 Radio Broadcast) 2018-11-04-1-cq26-x265-med_preview.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "mkv"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 4,
        "Settings": {
          "mode": "23"
        }
      },
      {
        "ID": 3,
        "Settings": {
          "block-height": "16",
          "block-thresh": "40",
          "block-width": "16",
          "filter-mode": "2",
          "mode": "3",
          "motion-thresh": "1",
          "spatial-metric": "2",
          "spatial-thresh": "1"
        }
      },
      {
        "ID": 11,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "4",
          "height": "1076",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1",
          "rate": "27000000/450450"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "preview",
      "Start": 1,
      "End": 450000,
      "SeekPoints": 60
    },
    "Title": 1,
    "Path": "I:\\All\\Series 2\\Patriots\\2018\\Patriots s2018e09 (Green Bay Packers at New England Patriots with 98.5 Radio Broadcast) 2018-11-04.mkv"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": [
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 1,
        "Offset": 0,
        "Track": 0
      }
    ]
  },
  "Video": {
    "Encoder": "x265",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Preset": "medium",
    "Quality": 26.0,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[16:28:34] CPU: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz
[16:28:34]  - Intel microarchitecture Ivy Bridge
[16:28:34]  - logical processor count: 4
[16:28:34] Intel Quick Sync Video support: yes
[16:28:34]  - Intel Media SDK hardware: API 1.11 (minimum: 1.3)
[16:28:34]  - H.264 encoder: yes
[16:28:34]     - preferred implementation: hardware (any) via D3D11
[16:28:34]     - capabilities (hardware):  vsinfo opt1 opt2+extbrc+ib_adapt+nmpslice
[16:28:34]  - H.265 encoder: no
[16:28:34] hb_scan: path=I:\All\Series 2\Patriots\2018\Patriots s2018e09 (Green Bay Packers at New England Patriots with 98.5 Radio Broadcast) 2018-11-04.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image I:\All\Series 2\Patriots\2018\Patriots s2018e09 (Green Bay Packers at New England Patriots with 98.5 Radio Broadcast) 2018-11-04.mkv
src/libbluray/disc/disc.c:424: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:424: error opening file BDMV\BACKUP\index.bdmv
[16:28:34] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.0
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[16:28:34] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'I:\All\Series 2\Patriots\2018\Patriots s2018e09 (Green Bay Packers at New England Patriots with 98.5 Radio Broadcast) 2018-11-04.mkv':
  Metadata:
    creation_time   : 2018-11-06T17:38:00.000000Z
    ENCODER         : VideoReDo (Lavf56.25.101)
  Duration: 02:43:22.19, start: 0.033000, bitrate: 13488 kb/s
    Chapter #0:0: start 0.000000, end 225.158267
    Metadata:
      title           : Chapter 1
    Chapter #0:1: start 225.158267, end 468.367901
    Metadata:
      title           : Chapter 2
    Chapter #0:2: start 468.367901, end 999.898901
    Metadata:
      title           : Chapter 3
    Chapter #0:3: start 999.898901, end 1742.207135
    Metadata:
      title           : Chapter 4
    Chapter #0:4: start 1742.207135, end 1980.912269
    Metadata:
      title           : Chapter 5
    Chapter #0:5: start 1980.912269, end 2350.715036
    Metadata:
      title           : Chapter 6
    Chapter #0:6: start 2350.715036, end 2438.569469
    Metadata:
      title           : Chapter 7
    Chapter #0:7: start 2438.569469, end 2622.720103
    Metadata:
      title           : Chapter 8
    Chapter #0:8: start 2622.720103, end 2865.596070
    Metadata:
      title           : Chapter 9
    Chapter #0:9: start 2865.596070, end 3034.264570
    Metadata:
      title           : Chapter 10
    Chapter #0:10: start 3034.264570, end 3677.974304
    Metadata:
      title           : Chapter 11
    Chapter #0:11: start 3677.974304, end 4058.921537
    Metadata:
      title           : Chapter 12
    Chapter #0:12: start 4058.921537, end 4119.215104
    Metadata:
      title           : Chapter 13
    Chapter #0:13: start 4119.215104, end 4586.281705
    Metadata:
      title           : Chapter 14
    Chapter #0:14: start 4586.281705, end 4694.790105
    Metadata:
      title           : Chapter 15
    Chapter #0:15: start 4694.790105, end 4925.020105
    Metadata:
      title           : Chapter 16
    Chapter #0:16: start 4925.020105, end 5272.333739
    Metadata:
      title           : Chapter 17
    Chapter #0:17: start 5272.333739, end 5818.846372
    Metadata:
      title           : Chapter 18
    Chapter #0:18: start 5818.846372, end 6208.936073
    Metadata:
      title           : Chapter 19
    Chapter #0:19: start 6208.936073, end 7004.797807
    Metadata:
      title           : Chapter 20
    Chapter #0:20: start 7004.797807, end 7448.274174
    Metadata:
      title           : Chapter 21
    Chapter #0:21: start 7448.274174, end 7660.519541
    Metadata:
      title           : Chapter 22
    Chapter #0:22: start 7660.519541, end 7827.152674
    Metadata:
      title           : Chapter 23
    Chapter #0:23: start 7827.152674, end 8387.145442
    Metadata:
      title           : Chapter 24
    Chapter #0:24: start 8387.145442, end 8860.618442
    Metadata:
      title           : Chapter 25
    Chapter #0:25: start 8860.618442, end 9036.060376
    Metadata:
      title           : Chapter 26
    Chapter #0:26: start 9036.060376, end 9130.087642
    Metadata:
      title           : Chapter 27
    Chapter #0:27: start 9130.087642, end 9228.686142
    Metadata:
      title           : Chapter 28
    Chapter #0:28: start 9228.686142, end 9565.188976
    Metadata:
      title           : Chapter 29
    Chapter #0:29: start 9565.188976, end 9713.303610
    Metadata:
      title           : Chapter 30
    Chapter #0:30: start 9713.303610, end 9802.235559
    Metadata:
      title           : Chapter 31
    Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, top first), 1920x1080 [SAR 1:1 DAR 16:9], Closed Captions, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
    Metadata:
      BPS-eng         : 13006242
      DURATION-eng    : 02:43:22.092000000
      NUMBER_OF_FRAMES-eng: 293131
      NUMBER_OF_BYTES-eng: 15936048304
      _STATISTICS_WRITING_APP-eng: mkvmerge v26.0.0 ('In The Game') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-11-06 17:38:00
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
    Metadata:
      title           : TV Broadcast
      LANGUAGE        : eng
      BPS-eng         : 384000
      DURATION-eng    : 02:43:22.144000000
      NUMBER_OF_FRAMES-eng: 306317
      NUMBER_OF_BYTES-eng: 470502912
      _STATISTICS_WRITING_APP-eng: mkvmerge v26.0.0 ('In The Game') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-11-06 17:38:00
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2(eng): Audio: ac3, 48000 Hz, mono, fltp, 96 kb/s
    Metadata:
      title           : 98.5 Radio Broadcast
      LANGUAGE        : eng
      BPS-eng         : 96000
      DURATION-eng    : 02:43:22.176000000
      NUMBER_OF_FRAMES-eng: 306318
      NUMBER_OF_BYTES-eng: 117626112
      _STATISTICS_WRITING_APP-eng: mkvmerge v26.0.0 ('In The Game') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-11-06 17:38:00
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[16:28:35] scan: decoding previews for title 1
[16:28:35] scan: audio 0x1: ac3, rate=48000Hz, bitrate=384000 English (AC3) (5.1 ch)
[16:28:35] scan: audio 0x2: ac3, rate=48000Hz, bitrate=96000 English (AC3) (1.0 ch)
[16:28:35] scan: 10 previews, 1920x1080, 29.970 fps, autocrop = 2/0/0/0, aspect 16:9, PAR 1:1
[16:28:35] Title is likely interlaced or telecined (5 out of 10 previews). You should do something about that.
[16:28:35] libhb: scan thread found 1 valid title(s)
[16:28:35] starting job
[16:28:35] decomb filter thread started for segment 0
[16:28:35] decomb filter thread started for segment 1
[16:28:35] decomb filter thread started for segment 2
[16:28:35] decomb filter thread started for segment 3
[16:28:35] decomb check thread started for segment 0
[16:28:35] decomb check thread started for segment 1
[16:28:35] decomb check thread started for segment 2
[16:28:35] decomb check thread started for segment 3
[16:28:35] mask filter thread started for segment 0
[16:28:35] mask filter thread started for segment 1
[16:28:35] mask filter thread started for segment 2
[16:28:35] mask filter thread started for segment 3
[16:28:35] mask erode thread started for segment 0
[16:28:35] mask erode thread started for segment 1
[16:28:35] mask erode thread started for segment 2
[16:28:35] mask erode thread started for segment 3
[16:28:35] mask dilate thread started for segment 0
[16:28:35] mask dilate thread started for segment 1
[16:28:35] mask dilate thread started for segment 2
[16:28:35] mask dilate thread started for segment 3
[16:28:35] yadif thread started for segment 0
[16:28:35] yadif thread started for segment 1
[16:28:35] yadif thread started for segment 2
[16:28:35] yadif thread started for segment 3
[16:28:35] Auto Passthru: allowed codecs are AAC, AC3, E-AC3, TrueHD, DTS, DTS-HD, MP3, FLAC
[16:28:35] Auto Passthru: fallback is AC3
[16:28:35] Auto Passthru: using AC3 Passthru for track 1
[16:28:35] job configuration:
[16:28:35]  * source
[16:28:35]    + I:\All\Series 2\Patriots\2018\Patriots s2018e09 (Green Bay Packers at New England Patriots with 98.5 Radio Broadcast) 2018-11-04.mkv
[16:28:35]    + title 1, start 00:00:0.00 stop 00:00:5.00
[16:28:35]    + container: matroska,webm
[16:28:35]    + data rate: 13488 kbps
[16:28:35]  * destination
[16:28:35]    + I:\Handbrake\Patriots s2018e09 (Green Bay Packers at New England Patriots with 98.5 Radio Broadcast) 2018-11-04-1-cq26-x265-med_preview.mkv
[16:28:35]    + container: Matroska (libavformat)
[16:28:35]      + chapter markers
[16:28:35]  * video track
[16:28:35]    + decoder: mpeg2video
[16:28:35]    + filters
[16:28:35]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[16:28:35]      + Decomb (mode=55)
[16:28:35]      + Framerate Shaper (mode=1:rate=27000000/450450)
[16:28:35]        + frame rate: 29.970 fps -> constant 59.940 fps
[16:28:35]      + Crop and Scale (width=1920:height=1076:crop-top=4:crop-bottom=0:crop-left=0:crop-right=0)
[16:28:35]        + source: 1920 * 1080, crop (4/0/0/0): 1920 * 1076, scale: 1920 * 1076
[16:28:35]    + Output geometry
[16:28:35]      + storage dimensions: 1920 x 1076
[16:28:35]      + pixel aspect ratio: 1 : 1
[16:28:35]      + display dimensions: 1920 x 1076
[16:28:35]    + encoder: H.265 (libx265)
[16:28:35]      + preset:  medium
[16:28:35]      + quality: 26.00 (RF)
[16:28:35]      + color profile: 1-1-1
[16:28:35]  * subtitle track 1, English, Closed Caption [CC608] (track 0, id 0x0, Text) -> Passthrough
[16:28:35]  * audio track 1
[16:28:35]    + decoder: English (AC3) (5.1 ch) (track 1, id 0x1)
[16:28:35]      + bitrate: 384 kbps, samplerate: 48000 Hz
[16:28:35]    + AC3 Passthru
[16:28:35] sync: expecting 179 video frames
x265 [info]: HEVC encoder version 2.8
x265 [info]: build info [Windows][GCC 7.1.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x265 [info]: Main profile, Level-4.1 (Main tier)
x265 [info]: Thread pool created using 4 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 2 / wpp(17 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 60 / 600 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 3 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-26.0 / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 rskip signhide tmvp strong-intra-smoothing
x265 [info]: tools: lslices=6 deblock sao
[16:28:35] sync: first pts video is 0
[16:28:35] sync: "Chapter 1" (1) at frame 1 time 0
[16:28:35] sync: first pts audio 0x1 is 1080
[16:28:38] sync: first pts subtitle 0x0 is 90090
[16:28:54] sync: reached audio 0x1 pts 450360, exiting early
[16:28:54] sync: reached video pts 450450, exiting early
[16:29:08] work: average encoding speed for job is 8.149914 fps
[16:29:08] comb detect: heavy 149 | light 0 | uncombed 1 | total 150
[16:29:08] decomb: deinterlaced 298 | blended 0 | unfiltered 1 | total 299
[16:29:08] vfr: 300 frames output, 0 dropped and 1 duped for CFR/PFR
[16:29:08] vfr: lost time: 0 (0 frames)
[16:29:08] vfr: gained time: 0 (0 frames) (0 not accounted for)
[16:29:09] ac3-decoder done: 4267 frames, 0 decoder errors
[16:29:09] mpeg2video-decoder done: 4054 frames, 0 decoder errors
[16:29:09] sync: got 150 frames, 179 expected
[16:29:09] sync: framerate min 29.970 fps, max 29.970 fps, avg 29.970 fps
x265 [info]: frame I:      1, Avg QP:28.82  kb/s: 48084.40
x265 [info]: frame P:     68, Avg QP:29.76  kb/s: 7235.60
x265 [info]: frame B:    231, Avg QP:36.38  kb/s: 737.46
x265 [info]: Weighted P-Frames: Y:1.5% UV:1.5%
x265 [info]: consecutive B-frames: 2.9% 1.4% 0.0% 49.3% 46.4%
encoded 300 frames in 33.54s (8.94 fps), 2368.20 kb/s, Avg QP:34.85
[16:29:09] mux: track 0, 300 frames, 1482804 bytes, 2370.12 kbps, fifo 512
[16:29:09] mux: track 1, 156 frames, 239616 bytes, 383.00 kbps, fifo 256
[16:29:09] mux: track 2, 2 frames, 178 bytes, 0.28 kbps, fifo 8
[16:29:09] libhb: work result = 0

# Encode Completed ...

mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: metadata for audio titles dropped in output

Post by mduell »

Feature requests go on github.

I don't think HB aspires to pass through every possible tag, or be a tag editor, but that's just my opinion.
wgf_bean
Posts: 29
Joined: Thu May 09, 2013 6:32 pm

Re: metadata for audio titles dropped in output

Post by wgf_bean »

mduell wrote: Wed Dec 19, 2018 5:24 pm Feature requests go on github.
where/how?
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: metadata for audio titles dropped in output

Post by rollin_eng »

wgf_bean
Posts: 29
Joined: Thu May 09, 2013 6:32 pm

Re: metadata for audio titles dropped in output

Post by wgf_bean »

Thanks. After looking on github, this has already been requested multiple times.

Would be very nice to see this get done. Note that if I use ffmpeg directly, it doesn't have a problem. It correctly copies the metadata including the names of the audio tracks. It seems like a relatively "easy" fix. But then again I've never looked under the hood of Handbrake to know.
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: metadata for audio titles dropped in output

Post by Woodstock »

Patches are welcome.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: metadata for audio titles dropped in output

Post by mduell »

Patches with credible claims for ongoing support are doubly welcome.
Post Reply