Handbrake audio slip

Weldon wrote on 1/22/2012, 10:24 AM
Hi,
I posted an issue yesterday regarding a large DNxHD file I was unable to render in Handbrake and on advice from musicvid, I downloaded the latest nightly and was able to do the render this morning however, about 3 minutes into the project, my audio starts lagging. I have looked at the 37gig QT file and like my Vegas edit, audio is spot on through out the 36 minutes. Handbrake render, I am using the "better" formula I got from this forum last year, audio starts lagging. Should I just try and re-render with HB or is there something else I need to look at?

Comments

musicvid10 wrote on 1/22/2012, 10:41 AM
Are you using constant frame rate? (this is important).
How are you playing back the finished file?
What is the bitrate?
What is the file size?
Maybe best to post your encoded file details using MediaInfo.
Weldon wrote on 1/22/2012, 11:00 AM
Playback on QT player 7.
That files bitrate is video - 3591 kbps / audio 1411 kbps
File size is 36.9 gig

I don't use QT as my primary player. I use Media Player though I have to use QT to view any DNxHD file. I noticed a small glitch in the final HB render that appears to be where the audio starts to slip. Is it possible I caused that by opening another program during the HB render?
Sorry to sound so desperate...I have been working on this project for too long and really want to nail the online render so I can move on to another project.
Weldon wrote on 1/22/2012, 1:40 PM
I did a re-render with HB and the same problem. I can hear on the Vegas timeline a click sound during an interview at 6:08. It is very faint. When I play the DNxHD mov file in QT I hear the click and the audio does not fall behind...stays correct the full 36 minutes. When I play the HB file in Media Player or QT it skips or pauses for a flash at 6:08 and audio falls back from that point on. I looked at the audio in Vegas and it hardly makes a mark on the timeline...like he leaned forward in his chair or something. Again, Vegas rendered Avid file plays great with no problem, other than it's 36.9 gigs, in QT. Something in HB doesn't like that spot.
musicvid10 wrote on 1/22/2012, 1:47 PM
Interested in how your encoded Handbrake MP4 plays on VLC and the MediaInfo Properties of that file, not how the DNxHD intermediate file plays back in Quicktime. These are two different scenarios. Take your DNxHD file back into Vegas and check the sync visually there if you suspect the intermediate render is your problem.


Thanks.
Weldon wrote on 1/22/2012, 1:51 PM
Tell me what VLC is and how to find the media properties and I will post.
musicvid10 wrote on 1/22/2012, 1:52 PM
VLC Player and MediaInfo (from Sourceforge) are available free, using a Google search.
amendegw wrote on 1/22/2012, 1:54 PM
"That files bitrate is video - 3591 kbps / audio 1411 kbps"I don't know whether this has anything to do with your problems, but that video bitrate looks awfully low and the audio bitrate looks high.

I just did a MediaInfo on one of my DNxHD renders and I'm seeing:

Video: 145Mbps (that's 148,480Kbps)
Audio: 384Kbps

Maybe a typo?

...Jerry

System Model: Alienware Area-51m R2
System: Windows 11 Home
Processor: Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz, 3792 Mhz, 8 Core(s), 16 Logical Processor(s)
Installed Memory: 64.0 GB
Display Adapter: NVIDIA GeForce RTX 2070 Super (8GB), Nvidia Studio Driver 527.56 Dec 2022)
Overclock Off

Display: 1920x1080 144 hertz
Storage (12TB Total):
OS Drive: PM981a NVMe SAMSUNG 2048GB
Data Drive1: Samsung SSD 970 EVO Plus 2TB
Data Drive2: Samsung SSD 870 QVO 8TB

USB: Thunderbolt 3 (USB Type-C) port Supports USB 3.2 Gen 2, DisplayPort 1.2, Thunderbolt 3

Cameras:
Canon R5
Canon R3
Sony A9

Weldon wrote on 1/22/2012, 2:05 PM
I downloaded vlc player and it does the same thing at the same spot. I also downloaded the media info and just don't know how to copy and paste that info...any suggestions?
amendegw wrote on 1/22/2012, 2:15 PM
"I also downloaded the media info and just don't know how to copy and paste that info...any suggestions? "Heh! I keep the following in a text file for cut-and-paste here for just such questions as this:

The short answer is: [img=http://dl.dropbox.com/u/20447760/Jazzy4.jpg]

The longer, better answer is in the sticky

The best answer is:



You can use the windows Snipping Tool instead of SnagIt & the web service of you choice instead of the free Dropbox service.

...Jerry

System Model: Alienware Area-51m R2
System: Windows 11 Home
Processor: Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz, 3792 Mhz, 8 Core(s), 16 Logical Processor(s)
Installed Memory: 64.0 GB
Display Adapter: NVIDIA GeForce RTX 2070 Super (8GB), Nvidia Studio Driver 527.56 Dec 2022)
Overclock Off

Display: 1920x1080 144 hertz
Storage (12TB Total):
OS Drive: PM981a NVMe SAMSUNG 2048GB
Data Drive1: Samsung SSD 970 EVO Plus 2TB
Data Drive2: Samsung SSD 870 QVO 8TB

USB: Thunderbolt 3 (USB Type-C) port Supports USB 3.2 Gen 2, DisplayPort 1.2, Thunderbolt 3

Cameras:
Canon R5
Canon R3
Sony A9

Weldon wrote on 1/22/2012, 2:15 PM
MPEG-4 (BAse Media / version 2): 1.35 GIB, 36mn 0s

1 video stream AVC
1 audio stream AAC

1st video stream
5 051 kbps, 1280*720, 16:9 @29.970 fps AVC (main@l3.1) CABAC / 2 ref

1st audio stream
English, 318 kbps, 44.1 khz AAC (LC)
musicvid10 wrote on 1/22/2012, 2:16 PM
Right-click on the file icon to bring up the context menu.
Click MediaInfo.
Copy and paste the information for your encoded Handbrake MP4 file.
I have clients this afternoon, will check in later on.
amendegw wrote on 1/22/2012, 2:21 PM
Okay, those look like good bitrates for the HandBrake encode, I read your post above to make me think the "3591 kbps / audio 1411 kbps" were the MediaInfo stats for your DNxHD render - not so?

...Jerry

System Model: Alienware Area-51m R2
System: Windows 11 Home
Processor: Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz, 3792 Mhz, 8 Core(s), 16 Logical Processor(s)
Installed Memory: 64.0 GB
Display Adapter: NVIDIA GeForce RTX 2070 Super (8GB), Nvidia Studio Driver 527.56 Dec 2022)
Overclock Off

Display: 1920x1080 144 hertz
Storage (12TB Total):
OS Drive: PM981a NVMe SAMSUNG 2048GB
Data Drive1: Samsung SSD 970 EVO Plus 2TB
Data Drive2: Samsung SSD 870 QVO 8TB

USB: Thunderbolt 3 (USB Type-C) port Supports USB 3.2 Gen 2, DisplayPort 1.2, Thunderbolt 3

Cameras:
Canon R5
Canon R3
Sony A9

musicvid10 wrote on 1/22/2012, 2:32 PM
Please provide the complete MediaInfo properties for your encoded Handbrake MP4 file using the instructions I provided above. Like this.

General
Weldon wrote on 1/22/2012, 2:42 PM

Complete name : C:\Users\Weldon T. Byrns III\Documents\empty bowls.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 1.35 GiB
Duration : 36mn 0s
Overall bit rate mode : Variable
Overall bit rate : 5 372 Kbps
Encoded date : UTC 2012-01-22 17:15:06
Tagged date : UTC 2012-01-22 19:04:33
Writing application : HandBrake 4416svn 2012012201

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 2 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 35mn 59s
Bit rate mode : Variable
Bit rate : 5 051 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 29.970 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.183
Stream size : 1.27 GiB (94%)
Writing library : x264 core 119
Encoding settings : cabac=1 / ref=2 / deblock=1:-2:-1 / analyse=0x1:0x111 / me=umh / subme=6 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=2 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=1 / weightb=0 / open_gop=0 / weightp=0 / keyint=300 / keyint_min=30 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=19.0 / qcomp=0.60 / qpmin=3 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Encoded date : UTC 2012-01-22 17:15:06
Tagged date : UTC 2012-01-22 19:04:29
Color primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
Transfer characteristics : BT.709-5, BT.1361
Matrix coefficients : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177

Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 36mn 0s
Bit rate mode : Variable
Bit rate : 318 Kbps
Maximum bit rate : 400 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 44.1 KHz
Compression mode : Lossy
Stream size : 81.8 MiB (6%)
Language : English
Encoded date : UTC 2012-01-22 17:15:06
Tagged date : UTC 2012-01-22 19:04:28

musicvid10 wrote on 1/22/2012, 8:59 PM
Your frame rate is constant, and if the DNxHD source is 29.97 (or 59.94i), then that should be OK.
One thing I noticed is your audio sample rate is 44.1, we normally expect 48 for video. Check all the way back to your original footage and see where the disconnect on that occurs.

In any event, a second Handbrake encode is in order. Also so is checking your DNxHD file on the Vegas timeline (not a player) to see if there is a glitch somewhere. If after those steps your audio is still out of sync, post your issue on the Handbrake forum with the requisite encode logs.

Jerry may have other ideas for you. I have come to expect him to point out some issues I may not have seen.

Although audio sync problems with the Win GUI are uncommon, they are not unheard of, and the Handbrake developers should be able to help you through. Best of luck.
amendegw wrote on 1/23/2012, 5:50 AM
I don't know much about it, but maybe a tool like tsMuxer might help here. I'm thinking about rendering just the audio from the original project, then using HandBrake to encode just the video from the DNxHD. Then use tsMuxer (or a similar tool) to put the audio & video back together.

Maybe someone with some expertise in this area might be able to comment here as my knowledge here is very, very limited.

...Jerry

PS: Or maybe just create a new Vegas project. Match your project properties to the HandBrake Render. Drop the HandBrake Render on the timeline & mute the audio. Drop the DNxHD render on the timeline below and mute the video. Render to a HIgh Bitrate MainConcept AVC/AAC output.

PPS: If you haven't noticed, I'm using the "poke & hope" method of solving your problem, but sometimes looking at a problem from different angles will spur an idea for the ultimate solution.

System Model: Alienware Area-51m R2
System: Windows 11 Home
Processor: Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz, 3792 Mhz, 8 Core(s), 16 Logical Processor(s)
Installed Memory: 64.0 GB
Display Adapter: NVIDIA GeForce RTX 2070 Super (8GB), Nvidia Studio Driver 527.56 Dec 2022)
Overclock Off

Display: 1920x1080 144 hertz
Storage (12TB Total):
OS Drive: PM981a NVMe SAMSUNG 2048GB
Data Drive1: Samsung SSD 970 EVO Plus 2TB
Data Drive2: Samsung SSD 870 QVO 8TB

USB: Thunderbolt 3 (USB Type-C) port Supports USB 3.2 Gen 2, DisplayPort 1.2, Thunderbolt 3

Cameras:
Canon R5
Canon R3
Sony A9

Weldon wrote on 1/23/2012, 10:16 AM
First off, thank you for looking into this and offering suggestions. You are what makes this site so good. This might get long so hang in there...

I did another encode with HB and the same issue was present. I then went back to the original edit in Vegas, made sure audio was in sync throughout and did a new dnxhd render last night. Again, 37 gig file played fine in both QT and VCL player...no audio lag. Imported back into HB and did render. 2 hours later, 1.4 gig file that audio starts out fine and then lags by full second by end of 36 minutes. I put on headphones and found something very interesting about the HB file. At 3:05 there is the first maybe .10 sec pause in the audio. From that point on, every 3.04 minutes, there is a .10 sec pause throughout the file. 3.04 seconds on the nose. I went back to my Vegas timeline, there are 4 audio tracks, expanded each audio track and could not find anything at those 3.04 sec intervals that I could see...nothing. I decided I would remove all audio fx from each track though the only ones were the pre-sets...noise gate ect... I used volume envolopes throughout the project. I then did small segment renders around the 3.04 sec marks at dnxhd then imported those small segments into HB and renders as I would. There is no audio pause in any of those tests and I went to every 3.04 sec area. I am now doing a full re-render of the project, dnxhd, and will report back when that is done.
musicvid10 wrote on 1/23/2012, 10:19 AM
Is your DNxHD audio PCM?
We just touched on this in another thread.
Weldon wrote on 1/23/2012, 11:58 AM
musicvid,
My audio in DNxHD is in fact PCM.