NEED HELP - Audio desync after rendering a video

KilP wrote on 2/25/2024, 8:03 AM

Hello everyone,

After hours and hours spent on different forums and videos trying to solve my issue, sadly I have to admit that I'm completly lost.

So basically, I have a desync after I render the video I'm editing. It is a game video edit, using ingame footage and sound, music, images, and voices recorded after.

When I tried rendering the video before I added the voices and before I fnished polishing it (I added some effects and other images), I had no issues.

Afterthat, I added the voices and some effects/images, and when I rendered the video with the same settings, I had a big desync which grown little by little (in the end, close to 2 seconds sound desync).

 

So I tried a lot of things. I tried rendering using different codecs, different settings, it didn't worked. I tried to open a new project and render the sound only, and take back the newly edited sound to see if it was desync, and it indeed was (which is weird, considering that it was just the sound). I tried to delete all the sounds/musics and keep only the ingame sound (which appeared to be the one which get desync) just the same as I did when I tried the first rendering without the desync, and I still had the desync. I also tried to reset vegas settings to default, and the desync is still there.

So to conclude, I am completly lost and I have no clue about what I can do to tackle this desync thing, also considering that it desync the game sound which worked perfectly fine before...

If you need it, here are the two summaries for the vid which worked (unpolished and without the voices), and the one with desync :

- VIDEO WITH NO ISSUES

Format                                   : MPEG-4
Profil du format                         : Base Media / Version 2
Identifiant du codec                     : mp42 (isom/mp42)
Taille du fichier                        : 2,80 Gio
Durée                                    : 10 min 18s
Type de débit global                     : Variable
Débit global moyen                       : 38,9 Mb/s
Images par seconde                       : 60,000 Im/s
Date d'encodage                          : 2024-02-20 10:46:47 UTC
Date de marquage                         : 2024-02-20 10:46:47 UTC

Vidéo
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Profil du format                         : High@L5.2
Paramètres du format                     : CABAC / 3 Ref Frames
Paramètres du format, CABAC              : Oui
Paramètres du format, RefFrames          : 3 images
Paramètres du format, GOP                : M=1, N=30
Identifiant du codec                     : avc1
Identifiant du codec/Info                : Advanced Video Coding
Durée                                    : 10 min 18s
Débit                                    : 38,4 Mb/s
Largeur                                  : 3 840 pixels
Hauteur                                  : 2 160 pixels
Format à l'écran                         : 16/9
Type d'images/s                          : Constant
Images par seconde                       : 60,000 Im/s
Espace de couleurs                       : YUV
Sous-échantillonnage de la chrominance   : 4:2:0
Profondeur des couleurs                  : 8 bits
Type de balayage                         : Progressif
Bits/(Pixel*Image)                       : 0.077
Taille du flux                           : 2,77 Gio (99%)
Langue                                   : Anglais
Date d'encodage                          : 2024-02-20 10:46:48 UTC
Date de marquage                         : 2024-02-20 10:46:48 UTC
Gamme de couleurs                        : Limited
Codec configuration box                  : avcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Identifiant du codec                     : mp4a-40-2
Durée                                    : 10 min 18s
Type de débit                            : Variable
Débit                                    : 443 kb/s
Débit maximum                            : 883 kb/s
Canaux                                   : 2 canaux
Channel layout                           : L R
Echantillonnage                          : 96,0 kHz
Images par seconde                       : 93,750 Im/s (1024 SPF)
Mode de compression                      : Avec perte
Taille du flux                           : 32,6 Mio (1%)
Langue                                   : Anglais
Date d'encodage                          : 2024-02-20 10:46:48 UTC
Date de marquage                         : 2024-02-20 10:46:48 UTC

 

- VIDEO WITH THE DESYNC (voices and other effects added)
Vidéo
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Profil du format                         : High@L5.2
Paramètres du format                     : CABAC / 3 Ref Frames
Paramètres du format, CABAC              : Oui
Paramètres du format, RefFrames          : 3 images
Paramètres du format, GOP                : M=1, N=30
Identifiant du codec                     : avc1
Identifiant du codec/Info                : Advanced Video Coding
Durée                                    : 10 min 18s
Débit                                    : 38,4 Mb/s
Largeur                                  : 3 840 pixels
Hauteur                                  : 2 160 pixels
Format à l'écran                         : 16/9
Type d'images/s                          : Variable
Images par seconde                       : 60,000 Im/s
Images/s mini                            : 60,000 Im/s
Images/s maxi                            : 60,060 Im/s
Espace de couleurs                       : YUV
Sous-échantillonnage de la chrominance   : 4:2:0
Profondeur des couleurs                  : 8 bits
Type de balayage                         : Progressif
Bits/(Pixel*Image)                       : 0.077
Taille du flux                           : 2,77 Gio (99%)
Langue                                   : Anglais
Date d'encodage                          : 2024-02-25 12:49:39 UTC
Date de marquage                         : 2024-02-25 12:49:39 UTC
Gamme de couleurs                        : Limited
Codec configuration box                  : avcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Identifiant du codec                     : mp4a-40-2
Durée                                    : 10 min 18s
Type de débit                            : Variable
Débit                                    : 443 kb/s
Débit maximum                            : 742 kb/s
Canaux                                   : 2 canaux
Channel layout                           : L R
Echantillonnage                          : 96,0 kHz
Images par seconde                       : 93,750 Im/s (1024 SPF)
Mode de compression                      : Avec perte
Taille du flux                           : 32,6 Mio (1%)
Langue                                   : Anglais
Date d'encodage                          : 2024-02-25 12:49:39 UTC
Date de marquage                         : 2024-02-25 12:49:39 UTC

 

Thank you very much in advance if you achieve to help me out !

Comments

mark-y wrote on 2/25/2024, 8:35 AM

Thanks for posting your media properties. You didn't provide your Vegas version and build number, but your media does provide a clue.

The first video is Constant frame rate. And it has no sync issue.

The second video is Variable frame rate. And that is likely the cause of your desync, although there doesn't look to be a big fluctuation.

Vegas versions 17 and earlier don't work right with CFR at all. Versions 18 and up work better, but not always.

For now, convert your video to Constant frame rate using Shutter Encoder or Handbrake; both are free utilities.

Going forward, choose a Constant frame rate recording mode in your capture program. Note that variable bit rate is ok, that is a separate consideration.

For additional help, tell us all about your capture program and settings, in addition to the required troubleshooting information asked for here:

https://www.vegascreativesoftware.info/us/forum/important-information-required-to-help-you--110457/

In general, we have found that OBS works better than others for game captures. However, one must be careful to keep the settings Vegas-friendly, and you will get lots of advice on that here, some of it good advice.

KilP wrote on 2/25/2024, 8:54 AM

Thank you for your answer mark-y. I tried rendering in constant framerate too :

Format                                   : MPEG-4
Profil du format                         : Base Media / Version 2
Identifiant du codec                     : mp42 (isom/mp42)
Taille du fichier                        : 3,47 Gio
Durée                                    : 10 min 18s
Type de débit global                     : Variable
Débit global moyen                       : 48,2 Mb/s
Images par seconde                       : 60,000 Im/s
Date d'encodage                          : 2024-02-25 14:10:29 UTC
Date de marquage                         : 2024-02-25 14:10:29 UTC

Vidéo
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Profil du format                         : High@L5.2
Paramètres du format                     : CABAC / 3 Ref Frames
Paramètres du format, CABAC              : Oui
Paramètres du format, RefFrames          : 3 images
Paramètres du format, GOP                : M=1, N=30
Identifiant du codec                     : avc1
Identifiant du codec/Info                : Advanced Video Coding
Durée                                    : 10 min 18s
Débit                                    : 47,8 Mb/s
Largeur                                  : 3 840 pixels
Hauteur                                  : 2 160 pixels
Format à l'écran                         : 16/9
Type d'images/s                          : Constant
Images par seconde                       : 60,000 Im/s
Espace de couleurs                       : YUV
Sous-échantillonnage de la chrominance   : 4:2:0
Profondeur des couleurs                  : 8 bits
Type de balayage                         : Progressif
Bits/(Pixel*Image)                       : 0.096
Taille du flux                           : 3,44 Gio (99%)
Langue                                   : Anglais
Date d'encodage                          : 2024-02-25 14:10:31 UTC
Date de marquage                         : 2024-02-25 14:10:31 UTC
Gamme de couleurs                        : Limited
Codec configuration box                  : avcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Identifiant du codec                     : mp4a-40-2
Durée                                    : 10 min 18s
Type de débit                            : Variable
Débit                                    : 443 kb/s
Débit maximum                            : 742 kb/s
Canaux                                   : 2 canaux
Channel layout                           : L R
Echantillonnage                          : 96,0 kHz
Images par seconde                       : 93,750 Im/s (1024 SPF)
Mode de compression                      : Avec perte
Taille du flux                           : 32,6 Mio (1%)
Langue                                   : Anglais
Date d'encodage                          : 2024-02-25 14:10:31 UTC
Date de marquage                         : 2024-02-25 14:10:31 UTC

 

I had excatly the same issue.

I'm sorry I forgot about vegas version, I'm using vegas 21 build 208.

When you say : "convert your video to Constant frame rate using Shutter Encoder or Handbrake", you mean that I try to convert the edited video ?

 

I will try to record with OBS, I was using GeForce experience to record. I record in 4K, 60fps, 90mbps.

I have windows 11 Family - v23H2

My computer is a laptop : 13th Gen Intel(R) Core(TM) i9-13980HX   2.20 GHz - 32 Go RAM - Nvidia GeForce RTX 4080 12 Go GDDR6

 

Also as en example of the video recorded, here is the property of one of them used, they all have the same : Vidéo : 2560x1600 - 50002 Kbits/s - 60fps

Audio :191 kbits/s - 48.000KHz - 2 stereo

Encoded by GeForce SHARE

 

mark-y wrote on 2/25/2024, 9:50 AM

I don't see anything very unusual about that capture. Audio is 96Khz, should be 48Khz, but that should not cause a desync in Vegas.

I meant to say to convert your VFR-captured video before editing in Vegas -- converting your edited version won't accomplish anything.

If you want to upload an original capture that desyncs in Vegas that shows the problem, it is possible to run a deeper analysis, but do try OBS as well.

KilP wrote on 2/25/2024, 11:44 AM

Well I will send a message to the support, I don't think I have the strengh to start again the whole edit which took me maybe 30h.

I will try to upload the orignal capture.

DMT3 wrote on 2/25/2024, 12:46 PM

You shouldn't need to re-edit. Convert the files that have a Variable Frame rate using the suggested program. Put them in a new folder with the same original names, copy all of the other source files to that same folder. change the name of the original folder, when you open Vegas it will ask where the files are located. Change the location of the first to the new folder and the rest should follow. It should fit right in or with minimal adjustments.

mark-y wrote on 2/25/2024, 3:10 PM

@KilP Vegas has a very friendly "Replace" menu command by right-clicking on the video in the Project Media window. It is instant, and it works.

KilP wrote on 2/25/2024, 5:20 PM

Thank you for your answers. I tried to converted all the videos from ingame footage in "constant". I also converted all the voices recorded after to match the same settings as the video audio.

None of it worked, even when I render in constant the whole video...

I also tried again to render only the sounds (music, voices and ingame audio), and still it has this desync problem, exactly the same as before.

Do i have to try to convert the ingame video to another encoding ?

Does it have something to do with the rendering settings ?

I'll upload on wetransfer tomorrow evening one of the original capture.

mark-y wrote on 2/25/2024, 7:04 PM

While you're at it, post the MediaInfo properties for each of the original source video and audio files -- TBH this issue is kind of unusual.

https://www.vegascreativesoftware.info/us/forum/faq-how-to-post-mediainfo-and-vegas-pro-file-properties--104561/

KilP wrote on 2/28/2024, 4:03 AM

Good morning,

First of all, I must thank you for your help and the time you spent on my issue. I finally achieved to rend the video without the desync after following some steps suggested by the support.

I did a clean reinstall of vegas 21. The desync was still there but I had an improvement in it and performances in general. I had to delete a few visual effects, and then I achieved to render the video without the desync. It worked with a variable framerate. Finally, using Shutter Encoder or Handbrake to have the same encoding for the videos and same encoding for the audio improved the rendering and overwall quality.

It seems that some visual effects were provoking the desync (I still don't understand why)