Wrong audio track ???

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
BernardL
Posts: 4
Joined: Thu Dec 06, 2018 4:50 pm

Wrong audio track ???

Post by BernardL »

Description of problem or question:
Initial goal: from .TS file(s) (1080p) recorded from digital TV programme; produce smaller .mp4 file, 720p, with two audio tracks: French (local) and English (original). Single TS file produced by straight concatenation of several 1Gb original files. Whatever I do, the HandBrake output audio tracks are all in French!

Minimal version. I used ffmpeg to create from the .ts file a .mp4 file with just one audio stream: English.
ffmpeg -i The_Misfits.ts -map 0:0 -map 0:4 -vcodec copy -acodec copy The_Misfits_ENonly.mp4
And then I use that as input to HandBrake. The role of HandBrake being to resize, decrease bitrate, de-interlace, and merge a .srt butitle file.

First check that this "ad hoc" input has just one audio stream:
ffmpeg -i The_Misfits_ENonly.mp4
(...)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'The_Misfits_ENonly.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
Duration: 02:10:20.90, start: 0.000000, bitrate: 5026 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 4891 kb/s, 25.14 fps, 25 tbr, 90k tbn,
50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(qaa): Audio: eac3 (ec-3 / 0x332D6365), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
Side data:
audio service type: main
  • Indeed, when played with VLC, there is just one audio available, and that is English.
  • When I run HandBrake, and ask for a 30-s preview (player VLC) result is as expected: one audio track, English (file is .mkv)
  • But!!! the output from HandBrake has one audio track, in French, as found playing with VLC the output file of HandBrake
Which raises two questions:
  • Why is HandBrake producing an output different from what is requested, and different from the Preview?
  • Where the hell did it get the French Audio track from?
Steps to reproduce the problem (If Applicable):
See above. Both the original .ts file and the restricted input The_Misfits_ENonly.mp4 are >5Gb, so I can hardly upload or attach them.

HandBrake version (e.g., 1.0.0):
1.1.0

Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
Win 7 Pro 64bit SP1
(just as bad on Win 10 Home Premium 32bit, and a 9.x HandBrake)
HandBrake Activity Log ***required*** (see How-to get an activity log)

Code: Select all

HandBrake 1.1.0 (2018040700) - 64bit
OS: Microsoft Windows NT 6.1.7601 Service Pack 1 - 64bit
CPU: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz
Ram: 8072 MB, 
GPU Information:
  Intel(R) HD Graphics Family - 8.15.10.2418
Screen: 1366x768
Temp Dir: C:\Users\Lazareff Bernard\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\Lazareff Bernard\AppData\Roaming\HandBrake Team\HandBrake\1.1.0.0

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


# Starting Encode ...

[22:07:25] hb_init: starting libhb thread
[22:07:25] 1 job(s) to process
[22:07:25] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0.0,
        "Encoder": 512,
        "Gain": 0.0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 48000,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 2048
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": true,
    "File": "F:\\Video\\TS\\The_Misfits_TestHB06.mp4",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 131072
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 4,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "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": "70",
          "crop-right": "70",
          "crop-top": "0",
          "height": "720",
          "width": "1186"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "0"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "time",
      "Start": 21600000,
      "End": 32400000
    },
    "Title": 1,
    "Path": "F:\\Video\\TS\\The_Misfits_ENonly.mp4"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": 65536,
    "Level": "3.1",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "fast",
    "Profile": "main",
    "Quality": 22.0,
    "HWDecode": false,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[22:07:25] CPU: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz
[22:07:25]  - Intel microarchitecture Sandy Bridge
[22:07:25]  - logical processor count: 4
[22:07:25] Intel Quick Sync Video support: no
[22:07:25] hb_scan: path=F:\Video\TS\The_Misfits_ENonly.mp4, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image F:\Video\TS\The_Misfits_ENonly.mp4
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
[22:07:25] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.3
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
[22:07:25] dvd: not a dvd - trying as a stream/file instead
[h264 @ 000000006680a980] mmco: unref short failure
[h264 @ 000000006680a980] mmco: unref short failure
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'F:\Video\TS\The_Misfits_ENonly.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100
  Duration: 02:10:21.75, start: 0.000000, bitrate: 5026 kb/s
    Stream #0:0(und): Video: h264 (High) [avc1 / 0x31637661]
      yuv420p, tv, bt709/bt709/bt709
      1920x1080 [PAR 1:1 DAR 16:9], 4891 kb/s, PAR 1:1 DAR 16:9
      25 fps, 90k tbn (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(qaa): Audio: eac3 [ec[45]3 / 0x332D6365]
      48000 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
    Side data:
      audio service type: main
[22:07:25] scan: decoding previews for title 1
[h264 @ 000000006680bac0] mmco: unref short failure
[h264 @ 000000006680bac0] mmco: unref short failure
[22:07:26] scan: audio 0x1: eac3, rate=48000Hz, bitrate=128000 Unknown (E-AC3) (2.0 ch) (Dolby Surround)
[22:07:28] scan: 10 previews, 1920x1080, 25.143 fps, autocrop = 0/0/70/70, aspect 16:9, PAR 1:1
[22:07:28] scan: supported video decoders: avcodec qsv
[22:07:28] libhb: scan thread found 1 valid title(s)
[22:07:28] Skipping subtitle scan.  No suitable subtitle tracks.
[22:07:28] starting job
[22:07:28] decomb filter thread started for segment 0
[22:07:28] decomb filter thread started for segment 1
[22:07:28] decomb filter thread started for segment 2
[22:07:28] decomb filter thread started for segment 3
[22:07:28] decomb check thread started for segment 1
[22:07:28] decomb check thread started for segment 0
[22:07:28] decomb check thread started for segment 2
[22:07:28] decomb check thread started for segment 3
[22:07:28] mask filter thread started for segment 0
[22:07:28] mask filter thread started for segment 1
[22:07:28] mask filter thread started for segment 2
[22:07:28] mask filter thread started for segment 3
[22:07:28] mask erode thread started for segment 0
[22:07:28] mask erode thread started for segment 1
[22:07:28] mask erode thread started for segment 2
[22:07:28] mask dilate thread started for segment 0
[22:07:28] mask dilate thread started for segment 1
[22:07:28] mask dilate thread started for segment 2
[22:07:28] mask erode thread started for segment 3
[22:07:28] work: compression level not specified, track 1 setting compression level 2.00
[22:07:28] work: track 1, dithering not supported by codec
[22:07:28] work: only 1 chapter, disabling chapter markers
[22:07:28] job configuration:
[22:07:28]  * source
[22:07:28]    + F:\Video\TS\The_Misfits_ENonly.mp4
[22:07:28]    + title 1, start 00:04:0.00 stop 00:06:0.00
[22:07:28]    + container: mov,mp4,m4a,3gp,3g2,mj2
[22:07:28]    + data rate: 5026 kbps
[22:07:28]  * destination
[22:07:28]    + F:\Video\TS\The_Misfits_TestHB06.mp4
[22:07:28]    + container: MPEG-4 (libavformat)
[22:07:28]      + align initial A/V stream timestamps
[22:07:28]  * video track
[22:07:28]    + decoder: h264
[22:07:28]      + bitrate 4891 kbps
[22:07:28]    + filters
[22:07:28]      + 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)
[22:07:28]      + Decomb (mode=39)
[22:07:28]      + Framerate Shaper (mode=0)
[22:07:28]        + frame rate: same as source (around 25.143 fps)
[22:07:28]      + Crop and Scale (width=1186:height=720:crop-top=0:crop-bottom=0:crop-left=70:crop-right=70)
[22:07:28]        + source: 1920 * 1080, crop (0/0/70/70): 1780 * 1080, scale: 1186 * 720
[22:07:28]    + Output geometry
[22:07:28]      + storage dimensions: 1186 x 720
[22:07:28]      + pixel aspect ratio: 1 : 1
[22:07:28]      + display dimensions: 1186 x 720
[22:07:28]    + encoder: H.264 (libx264)
[22:07:28]      + preset:  fast
[22:07:28]      + profile: main
[22:07:28]      + level:   3.1
[22:07:28]      + quality: 22.00 (RF)
[22:07:28]  * audio track 1
[22:07:28]    + decoder: Unknown (E-AC3) (2.0 ch) (Dolby Surround) (track 1, id 0x1)
[22:07:28]      + bitrate: 128 kbps, samplerate: 48000 Hz
[22:07:28]    + mixdown: Stereo
[22:07:28]    + encoder: MP3 (libmp3lame)
[22:07:28]      + bitrate: 160 kbps, samplerate: 48000 Hz
[22:07:28]      + compression level: 2.00
[22:07:28] yadif thread started for segment 0
[22:07:28] yadif thread started for segment 2
[22:07:28] yadif thread started for segment 3
[22:07:28] mask dilate thread started for segment 3
[22:07:28] yadif thread started for segment 1
[h264 @ 00000000664bad20] mmco: unref short failure
[h264 @ 00000000664bad20] mmco: unref short failure
[22:07:29] sync: expecting 3042 video frames
[22:07:29] encx264: encoding at constant RF 22.000000
[22:07:29] encx264: unparsed options: level=3.1:ref=2:8x8dct=0:weightp=1:subme=6:vbv-bufsize=14000:vbv-maxrate=14000:rc-lookahead=30
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile Main, level 3.1
[22:07:29] sync: first pts video is 0
[22:07:29] sync: first pts audio 0x1 is 0
[22:10:14] sync: reached video pts 10800148, exiting early
[22:10:14] sync: reached audio 0x1 pts 10800958, exiting early
[22:10:20] work: average encoding speed for job is 18.181929 fps
[22:10:20] comb detect: heavy 229 | light 370 | uncombed 2401 | total 3000
[22:10:20] decomb: deinterlaced 229 | blended 370 | unfiltered 2401 | total 3000
[22:10:20] vfr: lost time: 0 (0 frames)
[22:10:20] vfr: gained time: 0 (0 frames) (0 not accounted for)
[22:10:20] eac3-decoder done: 4416 frames, 0 decoder errors
[22:10:20] h264-decoder done: 3518 frames, 0 decoder errors
[22:10:20] sync: got 3000 frames, 3042 expected
[22:10:20] sync: framerate min 25.000 fps, max 25.147 fps, avg 25.002 fps
x264 [info]: frame I:20    Avg QP:19.42  size: 54346
x264 [info]: frame P:785   Avg QP:22.41  size: 13988
x264 [info]: frame B:2195  Avg QP:25.22  size:  3745
x264 [info]: consecutive B-frames:  2.3%  0.3%  0.5% 96.9%
x264 [info]: mb I  I16..4: 18.2%  0.0% 81.8%
x264 [info]: mb P  I16..4:  2.1%  0.0%  5.3%  P16..4: 42.2% 19.0%  8.8%  0.0%  0.0%    skip:22.5%
x264 [info]: mb B  I16..4:  2.0%  0.0%  0.6%  B16..8: 23.8%  5.7%  0.3%  direct: 7.0%  skip:60.7%  L0:40.0% L1:51.2% BI: 8.8%
x264 [info]: coded y,uvDC,uvAC intra: 53.5% 0.0% 0.0% inter: 10.8% 0.0% 0.0%
x264 [info]: i16 v,h,dc,p: 38% 17% 17% 28%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 17% 15%  7% 10%  9%  7%  7%  5%
x264 [info]: i8c dc,h,v,p: 100%  0%  0%  0%
x264 [info]: Weighted P-Frames: Y:7.4% UV:0.0%
x264 [info]: ref P L0: 63.8% 36.2%
x264 [info]: ref B L0: 82.7% 17.3%
x264 [info]: ref B L1: 95.9%  4.1%
x264 [info]: kb/s:1352.70
[22:10:21] mux: track 0, 3000 frames, 20287642 bytes, 1352.14 kbps, fifo 2048
[22:10:21] mux: track 1, 5001 frames, 2400480 bytes, 159.99 kbps, fifo 4096
[22:10:21] libhb: work result = 0

# Encode Completed ...


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

Re: Wrong audio track ???

Post by mduell »

1.1.0 isn't supported, try the release or nightly.

But that's really just a ruse to get you to redo it since I don't believe your claim that HB translated the audio, and HB won't mux in arbitrary audio streams from other files. You're confusing input or output files somewhere.
BernardL
Posts: 4
Joined: Thu Dec 06, 2018 4:50 pm

Re: Wrong audio track ???

Post by BernardL »

You're confusing input or output files somewhere.
My input file is: The_Misfits_ENonly.mp4
My output file (corresponding to the provided logfile): The_Misfits_TestHB06.mp4
It did not escape you that the output is numbered 06. Actually now I'm at 08. Among other things, I tried various combinations in the Audio Defaults popup, brought up by the Selection Behavior button in the Audio tag.

Rather than ask me to re-do this once more (and how could you know I did not make the same mistake one more time?) it would be more constructive to suggest a way by which I could make available to the devs an actual sample input file. Possibly with a drastically reduced image format, to make the size manageable. Just a suggestion from a confused (confusing?) user.
BernardL
Posts: 4
Joined: Thu Dec 06, 2018 4:50 pm

Re: Wrong audio track ???

Post by BernardL »

I don't believe your claim that HB translated the audio
Neither do I; which is why I suggested nothing of that sort.
mduell
Veteran User
Posts: 8196
Joined: Sat Apr 21, 2007 8:54 pm

Re: Wrong audio track ???

Post by mduell »

Maybe you picked the wrong file to play in VLC for input verification. Maybe you named a couple output files the same, possibly in different directories. Maybe you've done something weird in VLC with external audio.

I can't debug your brain, but PEBCAK is the horses-not-zebras cause here. We've certainly seen it before.

I'm also a little bit suspicious of your TS concatenation. I understand it works in theory, but if the track order/identification in the TS segments weren't all the same you may end up having them mixed up.

You can cut off a smaller bit of the TS file to upload somewhere.
BernardL
Posts: 4
Joined: Thu Dec 06, 2018 4:50 pm

Re: Wrong audio track ???

Post by BernardL »

Further investigation reveals that in the .ts file, up to 11min from start, both the default (French) sound track and the original language (English) track are in French. Beyond that time the situation is as expected. This is unlikely to result from the concatenation of the .ts pieces, each 1Gb and >~30min long; I have deleted the individual .ts pieces.
So the error was between the network files and the TV transmitter. What is the acronym for that?
mduell
Veteran User
Posts: 8196
Joined: Sat Apr 21, 2007 8:54 pm

Re: Wrong audio track ???

Post by mduell »

PEBCAK
Deleted User 13735

Re: Wrong audio track ???

Post by Deleted User 13735 »

Cocatenation of TS files may be playable but indexing may be lost.
To test if this is the case, download the VideoRedo trial version, cut-and-join them there.
Does the behavior change?
Post Reply