Vegas pro 13 (Build 453) x264vfw rendering.Video and audio out of sync

judelaw wrote on 11/18/2018, 10:57 PM

Good morning everyone,

The timeline plays fine, but the rendered video is out out of sync. It stars with a black out : No video during one or two seconds while the audio is playing. Basically the audio kicks in before the video and the video is delayed all along the clip.

I tried to play the video in both my computers and in both MPC-HC and videolan, and it's the same.

Here are my rendering settings :

HD 720 60p using YUV codec OpenDML compatible

Frame size : HDV 720 (1280x720)

Frame size : 29.970 (NTSC)

Field order : None (Progressive scan)

Pixel aspect : 1.000

Video format : x264vfw - h.264/mpeg-4 AVC codec

Audio : PCM uncompressed with 48000Hz sample rate, 24 bit depth, Stereo. (I don't want to use anything else for audio)

Comments

judelaw wrote on 11/18/2018, 11:10 PM

There is no sync issue if I use the "Sony yuv codec" instead of the "x264vfw - h.264/mpeg-4 AVC codec", but the rendered file is 10.7GB instead of 129MB.

judelaw wrote on 11/18/2018, 11:11 PM

I tried both CRF and ABR, problem persists.

Edit : Switched from 29.970 to 25fps, problem persists.

Edit : Tried "Multipass - Nth pass", got an error message : "An error occurred while creating the media file ****.avi, no compatible video codec was found."

judelaw wrote on 11/19/2018, 1:22 AM

Btw is there anything as compressed as xvid and x264vfw, that accepts a 48000Hz sample rate, 24 bit depth, Stereo audio track ?

I don't know anything about muxing, not sure if it's easy or not, or if it's working at all with PCM, and it's probably not convenient for workflow anyway.

3d87c4 wrote on 11/19/2018, 2:59 AM

This is a known issue...I googled it a year or so ago & it's due to the audio and video being processed separately---the audio by Vegas and the video by a separate x264VFW process (or something along those lines). It happens with other video editors too.

The workaround is to use the File output mode to write the video and audio to separate files, then combine them with FFMPEG.



Here's an example FFMPEG input:

ffmpeg -i video.mp4 -i audio.avi -map 0:v -map 0:a? -map 1:a? -c:a aac  -b:a 192K -c:v copy -b:v 30M -pix_fmt yuv420p -movflags faststart output.mp4
 

Del XPS 17 laptop

Processor    13th Gen Intel(R) Core(TM) i9-13900H   2.60 GHz
Installed RAM    32.0 GB (31.7 GB usable)
System type    64-bit operating system, x64-based processor
Pen and touch    Touch support with 10 touch points

Edition    Windows 11 Pro
Version    22H2
Installed on    ‎6/‎8/‎2023
OS build    22621.1848
Experience    Windows Feature Experience Pack 1000.22642.1000.0

NVIDIA GeForce RTX 4070 Laptop GPU
Driver Version: 31.0.15.2857
8GB memory
 

judelaw wrote on 11/19/2018, 3:15 AM

Thanks 3d87c4.
"Combine" ? What do you mean ? Is it muxed ? rendered ? Does it re-encode the video ? Your example is with aac audio. Will it work fine with PCM ?

Here someone is talking about the zero latency option, but he doesn't recommend it :
http://forum.doom9.org/showthread.php?p=1607548#post1607548
Quote : "BUT this will go with significant quality hit (due disabling B-frames, MBTree and other) so I wouldn't recommend it."

Musicvid wrote on 11/19/2018, 12:57 PM

Combine means to Interleave AVI. .250 for you, .250 for me, ...

There is no earthly reason to use x264vfw in Vegas. It compresses no better than mpeg-2, has bad audio support as you see, and isn't a streaming delivery option, so why do folks buy street hype without evidence of testing.

Musicvid wrote on 11/19/2018, 1:08 PM

Quote : "BUT this will go with significant quality hit (due disabling B-frames, MBTree and other) so I wouldn't recommend it."

B- frames are not available in AVI wrapper. That's why vfw is a worthless delivery plane for interframe-compressed material. I'll be back with some tests, and a challenge for youse guys to devise some of your own.

As for pulling snippets off doom9 and quoting them out of context, I guess... well, you deserve what you get.

3d87c4 wrote on 11/19/2018, 4:47 PM

Combine means to Interleave AVI. .250 for you, .250 for me, ...

There is no earthly reason to use x264vfw in Vegas. It compresses no better than mpeg-2, has bad audio support as you see, and isn't a streaming delivery option, so why do folks buy street hype without evidence of testing.

I've been using it for a year or two now, for one reason: it can render side-by-side and top/bottom full 3D.

I have repeatedly asked, on this forum, for recommendations of an alternative that can do that, and no one has replied.

And no, that's not what I mean by combine.

Del XPS 17 laptop

Processor    13th Gen Intel(R) Core(TM) i9-13900H   2.60 GHz
Installed RAM    32.0 GB (31.7 GB usable)
System type    64-bit operating system, x64-based processor
Pen and touch    Touch support with 10 touch points

Edition    Windows 11 Pro
Version    22H2
Installed on    ‎6/‎8/‎2023
OS build    22621.1848
Experience    Windows Feature Experience Pack 1000.22642.1000.0

NVIDIA GeForce RTX 4070 Laptop GPU
Driver Version: 31.0.15.2857
8GB memory
 

3d87c4 wrote on 11/19/2018, 4:52 PM

Thanks 3d87c4.
"Combine" ? What do you mean ? Is it muxed ? rendered ? Does it re-encode the video ? Your example is with aac audio. Will it work fine with PCM ?

Here someone is talking about the zero latency option, but he doesn't recommend it :
http://forum.doom9.org/showthread.php?p=1607548#post1607548
Quote : "BUT this will go with significant quality hit (due disabling B-frames, MBTree and other) so I wouldn't recommend it."

Using the file mode of x264VFW yields an MP4 file with the video and an avi file with the audio. The FFMPEG example will pass the video to the output file, without re-rendering it, and do an aac encode of the audio from the avi file.

I have used this with 3D side-by-side full videos and 3D top/bottom full VR videos with conventional and ambisonic audio.

Del XPS 17 laptop

Processor    13th Gen Intel(R) Core(TM) i9-13900H   2.60 GHz
Installed RAM    32.0 GB (31.7 GB usable)
System type    64-bit operating system, x64-based processor
Pen and touch    Touch support with 10 touch points

Edition    Windows 11 Pro
Version    22H2
Installed on    ‎6/‎8/‎2023
OS build    22621.1848
Experience    Windows Feature Experience Pack 1000.22642.1000.0

NVIDIA GeForce RTX 4070 Laptop GPU
Driver Version: 31.0.15.2857
8GB memory