Audio passthru default without re-encode?

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
DFurrow
Posts: 1
Joined: Wed Mar 20, 2019 2:45 pm

Audio passthru default without re-encode?

Post by DFurrow »

I have a question about how to passthru a default encode without having to re-encode if it already exists, if that makes any sense.

My scenerio, I want to passthru AAC and AC3 but I always want an AAC encoded audio track even if it does not exist in the stream. However, if it already exists I just want to passthru and not have to re-encode it.

I know I can set a fallback encode to AAC but that means I'd only get the AAC if neither AAC nor AC3 already existed. If only the AC3 was in the stream it would not trigger the 'fallback' AAC version.

I also know I can select to always encode an AAC version but what happens if there's already an AAC version in the stream that should passthru? I'm trying to avoid doing any unnecessary re-encoding or wind up with 2 AAC versions.


Code: Select all

HandBrake 1.2.2 (2019022300)

OS: Microsoft Windows NT 10.0.17134.0

CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz

Ram: 16332 MB, 

GPU Information:

  NVIDIA GeForce GTX 760 - 25.21.14.1935

Screen: 1920x1080

Temp Dir: C:\Users\dfurr\AppData\Local\Temp\

Install Dir: C:\Program Files\HandBrake

Data Dir: C:\Users\dfurr\AppData\Roaming\HandBrake


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





# Starting Encode ...



[10:55:29] hb_init: starting libhb thread

[10:55:29] 1 job(s) to process

[10:55:29] json job:

{

  "Audio": {

    "AudioList": [

      {

        "DRC": 0.0,

        "Encoder": "copy",

        "Gain": 0.0,

        "Mixdown": -1,

        "NormalizeMixLevel": false,

        "Samplerate": 48000,

        "Track": 0,

        "DitherMethod": 0

      },

      {

        "Bitrate": 160,

        "DRC": 0.0,

        "Encoder": "av_aac",

        "Gain": 0.0,

        "Mixdown": 4,

        "NormalizeMixLevel": false,

        "Samplerate": 48000,

        "Track": 0,

        "DitherMethod": 0

      }

    ],

    "CopyMask": [

      "copy:ac3",

      "copy:dtshd",

      "copy:dts",

      "copy:truehd"

    ],

    "FallbackEncoder": "none"

  },

  "Destination": {

    "ChapterList": [

      {

        "Name": "Chapter 1"

      }

    ],

    "ChapterMarkers": true,

    "AlignAVStart": false,

    "File": "C:\\Users\\dfurr\\Desktop\\Auto_Delete_Backup\\Roy Roger (1940) - 1-1.mkv",

    "Mp4Options": {

      "IpodAtom": false,

      "Mp4Optimize": false

    },

    "Mux": "mkv"

  },

  "Filters": {

    "FilterList": [

      {

        "ID": 2,

        "Settings": {}

      },

      {

        "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": "6",

          "crop-left": "0",

          "crop-right": "2",

          "crop-top": "0",

          "height": "474",

          "width": "718"

        }

      },

      {

        "ID": 6,

        "Settings": {

          "mode": "0"

        }

      }

    ]

  },

  "PAR": {

    "Num": 8,

    "Den": 9

  },

  "Metadata": {},

  "SequenceID": 0,

  "Source": {

    "Angle": 1,

    "Range": {

      "Type": "chapter",

      "Start": 1,

      "End": 1

    },

    "Title": 1,

    "Path": "C:\\Users\\dfurr\\Documents\\WORKING\\Movies\\Roy Roger (1940)\\Roy Roger (1940) - 1.mkv"

  },

  "Subtitle": {

    "Search": {

      "Burn": false,

      "Default": false,

      "Enable": true,

      "Forced": true

    },

    "SubtitleList": []

  },

  "Video": {

    "Encoder": "x265_10bit",

    "Level": "auto",

    "TwoPass": false,

    "Turbo": false,

    "ColorMatrixCode": 0,

    "Options": "",

    "Preset": "fast",

    "Profile": "auto",

    "Quality": 22.0,

    "QSV": {

      "Decode": false,

      "AsyncDepth": 0

    }

  }

}

[10:55:29] CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz

[10:55:29]  - Intel microarchitecture Haswell

[10:55:29]  - logical processor count: 8

[10:55:29] Intel Quick Sync Video support: no

[10:55:29] hb_scan: path=C:\Users\dfurr\Documents\WORKING\Movies\Roy Roger (1940)\Roy Roger (1940) - 1.mkv, title_index=1

udfread ERROR: ECMA 167 Volume Recognition failed

src/libbluray/disc/disc.c:323: failed opening UDF image C:\Users\dfurr\Documents\WORKING\Movies\Roy Roger (1940)\Roy Roger (1940) - 1.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

[10:55:29] 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

[10:55:29] dvd: not a dvd - trying as a stream/file instead

Input #0, matroska,webm, from 'C:\Users\dfurr\Documents\WORKING\Movies\Roy Roger (1940)\Roy Roger (1940) - 1.mkv':

  Metadata:

    encoder         : libmakemkv v1.14.3 (1.3.5/1.4.7) win(x64-release)

    creation_time   : 2019-03-19T22:10:12.000000Z

  Duration: 00:56:38.63, start: 0.000000, bitrate: 3433 kb/s

    Stream #0:0(eng): Video: mpeg2video (Main), yuv420p(tv, smpte170m, bottom first), 720x480 [SAR 8:9 DAR 4:3], 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc

    Metadata:

      BPS-eng         : 3235406

      DURATION-eng    : 00:56:38.628566666

      NUMBER_OF_FRAMES-eng: 101857

      NUMBER_OF_BYTES-eng: 1374492880

      SOURCE_ID-eng   : 0100E0

      _STATISTICS_WRITING_APP-eng: MakeMKV v1.14.3 win(x64-release)

      _STATISTICS_WRITING_DATE_UTC-eng: 2019-03-19 22:10:12

      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID

    Stream #0:1(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s (default)

    Metadata:

      title           : Stereo

      BPS-eng         : 192000

      DURATION-eng    : 00:56:38.656000000

      NUMBER_OF_FRAMES-eng: 106208

      NUMBER_OF_BYTES-eng: 81567744

      SOURCE_ID-eng   : 0180BD

      _STATISTICS_WRITING_APP-eng: MakeMKV v1.14.3 win(x64-release)

      _STATISTICS_WRITING_DATE_UTC-eng: 2019-03-19 22:10:12

      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID

[10:55:29] scan: decoding previews for title 1

[10:55:29] scan: audio 0x1: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch)

[10:55:29] scan: 10 previews, 720x480, 29.970 fps, autocrop = 0/6/0/2, aspect 4:3, PAR 8:9

[10:55:30] libhb: scan thread found 1 valid title(s)

[10:55:30] Skipping subtitle scan.  No suitable subtitle tracks.

[10:55:30] starting job

[10:55:30] decomb filter thread started for segment 0

[10:55:30] decomb filter thread started for segment 1

[10:55:30] decomb filter thread started for segment 2

[10:55:30] decomb filter thread started for segment 3

[10:55:30] decomb filter thread started for segment 4

[10:55:30] decomb filter thread started for segment 5

[10:55:30] decomb filter thread started for segment 6

[10:55:30] decomb filter thread started for segment 7

[10:55:30] decomb check thread started for segment 0

[10:55:30] decomb check thread started for segment 1

[10:55:30] decomb check thread started for segment 2

[10:55:30] decomb check thread started for segment 3

[10:55:30] decomb check thread started for segment 4

[10:55:30] decomb check thread started for segment 5

[10:55:30] decomb check thread started for segment 6

[10:55:30] decomb check thread started for segment 7

[10:55:30] mask filter thread started for segment 0

[10:55:30] mask filter thread started for segment 1

[10:55:30] mask filter thread started for segment 2

[10:55:30] mask filter thread started for segment 3

[10:55:30] mask filter thread started for segment 4

[10:55:30] mask erode thread started for segment 5

[10:55:30] mask filter thread started for segment 6

[10:55:30] mask filter thread started for segment 7

[10:55:30] mask erode thread started for segment 0

[10:55:30] mask erode thread started for segment 1

[10:55:30] mask erode thread started for segment 2

[10:55:30] mask erode thread started for segment 3

[10:55:30] mask erode thread started for segment 4

[10:55:30] yadif thread started for segment 0

[10:55:30] mask erode thread started for segment 6

[10:55:30] mask erode thread started for segment 7

[10:55:30] mask dilate thread started for segment 0

[10:55:30] mask dilate thread started for segment 1

[10:55:30] mask dilate thread started for segment 2

[10:55:30] Auto Passthru: allowed codecs are AC3, TrueHD, DTS, DTS-HD

[10:55:30] Auto Passthru: fallback is None

[10:55:30] Auto Passthru: using AC3 Passthru for track 1

[10:55:30] mask dilate thread started for segment 3

[10:55:30] mask dilate thread started for segment 4

[10:55:30] mask dilate thread started for segment 5

[10:55:30] mask dilate thread started for segment 6

[10:55:30] work: only 1 chapter, disabling chapter markers

[10:55:30] job configuration:

[10:55:30]  * source

[10:55:30]    + C:\Users\dfurr\Documents\WORKING\Movies\Roy Roger (1940)\Roy Roger (1940) - 1.mkv

[10:55:30]    + title 1, chapter(s) 1 to 1

[10:55:30] mask dilate thread started for segment 7

[10:55:30]    + container: matroska,webm

[10:55:30]    + data rate: 3433 kbps

[10:55:30]  * destination

[10:55:30]    + C:\Users\dfurr\Desktop\Auto_Delete_Backup\Roy Roger (1940) - 1-1.mkv

[10:55:30] mask filter thread started for segment 5

[10:55:30]    + container: Matroska (libavformat)

[10:55:30]  * video track

[10:55:30]    + decoder: mpeg2video

[10:55:30]    + filters

[10:55:30]      + Detelecine (pullup) ()

[10:55:30] yadif thread started for segment 1

[10:55:30]      + 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)

[10:55:30]      + Decomb (mode=39)

[10:55:30]      + Framerate Shaper (mode=0)

[10:55:30]        + frame rate: same as source (around 29.970 fps)

[10:55:30] yadif thread started for segment 2

[10:55:30]      + Crop and Scale (width=718:height=474:crop-top=0:crop-bottom=6:crop-left=0:crop-right=2)

[10:55:30]        + source: 720 * 480, crop (0/6/0/2): 718 * 474, scale: 718 * 474

[10:55:30]    + Output geometry

[10:55:30]      + storage dimensions: 718 x 474

[10:55:30]      + pixel aspect ratio: 8 : 9

[10:55:30]      + display dimensions: 638 x 474

[10:55:30]    + encoder: H.265 10-bit (libx265)

[10:55:30]      + preset:  fast

[10:55:30] yadif thread started for segment 3

[10:55:30]      + profile: auto

[10:55:30]      + quality: 22.00 (RF)

[10:55:30]      + color profile: 6-1-6

[10:55:30]  * audio track 1

[10:55:30]    + decoder: English (AC3) (2.0 ch) (track 1, id 0x1)

[10:55:30]      + bitrate: 192 kbps, samplerate: 48000 Hz

[10:55:30]    + AC3 Passthru

[10:55:30]  * audio track 2

[10:55:30] yadif thread started for segment 4

[10:55:30]    + decoder: English (AC3) (2.0 ch) (track 1, id 0x1)

[10:55:30]      + bitrate: 192 kbps, samplerate: 48000 Hz

[10:55:30]    + mixdown: Stereo

[10:55:30]    + dither: none

[10:55:30]    + encoder: AAC (libavcodec)

[10:55:30]      + bitrate: 160 kbps, samplerate: 48000 Hz

[10:55:30] yadif thread started for segment 5

[10:55:30] yadif thread started for segment 6

[10:55:30] yadif thread started for segment 7

[10:55:30] sync: expecting 101856 video frames

x265 [info]: HEVC encoder version 2.9

x265 [info]: build info [Windows][GCC 8.2.0][64 bit] 10bit

x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2

x265 [info]: Main 10 profile, Level-3 (Main tier)

x265 [info]: Thread pool created using 8 threads

x265 [info]: Slices                              : 1

x265 [info]: frame threads / pool features       : 3 / wpp(8 rows)

x265 [warning]: Source height < 720p; disabling lookahead-slices

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: 30 / 300 / 40 / 5.00

x265 [info]: Lookahead / bframes / badapt        : 15 / 4 / 0

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-22.0 / 0.60

x265 [info]: tools: rd=2 psy-rd=2.00 rskip signhide tmvp fast-intra

x265 [info]: tools: strong-intra-smoothing deblock sao

[10:55:30] sync: first pts video is 0

[10:55:30] sync: "Chapter 1" (1) at frame 1 time 0

[10:55:30] sync: first pts audio 0x1 is 0

[10:55:30] sync: first pts audio 0x1 is 0



# Encode Paused
Last edited by Anonymous on Thu Mar 21, 2019 4:35 pm, edited 1 time in total.
Reason: Logs in between [code][/code] blocks please
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Audio passthru default without re-encode?

Post by mduell »

I'd recommend you write a short shell script to parse the output of the scan and configure your encode appropriately.
Deleted User 11865

Re: Audio passthru default without re-encode?

Post by Deleted User 11865 »

Indeed, nothing you can do with HandBrake itself. On my end, what I would probably find the quickest is to deal with the duplicate audio tracks after the fact.

Or depending on how many sources we're actually talking about, make 2 custom presets and select whichever is applicable manually.
Post Reply