What change do I need to make to not loose original quality

Discuss encoding for devices and presets.
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
joegreen
Posts: 2
Joined: Mon Aug 05, 2019 1:03 pm

What change do I need to make to not loose original quality

Post by joegreen »

I encoded 26.8 GB MKV and resulting mkv file is only 7.8 GB. I'm wondering if I lost the quality of video and/or audio in the process quite considerable. The reason I encoded 26.8 GB MKV is that it has only DTS-HD audio and my soundbar is only capable to play AC3 (Dolby Digital), so I kept DTS-HD audio as it is but added AC3 audio track by encoding DTS-HD.

I do not want to lose video and/or quality, so can you please let me know what changes do I need to make to following settings.

I used HandBreak 1.1.1.0 on Windows 10. Encoding took almost 10 hrs or so.

Here is the Activity Log: https://pastebin.com/UcvQMax2

This is my very first encode and using HandBrake also. I can also add MediaInfo of the source and output MKV:

Source MKV:

Code: Select all

General
Unique ID                                : 181264460139994728038233563909782810318 (0x885E43E1C456B52EAD453FC77CCCAECE)
Complete name                            : G:\Enzo\Fall.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 26.8 GiB
Duration                                 : 2 h 23 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 26.8 Mb/s
Movie name                               : Fall
Encoded date                             : UTC 2015-01-01 10:12:56
Writing application                      : mkvmerge v7.3.0 ('Nouages') 64bit built on Oct 22 2014 18:53:34
Writing library                          : libebml v1.3.0 + libmatroska v1.4.1

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 2 h 23 min
Bit rate mode                            : Variable
Bit rate                                 : 22.5 Mb/s
Maximum bit rate                         : 33.2 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.453
Stream size                              : 22.5 GiB (84%)
Language                                 : English
Default                                  : Yes
Forced                                   : No

Audio #1
ID                                       : 2
Format                                   : DTS XLL
Format/Info                              : Digital Theater Systems
Commercial name                          : DTS-HD Master Audio
Codec ID                                 : A_DTS
Duration                                 : 2 h 23 min
Bit rate mode                            : Variable
Bit rate                                 : 3 830 kb/s
Channel(s)                               : 6 channels
Channel layout                           : C L R Ls Rs LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 93.750 FPS (512 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossless
Stream size                              : 3.83 GiB (14%)
Title                                    : DTS-HD 5.1 @ 3830 kbps
Language                                 : English
Default                                  : No
Forced                                   : No

Audio #2
ID                                       : 3
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 2 h 23 min
Bit rate mode                            : Constant
Bit rate                                 : 448 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 459 MiB (2%)
Title                                    : AC3 5.1 @ 448 - Descriptive
Language                                 : English
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No

Menu
00:00:00.000                             : en:Opening Credits
00:04:28.476                             : en:Ghost Ship
00:07:32.452                             : en:Into the Wreck
00:12:47.391                             : en:The Keldysh
00:16:47.464                             : en:The Woman in the Picture
00:21:37.337                             : en:Old Rose Arrives
00:25:00.290                             : en:Reflections of the Past
00:29:25.221                             : en:Back to Titanic
00:35:06.145                             : en:A Lucky Hand
00:38:27.763                             : en:Leaving Port
00:41:24.440                             : en:Cherbourg
00:46:22.905                             : en:Ode to Titanic
00:50:48.628                             : en:First Glance
00:54:53.290                             : en:"You Jump, I Jump"
00:59:38.741                             : en:An Invitation to Dinner
01:05:14.243                             : en:The Heart of the Ocean
01:10:16.670                             : en:Sketches and Stories
01:17:09.750                             : en:Learning New Things
01:20:55.058                             : en:Dinner with Jack
01:26:10.373                             : en:A Real Party
01:31:49.754                             : en:A Cold Breakfast
01:37:04.527                             : en:Sunday Prayer
01:40:49.084                             : en:"They've Got You Trapped"
01:43:45.969                             : en:Flying
01:45:54.723                             : en:"That Was the Last Time..."
01:52:10.598                             : en:The Drawing
01:54:45.795                             : en:"My Heart Was Pounding"
01:58:13.044                             : en:"Find Her"
02:02:49.111                             : en:Two Souls United
02:09:38.645                             : en:"Iceberg Right Ahead!"
02:14:49.623                             : en:An Honest Thief
02:17:46.424                             : en:A Mathematical Certainty
Output MKV (7.8GB):

Code: Select all

General
Unique ID                                : 90530814067709754708402257418834805369 (0x441B99BEF93C68F23B1037DD7EBA0279)
Complete name                            : C:\Enzo\Fall.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 7.52 GiB
Duration                                 : 2 h 23 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 7 515 kb/s
Movie name                               : Fall
Encoded date                             : UTC 2019-08-04T13:09:36Z
Writing application                      : HandBrake 1.1.1 2018061800
Writing library                          : Lavf57.7.2

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 2 h 23 min
Width                                    : 1 916 pixels
Height                                   : 800 pixels
Display aspect ratio                     : 2.40:1
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Writing library                          : x264 core 155 r2901 7d0ff22
Encoding settings                        : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=6 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=30 / rc=crf / mbtree=1 / crf=22.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=25000 / vbv_bufsize=31250 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio #1
ID                                       : 2
Format                                   : DTS XLL
Format/Info                              : Digital Theater Systems
Commercial name                          : DTS-HD Master Audio
Codec ID                                 : A_DTS
Duration                                 : 2 h 23 min
Bit rate mode                            : Variable
Channel(s)                               : 6 channels
Channel layout                           : C L R Ls Rs LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 93.750 FPS (512 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossless
Title                                    : Surround
Language                                 : English
Default                                  : Yes
Forced                                   : No

Audio #2
ID                                       : 3
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 2 h 23 min
Bit rate mode                            : Constant
Bit rate                                 : 640 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 655 MiB (9%)
Title                                    : Surround
Language                                 : English
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No
Last edited by Anonymous on Sun Feb 09, 2020 4:21 am, edited 1 time in total.
Reason: Logs in between [code][/code] blocks please
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: What change do I need to make to not loose original quality

Post by rollin_eng »

HB is a video encoder, therefore you have to encode your video. This means you will lose some quality for most sane settings.

If you just want to change your audio try ffmpeg.
video.baba
Novice
Posts: 59
Joined: Sun May 24, 2015 11:12 am

Re: What change do I need to make to not loose original quality

Post by video.baba »

joegreen wrote: Mon Aug 05, 2019 2:02 pmI do not want to lose video and/or quality, so can you please let me know what changes do I need to make to following settings.
Yes, that's easy. Don't use Handbrake, or any other video converter/encoder/transcoder. The answer is that simple.
joegreen
Posts: 2
Joined: Mon Aug 05, 2019 1:03 pm

Re: What change do I need to make to not loose original quality

Post by joegreen »

Ok so I took a wrong route. So how do I extract existing DTS-HD audio from an MKV, convert to AC3 and then add the resulting AC3 to original MKV so that now I end up with an MKV with DTS-HD and AC3.
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: What change do I need to make to not loose original quality

Post by rollin_eng »

Try ffmpeg.
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: What change do I need to make to not loose original quality

Post by markfilipak »

joegreen wrote: Mon Aug 05, 2019 2:02 pm I encoded 26.8 GB MKV and resulting mkv file is only 7.8 GB. I'm wondering if I lost the quality of video and/or audio in the process quite considerable. The reason I encoded 26.8 GB MKV is that it has only DTS-HD audio and my soundbar is only capable to play AC3 (Dolby Digital), so I kept DTS-HD audio as it is but added AC3 audio track by encoding DTS-HD. ...
Hello Joe,

Two reactions:
1 - If you connect to the soundbar (or home theater or TV) via HDMI, I'm pretty sure the audio is converted to LPCM prior to sending it out through HDMI. If that's true, then decoding DTS-HD is up to whatever is playing the MKV and you are worried about nothing.
2 - Regarding editing an MKV, I've not used it, but I've heard you can do such things with MKVToolNix.

Hope that helps.
akyhne
Posts: 26
Joined: Sat Feb 08, 2020 1:02 am

Re: What change do I need to make to not loose original quality

Post by akyhne »

Demux the audio file from the MKV with MKVToolnix and MKVCleaver (MKVToolnix only needs to be installed).
Demux = extract audio/video/subtitle stream(s).

Recode the audio file with any valid software, like eac3to (https://en.wikibooks.org/wiki/Eac3to/How_to_Use)

remux the file with MKVToolnix GUI.

You should never re-encode any video file, unless you want to resize, edit or change the format of the content in the file.
MKV, MPG and other files are just containers for audio, video- and subtitle streams. Demuxing and remuxing files are lossless changes, as you just repack the streams in the files.
It is done in seconds and only the speed of your hard drives determines the time it takes.
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: What change do I need to make to not loose original quality

Post by markfilipak »

Joe,

Since I posted, I have used MKVToolnix GUI. It's a breeze. Do as akyhne recommends. All you have to do is open your MKV, remove the existing DTS audio, add the DD that you make via the recommended conversion, and save a new mux.
Post Reply