mp4 video audio sync issues

Moderator: Ken Berry

Post Reply
Matt
Posts: 4
Joined: Thu Aug 17, 2017 1:12 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit

mp4 video audio sync issues

Post by Matt »

Using VS Ult 10 to create an mp4 video. I have a rough version but it has audio hiccups that need correction.

I'd like to use Audacity to clean the audio and then re-render the video using the edited audio file. Sounds simple, but I'm getting totally out of sync every way I try.

I thought the sync trouble might come from using Audacity, but I've noticed that I have sync problems even if I just stay in VS.

Example #1: I start a new project with a 20-min mp4 video as a single clip. Project settings match the video. I split the audio and then play the project. For about the first 10 minutes, no obvious sync issues, but by minute 12 there's a separation and by minute 19, the audio is the better part of a second ahead.

Example #2: I start a new project with a 20-min mp4 video as a single clip. I render an audio-only .wav file from the video, then I insert the resulting wav file into an audio track for the project. As above, the audio and video are out of sync.

It seems to me that the audio should be perfectly synced in both of these cases.

Any help on what I'm doing wrong would be greatly appreciated.
User avatar
lata
Site Admin
Posts: 14280
Joined: Thu Jan 19, 2012 6:21 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUSTeK COMPUTER INC A88XM-A USB 3 1 Rev X 0x
processor: 4 10 gigahertz AMD A10-7890K Radeon R7
ram: 16 gb
Video Card: on board
sound_card: Realtek High Definition Audio
Hard_Drive_Capacity: 500 SSD
Monitor/Display Make & Model: LG W2242 [Monitor]
Corel programs: CVSX, 19, 20, 22 PSP2023, PI, MS3D
Location: UK
Contact:

Re: mp4 video audio sync issues

Post by lata »

Hi Matt

And welcome to the forums

It does appear that the audio sync issue is with the original video file.

If you add the video to the timeline or library and play, is there a problem with audio sync?

Right click the clip on the timeline and choose properties, what are they?
You can create an image of that panel to attach to your post.

Also can you say where did you get the video file from?
New forum for PSP and VS users, register if you need help

https://psp-vs-forums.freeforums.net
Matt
Posts: 4
Joined: Thu Aug 17, 2017 1:12 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit

Re: mp4 video audio sync issues

Post by Matt »

Thanks for the quick interest!

Here's the scoop.

The mp4 video was generated by video studio. The project consisted of about 40 clips of mp4 4k video shot on a sony AX53, stitched together, along with some titles.

The properties of the original video (one of multiple similar files) are attached. I'm using the camera's original audio from the mp4 video.

The VS project has been rendered to a lower resolution, 1920 x 1080, mp4 file. When played with VLC, the video and audio are synced. But there are audio artifacts from the editing in the rendered file that don't appear when the project is previewed. Pops and strange hiccups. I can live with that, but I need to be able to clean it up.

I discovered that no matter which way I generate the sound file, it doesn't sync with the video in the rendered mp4 file, before or after it's edited. Even if I load the rendered mp4 file in a new project, split the audio down to the voice track, and then play the project, the video and audio end up out of sync after about 10 minutes of play time.

I wouldn't think it's my computer. I just bought a new HP zbook laptop with an intel i7-7700 HQ @ 2.80ghz, 32 gb of ram, and win10.

If it's the rendered project that's causing the trouble, ok, but then I'm stumped on how

Attached are properties snips of the original 4k video and the 1920 x 1080 rendered mp4 project.
Attachments
Rendered Video Properties.png
Original 4k camera video properties.png
MrJohnny
Posts: 206
Joined: Fri Sep 30, 2016 8:48 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUSTeK COMPUTER INC. RAMPAGE V EXTREME
processor: 3.00 gigahertz Intel Core i7-5960X
ram: 32GB
Video Card: NVIDIA GeForce GTX 960
sound_card: onboard
Hard_Drive_Capacity: 8TB
Monitor/Display Make & Model: ASUS VH226
Corel programs: VS X5 Ult, VS X6 Ult, VS X9Ult,VS X10Ult

Re: mp4 video audio sync issues

Post by MrJohnny »

Hi Matt

The symptoms you describe are usually associated with Variable Frame Rate Video files, now normally MP4 variety.

Can you post a screen shot of the video properties using MediaInfo (tree view)?

The cure, if it is Variable Frame Rate, is to convert to Costant Frame Rate - use Handbrake or equivalent.

John
Matt
Posts: 4
Joined: Thu Aug 17, 2017 1:12 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit

Re: mp4 video audio sync issues

Post by Matt »

Thanks for the suggestion. It looks like it's variable. Here's the mediainfo data on the rendered project:

Format : MPEG-4
Format profile : Base Media
Codec ID : isom (mp41/mp42)
File size : 2.23 GiB
Duration : 23 min 35 s
Overall bit rate mode : Variable
Overall bit rate : 13.5 Mb/s
Encoded date : UTC 2017-08-17 03:26:14
Tagged date : UTC 2017-08-17 03:26:14

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings, CABAC : Yes
Format settings, RefFrames : 2 frames
Format settings, GOP : M=3, N=15
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 23 min 35 s
Bit rate mode : Variable
Bit rate : 13.3 Mb/s
Maximum bit rate : 15.0 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Frame rate : 29.970 (29970/1000) FPS
Minimum frame rate : 29.940 FPS
Maximum frame rate : 30.000 FPS
Original frame rate : 29.970 (30000/1001) FPS
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.214
Stream size : 2.19 GiB (99%)
Language : English
Encoded date : UTC 2017-08-17 03:26:14
Tagged date : UTC 2017-08-17 03:26:14
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709

Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 23 min 35 s
Bit rate mode : Constant
Bit rate : 192 kb/s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 32.5 MiB (1%)
Language : English
Encoded date : UTC 2017-08-17 03:26:14
Tagged date : UTC 2017-08-17 03:26:14

I'll try converting to constant.
Matt
Posts: 4
Joined: Thu Aug 17, 2017 1:12 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit

Re: mp4 video audio sync issues

Post by Matt »

Good news to report. Using a constant rate did the trick. I rendered the project to an mp4 using VS, then ran the mp4 through handbrake to convert it to constant, then pulled the audio off for editing using Audacity, then added the edited audio back to the mp4 using VS and re-rendering it. Now the edited audio syncs with the video. Many, many thanks for helping me solve this problem.
Post Reply