discard video?

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
odra
Posts: 5
Joined: Tue May 19, 2020 10:24 pm

discard video?

Post by odra »

I understand that Handbrake will not provide a video passthrough feature.

Could it provide a "discard video" option? I.e., outputing an mkv with audio and perhaps other tracks, but no video.

This would be handy for me as I want to convert DTS tracks to Opus using Handbrake (I don't know of a better DTS decoder or Opus encoder). I could mux the results together later with something else.

Even if there are technical reasons why video passthrough is too difficult, maybe video discard could be easy?

Alternatively, is there a good way to get from DTS audio tracks to Opus?
Deleted User 11865

Re: discard video?

Post by Deleted User 11865 »

What is your final output format? Mastroska presumably?
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: discard video?

Post by mduell »

Just make the video trivially small and use the ultrafast tune (or hardware accelerated encoding).
odra
Posts: 5
Joined: Tue May 19, 2020 10:24 pm

Re: discard video?

Post by odra »

Yes, my final output will be Mastroska.

I tried making the video as small as possible (it allowed 32 x 32), etc. It took 40 minutes to process a 50 minute video. I think about 95% of that is processing the video and not the relatively simple audio conversion.

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

Re: discard video?

Post by mduell »

Pastebin the encoding log.
Deleted User 11865

Re: discard video?

Post by Deleted User 11865 »

Do you need everything with a graphical interface or do you have command-line utilities in your workflow?
odra
Posts: 5
Joined: Tue May 19, 2020 10:24 pm

Re: discard video?

Post by odra »

I'm not using any command-line utilities now, but I suppose I could. What do you suggest?

The best thing I've come up with so far is:

file with .dts + something called "AudioMuxer" --> dts extracted and converted to .wav

.wav + "foobar 2000" --> .opus

.opus + (other things) + "MKVToolNix GUI" --> a new .mkv

This seems to work, but I'm not sure about the quality and if Handbrake could simply discard the video, it would be a lot more elegant.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: discard video?

Post by mduell »

We can probably help the HB encode (with trivial video) go way faster, but we'll need to see the encoding log.
odra
Posts: 5
Joined: Tue May 19, 2020 10:24 pm

Re: discard video?

Post by odra »

Thank you. Here it is:

Code: Select all

HandBrake 1.2.0 (2018121700)
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
Ram: 4061 MB, 
GPU Information:
  Intel(R) G45/G43 Express Chipset - 8.15.10.2302
  Intel(R) G45/G43 Express Chipset - 8.15.10.2302
Screen: 1440x900
Temp Dir: C:\Users\M\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\M\AppData\Roaming\HandBrake

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


# Starting Encode ...

[03:28:27] hb_init: starting libhb thread
[03:28:29] 1 job(s) to process
[03:28:29] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 64,
        "DRC": 0.0,
        "Encoder": "opus",
        "Gain": 0.0,
        "Mixdown": 1,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 1,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:dtshd",
      "copy:dts",
      "copy:eac3",
      "copy:flac",
      "copy:mp3",
      "copy:truehd"
    ],
    "FallbackEncoder": "ac3"
  },
  "Destination": {
    "ChapterList": [],
    "ChapterMarkers": false,
    "AlignAVStart": false,
    "File": "test.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "mkv"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 11,
        "Settings": {
          "crop-bottom": "2",
          "crop-left": "238",
          "crop-right": "238",
          "crop-top": "0",
          "height": "32",
          "width": "32"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "0"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "...00000.m2ts"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x264",
    "Level": "4.0",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "ultrafast",
    "Profile": "main",
    "Quality": 51.0,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[03:28:29] CPU: Intel(R) Core(TM)2 Duo CPU     E7300  @ 2.66GHz
[03:28:29]  - logical processor count: 2
[03:28:29] Intel Quick Sync Video support: no
[03:28:29] hb_scan: path=...00000.m2ts, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image ...00000.m2ts
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
[03:28:30] 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
[03:28:30] dvd: not a dvd - trying as a stream/file instead
[03:28:30] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[03:28:30] Found the following PIDS
[03:28:30]     Video PIDS :
[03:28:30]       0x1011 type H.264 (0x1b)
[03:28:30]     Audio PIDS :
[03:28:30]       0x1100 type DTS-HD MA (0x86)
[03:28:30]       0x1101 type AC3 (0x81)
[03:28:30]     Subtitle PIDS :
[03:28:30]       0x1200 type PGS Subtitle (0x90)
[03:28:30]     Other PIDS :
[03:28:30]       0x1001 type Unknown (0xff) (PCR)
[03:28:30] stream id 0x1100 (type 0x86 substream 0x71) audio 0x711100
[03:28:30] stream id 0x1100 (type 0x86 substream 0x0) audio 0x1100
[03:28:30] stream id 0x1101 (type 0x81 substream 0x0) audio 0x1101
[03:28:30] stream id 0x1200 (type 0x90 substream 0x0) subtitle 0x1200
[03:28:35] stream doesn't seem to have video IDR frames
[03:28:35] scan: decoding previews for title 1
[03:28:35] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[03:28:35] scan: audio 0x711100: dca, rate=48000Hz, bitrate=1536000 Unknown (DTS) (2.0 ch)
[03:28:35] scan: audio 0x1100: dca, rate=48000Hz, bitrate=1 Unknown (DTS-HD MA) (2.0 ch)
[03:28:35] scan: audio 0x1101: ac3, rate=48000Hz, bitrate=192000 Unknown (AC3) (2.0 ch)
[03:28:38] stream: 22 good frames, 0 errors (0%)
[03:28:38] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 0/2/238/240, aspect 16:9, PAR 1:1
[03:28:38] scan: supported video decoders: avcodec qsv
[03:28:38] libhb: scan thread found 1 valid title(s)
[03:28:38] starting job
[03:28:38] work: compression level not specified, track 1 setting compression level 10.00
[03:28:38] job configuration:
[03:28:38]  * source
[03:28:38]    + ...00000.m2ts
[03:28:38]    + title 1, chapter(s) 1 to 1
[03:28:38]  * destination
[03:28:38]    + ...test.mkv
[03:28:38]    + container: Matroska (libavformat)
[03:28:38]  * video track
[03:28:38]    + decoder: h264
[03:28:38]      + bitrate 200 kbps
[03:28:38]    + filters
[03:28:38]      + Framerate Shaper (mode=0)
[03:28:38]        + frame rate: same as source (around 23.976 fps)
[03:28:38]      + Crop and Scale (width=32:height=32:crop-top=0:crop-bottom=2:crop-left=238:crop-right=238)
[03:28:38]        + source: 1920 * 1080, crop (0/2/238/238): 1444 * 1078, scale: 32 * 32
[03:28:38]    + Output geometry
[03:28:38]      + storage dimensions: 32 x 32
[03:28:38]      + pixel aspect ratio: 1 : 1
[03:28:38]      + display dimensions: 32 x 32
[03:28:38]    + encoder: H.264 (libx264)
[03:28:38]      + preset:  ultrafast
[03:28:38]      + profile: main
[03:28:38]      + level:   4.0
[03:28:38]      + quality: 51.00 (RF)
[03:28:38]      + color profile: 1-1-1
[03:28:38]  * audio track 1
[03:28:38]    + decoder: Unknown (DTS-HD MA) (2.0 ch) (track 2, id 0x1100)
[03:28:38]      + samplerate: 48000 Hz
[03:28:38]    + mixdown: Mono
[03:28:38]    + dither: none
[03:28:38]    + encoder: Opus (libopus)
[03:28:38]      + bitrate: 64 kbps, samplerate: 48000 Hz
[03:28:38]      + compression level: 10.00
[03:28:38] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[03:28:38] sync: expecting 72927 video frames
[03:28:39] encx264: min-keyint: 24, keyint: 240
[03:28:39] encx264: encoding at constant RF 51.000000
[03:28:39] encx264: unparsed options: level=4.0:ref=1:scenecut=0:bframes=0:no-deblock=1:cabac=0:analyse=none:8x8dct=0:weightp=0:me=dia:subme=0:mixed-refs=0:vbv-bufsize=25000:vbv-maxrate=20000:aq-mode=0:mbtree=0:rc-lookahead=0
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
x264 [info]: profile Constrained Baseline, level 4.0, 4:2:0, 8-bit
[03:28:39] sync: first pts video is 0
[03:28:39] sync: first pts audio 0x1100 is 0
[03:51:48] hb_ts_stream_decode - eof
[03:51:48] reader: done. 1 scr changes
[03:51:48] work: average encoding speed for job is 53.102249 fps
[03:51:48] vfr: lost time: 0 (0 frames)
[03:51:48] vfr: gained time: 0 (0 frames) (0 not accounted for)
[03:51:48] stream: 73800 good frames, 0 errors (0%)
[03:51:48] dca-decoder done: 288570 frames, 0 decoder errors
[03:51:48] h264-decoder done: 73799 frames, 0 decoder errors
[03:51:48] sync: got 73799 frames, 72927 expected
[03:51:48] sync: framerate min 11.987 fps, max 23.981 fps, avg 23.976 fps
x264 [info]: frame I:308   Avg QP:46.97  size:    69
x264 [info]: frame P:73491 Avg QP:49.21  size:     9
x264 [info]: mb I  I16..4: 100.0%  0.0%  0.0%
x264 [info]: mb P  I16..4:  0.7%  0.0%  0.0%  P16..4:  1.8%  0.0%  0.0%  0.0%  0.0%    skip:97.4%
x264 [info]: coded y,uvDC,uvAC intra: 19.3% 0.0% 0.0% inter: 0.2% 0.0% 0.0%
x264 [info]: i16 v,h,dc,p: 34% 13% 46%  6%
x264 [info]: i8c dc,h,v,p: 100%  0%  0%  0%
x264 [info]: kb/s:1.74
[03:51:48] mux: track 0, 73799 frames, 658453 bytes, 1.71 kbps, fifo 65536
[03:51:48] mux: track 1, 153905 frames, 23165125 bytes, 60.21 kbps, fifo 131072

# Encode Completed ...
Deleted User 11865

Re: discard video?

Post by Deleted User 11865 »

Your existing workflow seems OK to me.

I haven't tried either of the following apps, but it seems like they may be able to go direct from DTS to Opus, FWIW:

http://lamexp.sourceforge.net
https://winlame.sourceforge.io

On the command line, FFmpeg can do DTS to Opus without even having to demux/remux. But there's a learning curve to its syntax, I guess.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: discard video?

Post by mduell »

Ah, a very slow CPU. Can't do much more there for performance.

Are you intentionally downmixing the audio to mono?
odra
Posts: 5
Joined: Tue May 19, 2020 10:24 pm

Re: discard video?

Post by odra »

That's what I was afraid of (no way to speed it up)---that's why my idea was to just discard the video and put the rest in a container. Yes, the source is really mono on two channels, at that outrageous bitrate ("=1536000"). Which sounds the same with opus at 64 kb/s.

Thanks for the links, I'll take a look at those other apps. Maybe I should learn FFmpeg someday but I'm too busy just now.
Deleted User 11865

Re: discard video?

Post by Deleted User 11865 »

If you're sure it's dual Mono, HandBrake has left-only and right-only Mono mixdowns (which discard a channel instead of downmixing two identical channels into one). Might work better for this specific case, you'd have to try it.
Post Reply