Video and Audio out of sync - NVENC/HEVC (x265) encoding

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.
Locked
xyz962
Posts: 2
Joined: Fri Feb 07, 2020 10:45 pm

Video and Audio out of sync - NVENC/HEVC (x265) encoding

Post by xyz962 »

Hi!

I am using NVENC codecs (HEVC/x265) - NVEnc_4.59 and HandBrake 1.3.1. Audio and video are totally out of synch. I was trying to change manually the Frame Rate (FPS) and any other possible options (Same as Source, Constant Frame Rate, Variable Frame Rate, etc.), without any success... Frustrating...


HandBrake version 1.3.1

Windows 10 Education 1909



[23:21:57] Compile-time hardening features are enabled
[23:21:57] Nvenc version 9.1
[23:22:10] hb_init: starting libhb thread

# Starting Scan ...

[23:22:10] CPU:
[23:22:10] - logical processor count: 8
[23:22:10] Intel Quick Sync Video support: no
[23:22:10] hb_scan: path=T:\ZA ENKOD\ZA MEGUI 1\PRIORITY\Love.at.Second.Sight.[Mon.Inconnue].2019.1080p.WEBRip.x264.AC3.HORiZON-ArtSubs-OK\Mon.Inconnue.2019.FRENCH.1080p.WEB.H264-CiELOS-CRO.mkv, title_index=0
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image T:\ZA ENKOD\ZA MEGUI 1\PRIORITY\Love.at.Second.Sight.[Mon.Inconnue].2019.1080p.WEBRip.x264.AC3.HORiZON-ArtSubs-OK\Mon.Inconnue.2019.FRENCH.1080p.WEB.H264-CiELOS-CRO.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
src/libbluray/bluray.c:2585: nav_get_title_list(T:\ZA ENKOD\ZA MEGUI 1\PRIORITY\Love.at.Second.Sight.[Mon.Inconnue].2019.1080p.WEBRip.x264.AC3.HORiZON-ArtSubs-OK\Mon.Inconnue.2019.FRENCH.1080p.WEB.H264-CiELOS-CRO.mkv\) failed
[23:22:10] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.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
[23:22:10] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'T:\ZA ENKOD\ZA MEGUI 1\PRIORITY\Love.at.Second.Sight.[Mon.Inconnue].2019.1080p.WEBRip.x264.AC3.HORiZON-ArtSubs-OK\Mon.Inconnue.2019.FRENCH.1080p.WEB.H264-CiELOS-CRO.mkv':
Metadata:
title : Mon.Inconnue.2019.FRENCH.1080p.WEB.H264-CiELOS
encoder : libebml v1.3.10 + libmatroska v1.5.2
creation_time : 2020-02-02T19:28:50.000000Z
Duration: 01:53:10.75, start: 0.000000, bitrate: 2843 kb/s
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1912x800 [SAR 1:1 DAR 239:100], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
Metadata:
BPS-eng : 2457277
DURATION-eng : 01:53:10.040000000
NUMBER_OF_FRAMES-eng: 169751
NUMBER_OF_BYTES-eng: 2085626478
_STATISTICS_WRITING_APP-eng: mkvmerge v42.0.0 ('Overtime') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2020-02-02 19:28:50
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1(fre): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
Metadata:
BPS-eng : 384000
DURATION-eng : 01:53:10.752000000
NUMBER_OF_FRAMES-eng: 212211
NUMBER_OF_BYTES-eng: 325956096
_STATISTICS_WRITING_APP-eng: mkvmerge v42.0.0 ('Overtime') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2020-02-02 19:28:50
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[23:22:10] scan: decoding previews for title 1
[23:22:10] scan: audio 0x1: ac3, rate=48000Hz, bitrate=384000 Francais (AC3) (5.1 ch) (384 kbps)
[23:22:11] scan: 10 previews, 1912x800, 25.000 fps, autocrop = 0/0/0/0, aspect 2.39:1, PAR 1:1
[23:22:11] scan: supported video decoders: avcodec qsv
[23:22:11] libhb: scan thread found 1 valid title(s)

# Processing Scan Information ...


# Scan Finished ...

HandBrake 1.3.1 (2020010400)
OS: Microsoft Windows NT 10.0.18363.0
CPU: AMD FX(tm)-8300 Eight-Core Processor
Ram: 16340 MB,
GPU Information:
NVIDIA GeForce GTX 1050 Ti - 26.21.14.4141
Screen: 1920x1080
Temp Dir: C:\Users\Slobodan\AppData\Local\Temp\
Install Dir: D:\DOWNLOADS\VIDEO + SOUND UTILS\HANDBRAKE PORTABLE\HandBrake
Data Dir: C:\Users\Slobodan\AppData\Roaming\HandBrake

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


# Starting Encode ...

[23:34:15] hb_init: starting libhb thread
[23:34:15] Starting work at: Sun Feb 02 23:34:15 2020
[23:34:15] 1 job(s) to process
[23:34:15] json job:
{
"Audio": {
"AudioList": [
{
"DRC": 0.0,
"Encoder": "copy",
"Gain": 0.0,
"Mixdown": -1,
"NormalizeMixLevel": false,
"Samplerate": 0,
"Track": 0,
"DitherMethod": 0
}
],
"CopyMask": [
"copy:aac",
"copy:ac3",
"copy:dtshd",
"copy:dts",
"copy:eac3",
"copy:flac",
"copy:mp3",
"copy:truehd"
],
"FallbackEncoder": "av_aac"
},
"Destination": {
"ChapterList": [
{
"Name": "Chapter 1"
}
],
"ChapterMarkers": true,
"AlignAVStart": false,
"File": "T:\\ZA TORRENTE ZADNJE\\ENCODED\\HANDBRAKE\\L.Empereur.De.Paris.2018.French.720P.Bluray.Dts.X264-Utt (1)-1_preview.mkv",
"Mp4Options": {
"IpodAtom": false,
"Mp4Optimize": false
},
"Mux": "mkv"
},
"Filters": {
"FilterList": [
{
"ID": 12,
"Settings": {
"crop-bottom": "2",
"crop-left": "0",
"crop-right": "0",
"crop-top": "2",
"height": "532",
"width": "1280"
}
},
{
"ID": 6,
"Settings": {
"mode": "1"
}
}
]
},
"PAR": {
"Num": 1,
"Den": 1
},
"Metadata": {},
"SequenceID": 0,
"Source": {
"Angle": 1,
"Range": {
"Type": "preview",
"Start": 2,
"End": 21600000,
"SeekPoints": 10
},
"Title": 1,
"Path": "T:\\ZA ENKOD\\ZA MEGUI 1\\PRIORITY\\L Empereur De Paris 2018 FRENCH 720p BluRay DTS x264-UTT-ok\\L.Empereur.De.Paris.2018.FRENCH.720p.BluRay.DTS.x264-UTT (1).mkv"
},
"Subtitle": {
"Search": {
"Burn": false,
"Default": false,
"Enable": false,
"Forced": false
},
"SubtitleList": [
{
"Burn": true,
"Default": false,
"Forced": false,
"ID": 0,
"Offset": 0,
"Track": -1,
"Import": {
"Codeset": "UTF-8",
"Filename": "T:\\ZA ENKOD\\ZA MEGUI 1\\PRIORITY\\L Empereur De Paris 2018 FRENCH 720p BluRay DTS x264-UTT-ok\\L.Empereur.De.Paris.2018.FRENCH.720p.BluRay.DTS.x264-UTT (1).ass",
"Language": "eng",
"Format": "SSA"
}
}
]
},
"Video": {
"Encoder": "nvenc_h264",
"Level": "auto",
"Bitrate": 3000,
"TwoPass": false,
"Turbo": false,
"ColorMatrixCode": 0,
"Options": "--colorprim bt709 --transfer bt709 --colormatrix bt709 ",
"Preset": "slow",
"Profile": "auto",
"QSV": {
"Decode": false,
"AsyncDepth": 0
}
}
}
[23:34:15] CPU:
[23:34:15] - logical processor count: 8
[23:34:15] Intel Quick Sync Video support: no
[23:34:15] hb_scan: path=T:\ZA ENKOD\ZA MEGUI 1\PRIORITY\L Empereur De Paris 2018 FRENCH 720p BluRay DTS x264-UTT-ok\L.Empereur.De.Paris.2018.FRENCH.720p.BluRay.DTS.x264-UTT (1).mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image T:\ZA ENKOD\ZA MEGUI 1\PRIORITY\L Empereur De Paris 2018 FRENCH 720p BluRay DTS x264-UTT-ok\L.Empereur.De.Paris.2018.FRENCH.720p.BluRay.DTS.x264-UTT (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
src/libbluray/bluray.c:2585: nav_get_title_list(T:\ZA ENKOD\ZA MEGUI 1\PRIORITY\L Empereur De Paris 2018 FRENCH 720p BluRay DTS x264-UTT-ok\L.Empereur.De.Paris.2018.FRENCH.720p.BluRay.DTS.x264-UTT (1).mkv\) failed
[23:34:15] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.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
[23:34:15] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'T:\ZA ENKOD\ZA MEGUI 1\PRIORITY\L Empereur De Paris 2018 FRENCH 720p BluRay DTS x264-UTT-ok\L.Empereur.De.Paris.2018.FRENCH.720p.BluRay.DTS.x264-UTT (1).mkv':
Metadata:
encoder : libebml v1.3.10 + libmatroska v1.5.2
creation_time : 2020-02-02T19:34:59.000000Z
Duration: 02:00:04.80, start: 0.000000, bitrate: 6517 kb/s
Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1280x536, SAR 1:1 DAR 160:67, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Metadata:
BPS-eng : 5006866
DURATION-eng : 02:00:04.246000000
NUMBER_OF_FRAMES-eng: 172729
NUMBER_OF_BYTES-eng: 4508836878
_STATISTICS_WRITING_APP-eng: mkvmerge v42.0.0 ('Overtime') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2020-02-02 19:34:59
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1(fre): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s (default)
Metadata:
BPS-eng : 1509000
DURATION-eng : 02:00:04.800000000
NUMBER_OF_FRAMES-eng: 675450
NUMBER_OF_BYTES-eng: 1359005400
_STATISTICS_WRITING_APP-eng: mkvmerge v42.0.0 ('Overtime') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2020-02-02 19:34:59
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[23:34:15] scan: decoding previews for title 1
[23:34:15] scan: audio 0x1: dca, rate=48000Hz, bitrate=1536000 Francais (DTS) (5.1 ch) (1536 kbps)
[23:34:16] scan: 10 previews, 1280x536, 23.976 fps, autocrop = 2/2/0/0, aspect 2.39:1, PAR 1:1
[23:34:16] scan: supported video decoders: avcodec qsv
[23:34:16] libhb: scan thread found 1 valid title(s)
[23:34:16] Starting Task: Encoding Pass
[23:34:16] [ass] Shaper: FriBidi 1.0.7 (SIMPLE) HarfBuzz-ng 2.6.4 (COMPLEX)
[23:34:16] [ass] Using font provider directwrite
[23:34:16] Auto Passthru: allowed codecs are AAC, AC3, E-AC3, TrueHD, DTS, DTS-HD, MP3, FLAC
[23:34:16] Auto Passthru: fallback is AAC (avcodec)
[23:34:16] Auto Passthru: using DTS Passthru for track 1
[23:34:16] work: only 1 chapter, disabling chapter markers
[23:34:16] job configuration:
[23:34:16] * source
[23:34:16] + T:\ZA ENKOD\ZA MEGUI 1\PRIORITY\L Empereur De Paris 2018 FRENCH 720p BluRay DTS x264-UTT-ok\L.Empereur.De.Paris.2018.FRENCH.720p.BluRay.DTS.x264-UTT (1).mkv
[23:34:16] + title 1, start 00:00:0.00 stop 00:04:0.00
[23:34:16] + container: matroska,webm
[23:34:16] + data rate: 6517 kbps
[23:34:16] * destination
[23:34:16] + T:\ZA TORRENTE ZADNJE\ENCODED\HANDBRAKE\L.Empereur.De.Paris.2018.French.720P.Bluray.Dts.X264-Utt (1)-1_preview.mkv
[23:34:16] + container: Matroska (libavformat)
[23:34:16] * video track
[23:34:16] + decoder: h264
[23:34:16] + filters
[23:34:16] + Framerate Shaper (mode=1)
[23:34:16] + frame rate: 23.976 fps -> constant 23.976 fps
[23:34:16] + Subtitle renderer ()
[23:34:16] + Crop and Scale (width=1280:height=532:crop-top=2:crop-bottom=2:crop-left=0:crop-right=0)
[23:34:16] + source: 1280 * 536, crop (2/2/0/0): 1280 * 532, scale: 1280 * 532
[23:34:16] + Output geometry
[23:34:16] + storage dimensions: 1280 x 532
[23:34:16] + pixel aspect ratio: 1 : 1
[23:34:16] + display dimensions: 1280 x 532
[23:34:16] + encoder: H.264 (NVEnc)
[23:34:16] + preset: slow
[23:34:16] + options: --colorprim bt709 --transfer bt709 --colormatrix bt709
[23:34:16] + profile: auto
[23:34:16] + level: auto
[23:34:16] + bitrate: 3000 kbps, pass: 0
[23:34:16] + color profile: 1-1-1
[23:34:16] * subtitle track 1, English [SSA] (track 0, id 0xff000000, Text) -> Render/Burn-in, offset: 0
[23:34:16] * audio track 1
[23:34:16] + decoder: Francais (DTS) (5.1 ch) (1536 kbps) (track 1, id 0x1)
[23:34:16] + bitrate: 1536 kbps, samplerate: 48000 Hz
[23:34:16] + DTS Passthru
[23:34:16] sync: expecting 5778 video frames
[23:34:16] encavcodecInit: H.264 (Nvidia NVENC)
[23:34:16] encavcodec: encoding at rc=cbr_hq Bitrate 3000
[23:34:16] encavcodec: encoding with stored aspect 1/1
[23:34:16] sync: first pts video is 0
[23:34:16] sync: "Chapter 1" (1) at frame 1 time 0
[23:34:16] sync: first pts audio 0x1 is 360
[23:34:17] sync: first pts subtitle 0xff000000 is 1445400
[23:34:17] [ass] Neither PlayResX nor PlayResY defined. Assuming 384x288
[23:34:17] [ass] fontselect: (Open Sans Semibold, 400, 0) -> OpenSans-Semibold, 0, OpenSans-Semibold
[23:34:20] [ass] fontselect: (Open Sans Semibold, 400, 100) -> OpenSans-Semibold, 0, OpenSans-Semibold
[23:34:34] sync: reached audio 0x1 pts 21600360, exiting early
[23:34:34] sync: reached video pts 21602831, exiting early
[23:34:35] work: average encoding speed for job is 315.731262 fps
[23:34:35] vfr: 5755 frames output, 0 dropped and 0 duped for CFR/PFR
[23:34:35] vfr: lost time: 0 (0 frames)
[23:34:35] vfr: gained time: 0 (0 frames) (0 not accounted for)
[23:34:35] dca-decoder done: 23615 frames, 0 decoder errors
[23:34:35] h264-decoder done: 6023 frames, 0 decoder errors
[23:34:35] sync: got 5755 frames, 5778 expected
[23:34:35] sync: framerate min 23.976 fps, max 23.976 fps, avg 23.976 fps
[23:34:35] mux: track 0, 5755 frames, 90019502 bytes, 2999.74 kbps, fifo 512
[23:34:35] mux: track 1, 22500 frames, 45270000 bytes, 1508.54 kbps, fifo 2048
[23:34:35] Finished work at: Sun Feb 02 23:34:35 2020
[23:34:35] libhb: work result = 0

# Encode Completed ...



[/url])

Code: Select all

Please replace this text with the contents of your log file between the two code tags - OR -  provide a pastebin URL in place of these 3 lines.
Locked