How to convert/add subtitle to video without altering any settings?

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
XP Mai
Posts: 5
Joined: Wed Sep 13, 2017 4:03 pm

How to convert/add subtitle to video without altering any settings?

Post by XP Mai »

Please detail your question or problem in as much detail as possible:

I just want to convert a video to .mp4 or add subtitle to it, while maintaining quality and all settings untouched. How can I do this? I don't want to touch the preset... because I don't know which is best and I don't know current video's quality so I'm afraid the presets will scale down its quality. :(

Or is it I just need to select the preset with highest quality and everything will remain untouched? :idea:

Now, I've a 1920×816 .mp4 video file, its size is 1.59GB. Should I choose Fast 1080p30, Fast720p30 or one of the Apple presets (I want to add it into my iTunes library)? :!:

That file isn't exactly 1080p or 720p. Because its width is 1080p's but its height is too little. I tried Fast 1080p30 and the size output was >2GB, which is bigger than original. :arrow:

And I don't know if my video is stereo or not. Will it harmless to choose Surround preset?

There are too many presets and idk which one is most appropriate. :(

Edit: And what is HQ1080p30 Surround? :?:

Tell us about your environment. What version of HandBrake? What version of Windows are you running. etc.

HandBrake 1.0.7 (64-bit) on Windows 10 Pro

If there was any exception or error displayed, please copy it and paste it here:

N/A

Please include the scan or encode log:

Code: Select all

 HandBrake 1.0.7 (2017040900) - 64bit
OS: Microsoft Windows NT 10.0.14393.0 - 64bit
CPU: Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz
Ram: 8100 MB, 
GPU Information:
  Intel(R) HD Graphics Family - 20.19.15.4642
  NVIDIA GeForce 840M - 21.21.13.7654
Screen: 1920x1080
Temp Dir: C:\Users\Mai\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\Mai\AppData\Roaming\HandBrake Team\HandBrake\1.0.7.0

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


# Starting Encode ...

[21:16:03] hb_init: starting libhb thread
[21:16:03] 1 job(s) to process
[21:16:03] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0.0,
        "Encoder": 65536,
        "Gain": 0.0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 2048
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "File": "C:\\Users\\Mai\\Videos\\test.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": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "720",
          "width": "1280"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "2",
          "rate": "27000000/900000"
        }
      }
    ]
  },
  "PAR": {
    "Num": 45,
    "Den": 34
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "C:\\Users\\Mai\\Videos\\Captain America - The First Avenger.mp4"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": [
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 0,
        "Offset": 0,
        "Track": -1,
        "SRT": {
          "Codeset": "UTF-8",
          "Filename": "C:\\Users\\Mai\\OneDrive\\Movies\\subtitiles\\Captain America - The First Adventure.srt",
          "Language": "eng"
        }
      }
    ]
  },
  "Video": {
    "Encoder": 65536,
    "Level": "3.1",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "fast",
    "Profile": "main",
    "Quality": 21.0,
    "OpenCL": false,
    "HWDecode": false,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[21:16:03] CPU: Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz
[21:16:03]  - Intel microarchitecture Haswell
[21:16:03]  - logical processor count: 4
[21:16:03] Intel Quick Sync Video support: yes
[21:16:03]  - Intel Media SDK hardware: API 1.20 (minimum: 1.3)
[21:16:03]  - H.264 encoder: yes
[21:16:03]     - preferred implementation: hardware (any)
[21:16:03]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[21:16:03]  - H.265 encoder: no
[21:16:03] hb_scan: path=C:\Users\Mai\Videos\Captain America - The First Avenger.mp4, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image C:\Users\Mai\Videos\Captain America - The First Avenger.mp4
src/libbluray/disc/disc.c:352: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:352: error opening file BDMV\BACKUP\index.bdmv
[21:16:03] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
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
[21:16:03] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Mai\Videos\Captain America - The First Avenger.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 1
    compatible_brands: isomavc1
    creation_time   : 2011-10-15 21:33:53
    title           : Captain America: The First Avenger
    date            : 2011
  Duration: 02:04:11.73, start: 0.000000, bitrate: 1839 kb/s
    Stream #0:0(und): Video: h264 (High) [avc1 / 0x31637661]
      yuv420p, 1920x816 [PAR 1:1 DAR 40:17], 1804 kb/s
      23.98 fps, 96k tbn (default)
    Metadata:
      creation_time   : 2011-10-15 21:33:53
    Stream #0:1(und): Audio: aac (HE-AAC) [mp4a / 0x6134706D]
      48000 Hz, stereo, fltp, 31 kb/s (default)
    Metadata:
      creation_time   : 2011-10-15 21:34:08
      handler_name    : GPAC ISO Audio Handler
[21:16:03] scan: decoding previews for title 1
[21:16:04] scan: audio 0x1: aac, rate=48000Hz, bitrate=31963 Unknown (AAC) (2.0 ch)
[21:16:05] scan: 10 previews, 1920x816, 23.976 fps, autocrop = 0/0/0/0, aspect 2.35:1, PAR 1:1
[21:16:05] scan: supported video decoders: avcodec qsv
[21:16:05] libhb: scan thread found 1 valid title(s)
[21:16:05] Skipping subtitle scan.  No suitable subtitle tracks.
[21:16:05] starting job
[21:16:05] decomb filter thread started for segment 0
[21:16:05] decomb filter thread started for segment 1
[21:16:05] decomb filter thread started for segment 2
[21:16:05] decomb filter thread started for segment 3
[21:16:05] decomb check thread started for segment 0
[21:16:05] decomb check thread started for segment 1
[21:16:05] decomb check thread started for segment 2
[21:16:05] decomb check thread started for segment 3
[21:16:05] mask filter thread started for segment 0
[21:16:05] mask filter thread started for segment 1
[21:16:05] mask filter thread started for segment 2
[21:16:05] mask filter thread started for segment 3
[21:16:05] mask erode thread started for segment 0
[21:16:05] mask erode thread started for segment 1
[21:16:05] mask erode thread started for segment 2
[21:16:06] mask erode thread started for segment 3
[21:16:06] mask dilate thread started for segment 0
[21:16:06] mask dilate thread started for segment 1
[21:16:06] mask dilate thread started for segment 2
[21:16:06] mask dilate thread started for segment 3
[21:16:06] yadif thread started for segment 0
[21:16:06] yadif thread started for segment 1
[21:16:06] yadif thread started for segment 2
[21:16:06] yadif thread started for segment 3
[21:16:06] work: track 1, dithering not supported by codec
[21:16:06] work: only 1 chapter, disabling chapter markers
[21:16:06] job configuration:
[21:16:06]  * source
[21:16:06]    + C:\Users\Mai\Videos\Captain America - The First Avenger.mp4
[21:16:06]    + title 1, chapter(s) 1 to 1
[21:16:06]    + container: mov,mp4,m4a,3gp,3g2,mj2
[21:16:06]    + data rate: 1839 kbps
[21:16:06]  * destination
[21:16:06]    + C:\Users\Mai\Videos\test.mp4
[21:16:06]    + container: MPEG-4 (libavformat)
[21:16:06]  * video track
[21:16:06]    + decoder: h264
[21:16:06]      + bitrate 1804 kbps
[21:16:06]    + filters
[21:16:06]      + 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)
[21:16:06]      + Decomb (mode=39)
[21:16:06]      + Framerate Shaper (mode=2:rate=27000000/900000)
[21:16:06]        + frame rate: 23.976 fps -> peak rate limited to 30.000 fps
[21:16:06]      + Crop and Scale (width=1280:height=720:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[21:16:06]        + source: 1920 * 816, crop (0/0/0/0): 1920 * 816, scale: 1280 * 720
[21:16:06]    + Output geometry
[21:16:06]      + storage dimensions: 1280 x 720
[21:16:06]      + pixel aspect ratio: 45 : 34
[21:16:06]      + display dimensions: 1694 x 720
[21:16:06]    + encoder: H.264 (libx264)
[21:16:06]      + preset:  fast
[21:16:06]      + profile: main
[21:16:06]      + level:   3.1
[21:16:06]      + quality: 21.00 (RF)
[21:16:06]  * subtitle track 1, English (track 0, id 0xff) Text [SRT] -> Passthrough, offset: 0, charset: UTF-8
[21:16:06]  * audio track 1
[21:16:06]    + decoder: Unknown (AAC) (2.0 ch) (track 1, id 0x1)
[21:16:06]      + bitrate: 31 kbps, samplerate: 48000 Hz
[21:16:06]    + mixdown: Stereo
[21:16:06]    + encoder: AAC (libavcodec)
[21:16:06]      + bitrate: 160 kbps, samplerate: 48000 Hz
[21:16:06] sync: expecting 178662 video frames
[21:16:06] encx264: min-keyint: 24, keyint: 240
[21:16:06] encx264: encoding at constant RF 21.000000
[21:16:06] encx264: unparsed options: level=3.1:ref=2:vbv-maxrate=14000:weightp=1:8x8dct=0:subme=6:vbv-bufsize=14000:rc-lookahead=30
x264 [info]: using SAR=45/34
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
x264 [info]: profile Main, level 3.1
[21:16:06] sync: first pts audio 0x1 is 0
[21:16:06] sync: first pts video is 7507
[21:16:06] sync: "Chapter 1" (1) at frame 1 time 7507
[21:16:11] sync: first pts subtitle 0xff is 516420
[23:54:53] reader: done. 1 scr changes
[23:54:56] work: average encoding speed for job is 18.746328 fps
[23:54:56] comb detect: heavy 372 | light 759 | uncombed 177528 | total 178659
[23:54:56] decomb: deinterlaced 372 | blended 759 | unfiltered 177528 | total 178659
[23:54:56] vfr: 178659 frames output, 0 dropped and 0 duped for CFR/PFR
[23:54:56] vfr: lost time: 0 (0 frames)
[23:54:56] vfr: gained time: 0 (0 frames) (0 not accounted for)
[23:54:56] aac-decoder done: 174650 frames, 0 decoder errors
[23:54:56] h264-decoder done: 178659 frames, 0 decoder errors
[23:54:56] sync: got 178659 frames, 178662 expected
[23:54:56] sync: framerate min 23.981 fps, max 23.981 fps, avg 23.976 fps
x264 [info]: frame I:3099  Avg QP:16.57  size: 57146
x264 [info]: frame P:54218 Avg QP:19.73  size: 16012
x264 [info]: frame B:121342 Avg QP:21.31  size:  6084
x264 [info]: consecutive B-frames:  7.1%  5.7%  4.0% 83.2%
x264 [info]: mb I  I16..4: 28.3%  0.0% 71.7%
x264 [info]: mb P  I16..4:  9.4%  0.0%  7.1%  P16..4: 37.2% 14.7%  7.5%  0.0%  0.0%    skip:24.1%
x264 [info]: mb B  I16..4:  6.6%  0.0%  1.0%  B16..8: 26.3%  7.0%  0.3%  direct:11.6%  skip:47.1%  L0:45.0% L1:48.8% BI: 6.2%
x264 [info]: coded y,uvDC,uvAC intra: 32.7% 60.9% 16.2% inter: 10.2% 22.4% 0.3%
x264 [info]: i16 v,h,dc,p: 41% 21% 19% 19%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 17% 19%  6%  7%  7%  5%  6%  3%
x264 [info]: i8c dc,h,v,p: 56% 17% 23%  5%
x264 [info]: Weighted P-Frames: Y:4.3% UV:2.6%
x264 [info]: ref P L0: 69.8% 30.2%
x264 [info]: ref B L0: 82.9% 17.1%
x264 [info]: ref B L1: 95.8%  4.2%
x264 [info]: kb/s:1914.72
[23:54:57] mux: track 0, 178659 frames, 1783366871 bytes, 1914.58 kbps, fifo 4096
[23:54:57] mux: track 1, 349300 frames, 149144115 bytes, 160.12 kbps, fifo 8192
[23:54:57] mux: track 2, 1201 frames, 67026 bytes, 0.07 kbps, fifo 32
[23:54:57] libhb: work result = 0

# Encode Completed ...

User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Re: How to convert/add subtitle to video without altering any settings?

Post by s55 »

HandBrake doesn't support Video passthru. It always re-encodes so it's the wrong tool for the job.
You'll need an MP4 Muxer to achieve this. (ffmpeg command line will do it but I don't have any recommendations for decent GUIs)
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: How to convert/add subtitle to video without altering any settings?

Post by rollin_eng »

Xmedia recode should also work.
XP Mai
Posts: 5
Joined: Wed Sep 13, 2017 4:03 pm

Re: How to convert/add subtitle to video without altering any settings?

Post by XP Mai »

s55 wrote: Wed Sep 13, 2017 4:47 pm HandBrake doesn't support Video passthru. It always re-encodes so it's the wrong tool for the job.
You'll need an MP4 Muxer to achieve this. (ffmpeg command line will do it but I don't have any recommendations for decent GUIs)
I know, but I think I'll end up needing HandBrake to convert non-compatible videos to iTunes-compatible .mp4 video format. Can you give me advice on the dilemma above?
rollin_eng wrote: Wed Sep 13, 2017 4:56 pm Xmedia recode should also work.
What is it? It seems to be the same as HandBrake? (since it supports converting vids between formats) It'll encode and change settings and require me to select its presets?? :|
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: How to convert/add subtitle to video without altering any settings?

Post by mduell »

Your question betrays fundamental misunderstandings of video encoding. There is no same when you're not starting with the same source as the prior encode.
XP Mai
Posts: 5
Joined: Wed Sep 13, 2017 4:03 pm

Re: How to convert/add subtitle to video without altering any settings?

Post by XP Mai »

mduell wrote: Thu Sep 14, 2017 7:32 am Your question betrays fundamental misunderstandings of video encoding. There is no same when you're not starting with the same source as the prior encode.
Ohh. I see. Then can you help me answer my inquiries above? Please?
XP Mai
Posts: 5
Joined: Wed Sep 13, 2017 4:03 pm

Re: How to convert/add subtitle to video without altering any settings?

Post by XP Mai »

XP Mai wrote: Thu Sep 14, 2017 1:44 pmOhh. I see. Then can you help me answer my inquiries above? Please?
Anyone?
XP Mai wrote: Wed Sep 13, 2017 4:15 pm Now, I've a 1920×816 .mp4 video file, its size is 1.59GB. Should I choose Fast 1080p30, Fast720p30 or one of the Apple presets (I want to add it into my iTunes library)? :!:
XP Mai wrote: Wed Sep 13, 2017 4:15 pmThat file isn't exactly 1080p or 720p. Because its width is 1080p's but its height is too little. I tried Fast 1080p30 and the size output was >2GB, which is bigger than original. :arrow:
XP Mai wrote: Wed Sep 13, 2017 4:15 pmAnd I don't know if my video is stereo or not. Will it harmless to choose Surround preset?
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: How to convert/add subtitle to video without altering any settings?

Post by mduell »

HB crops off worthless black bars on the top and bottom, so it will be 1920 x whatever when using the 1080p presets.

Your "original" is already highly compressed. Choose a lower quality setting (higher RF) if you have some specific reason to hit the source size.
XP Mai
Posts: 5
Joined: Wed Sep 13, 2017 4:03 pm

Re: How to convert/add subtitle to video without altering any settings?

Post by XP Mai »

mduell wrote: Sun Sep 24, 2017 2:00 pm HB crops off worthless black bars on the top and bottom, so it will be 1920 x whatever when using the 1080p presets.

Your "original" is already highly compressed. Choose a lower quality setting (higher RF) if you have some specific reason to hit the source size.
Oh. So which setting would you recommend? the 720p?
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: How to convert/add subtitle to video without altering any settings?

Post by mduell »

I'd recommend a 1080p preset and then raise the RF to hit your output size targets.
Post Reply