Question / Help Stinger transition causing audio buffering [Solved]

Janttu

New Member
Hi.

I'm planning on using stinger transitions in the near future, but this issue might prevent me from doing that.
I have clips that use alpha transparency and have audio in them. I've tried two different methods, one with mov (animation) and the other with webm (VP9) files.
Mov files tend to be a lot larger in file size and thus it takes OBS a couple of tries to get them playng properly and thus I would like to use webm files that are much smaller (~500MB vs ~10MB).
Anyway, the problem with webm files as stinger transitions is that they seem a bit choppy and the audio in them also cracks a lot. At the same time I've noticed in the log it adds more time to the audio buffer. After I change the scenes a couple of time the audio buffer is maxed, making the audio slightly worse. Is it just that OBS isn't fully compatible with webm files or what gives?
I have made a new scene collection just to test this. It has two scenes. The first one just has a picture in it and the other vlc source playing an mp4 file. What I did is just switch between these two scenes with the stinger transition. Oh and the video is about 6 seconds long and set so transition happens at 5 second mark.

Here's the log: https://obsproject.com/logs/9p3Kx9VIsfgxy7Xw
 

Janttu

New Member
I just tried with the other audio codec option webm has to offer and it does the exact same thing (these audio codecs are Vorbis and Opus). However, if I export the file without audio, I can see it only adds "adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds" in the log once and it doesn't fill the buffer like it does when I have the file with audio.
Could the issue be related to these audio codecs?
 

Der Fleischmann

New Member
Yeah, I have the same problem like you! It also doesn't matter if you are using 30 or 60 fps stinger transitions, it always results in audio choppiness and lost frames from rendering. Just asked for help on that regard in here and over at the Discord server, but didn't got my problem resolved. I see that you have an Intel, because I thought that the problem was only with Ryzen systems, but here we go...

I would really like to see a working solution for that too!
 

Janttu

New Member
So I've done a lot of googling / testing and think I've finally found a solution. Too late now to make a proper post so I'll just do it tomorrow :D. In short, needed to use ffmpeg program to compress the video (it compressed the 6s long, 3 GB avi file to 100 MB avi file).
 

Janttu

New Member
I have couple of different stinger transitions and only one of the five adds the audio buffer couple of times but not after that, so it's massive improvement to what it was. The other four transitions don't do this, even tho all of these are very similar, with audio. Anyway, here's what I did:

In After Effects, export your project using AE's own export function, not Media Encoder.
Click on the "Lossless" preset. Make sure format is AVI and under video output "Channels" is "RGB + Alpha".
Export the video.
Download latest version of ffmpeg from https://www.ffmpeg.org/
Extract/Move ffmpeg.exe to the same folder where you have the videos you want to compress.
Make a new txt file in the same folder and rename it to Compress.bat (make sure you can see file extensions).
Edit "Compress.bat" file and insert the following in it and save:
Code:
@echo off
ffmpeg -guess_layout_max 0 -i "Original.avi" -map 0 -c:v prores_ks -pix_fmt yuva444p10le -profile:v 4444 -q:v 35 -c:a pcm_s16le "Compressed.avi"
echo.
echo Ready!
pause >nul
In the "Compress.bat" file, modify it so "Original.avi" is the file you want to compress and "Compressed.avi" is what you want the compressed file to be called.
You can also change the quality which determines how much it's compressed. You can do it by editing the value of -q:v 35. Value can be between 0 and 64, where 0 is the best quality and 64 worst. 35 seems to be a good value for good quality and compression, but you can experiment with this.
You can also use command prompt if you don't want to use the bat file. Just go to the folder you have all the files and do the ffmpeg command.

Once you have the files just try and see how they work in OBS. Hope this helps!
 

Attachments

  • Output_settings.png
    Output_settings.png
    46.2 KB · Views: 523
I have couple of different stinger transitions and only one of the five adds the audio buffer couple of times but not after that, so it's massive improvement to what it was. The other four transitions don't do this, even tho all of these are very similar, with audio. Anyway, here's what I did:

In After Effects, export your project using AE's own export function, not Media Encoder.
Click on the "Lossless" preset. Make sure format is AVI and under video output "Channels" is "RGB + Alpha".
Export the video.
Download latest version of ffmpeg from https://www.ffmpeg.org/
Extract/Move ffmpeg.exe to the same folder where you have the videos you want to compress.
Make a new txt file in the same folder and rename it to Compress.bat (make sure you can see file extensions).
Edit "Compress.bat" file and insert the following in it and save:
Code:
@echo off
ffmpeg -guess_layout_max 0 -i "Original.avi" -map 0 -c:v prores_ks -pix_fmt yuva444p10le -profile:v 4444 -q:v 35 -c:a pcm_s16le "Compressed.avi"
echo.
echo Ready!
pause >nul
In the "Compress.bat" file, modify it so "Original.avi" is the file you want to compress and "Compressed.avi" is what you want the compressed file to be called.
You can also change the quality which determines how much it's compressed. You can do it by editing the value of -q:v 35. Value can be between 0 and 64, where 0 is the best quality and 64 worst. 35 seems to be a good value for good quality and compression, but you can experiment with this.
You can also use command prompt if you don't want to use the bat file. Just go to the folder you have all the files and do the ffmpeg command.

Once you have the files just try and see how they work in OBS. Hope this helps!



Just to let you know. I did try this but it has not seem to do too much for me. I will try anything to make this stinger play audio. I mean, I could use a file without audio, that is an option. Thank you for your info though. Mine comes up with unrecognised command when I try it. It's a strange issue for OBS to have. I wonder if they will resolve it. Thank you ^_^



1550875461741.png
 
Just to let you know. I did try this but it has not seem to do too much for me. I will try anything to make this stinger play audio. I mean, I could use a file without audio, that is an option. Thank you for your info though. Mine comes up with unrecognised command when I try it. It's a strange issue for OBS to have. I wonder if they will resolve it. Thank you ^_^



View attachment 43367

in fact. scratch that. i did end up getting ffmpeg to install in the end. but still to no avail to the audio buffer issue with OBS :) thank you very much however for your thoughts and time.
 

Janttu

New Member
Hey!

I noticed after this that it also depends on what you have in your scene. The more things in it, the more likely it is to buffer. I ended up buying a better CPU since I noticed that every time I did a stinger transition, the CPU jumped to close 100% usage and was the main cause of the issue. VLC and Elgato sources seem to cause spikes in CPU usage, at least for me. With the new CPU the audio buffering / cracking is pretty much all gone even in "busier" scenes.
 
Hey!

I noticed after this that it also depends on what you have in your scene. The more things in it, the more likely it is to buffer. I ended up buying a better CPU since I noticed that every time I did a stinger transition, the CPU jumped to close 100% usage and was the main cause of the issue. VLC and Elgato sources seem to cause spikes in CPU usage, at least for me. With the new CPU the audio buffering / cracking is pretty much all gone even in "busier" scenes.


Thank you, thank you. Any info to help is amazing. I have seen some broadcasters use stingers successfully with no audio issues like that. I actually use a dual PC set up as well. 1 PC for obs only and 1 for the game only. and the CPU doesn't spike at all. The cpu is definitely going up when i scene swap. But doesn't go higher then 70% usage. I will continue to search for the answer. There must be a solution out there somewhere. For example, here is a stinger example from Doc Dis that works perfectly for audio and for video as well.

https://clips.twitch.tv/WildObedientMonitorNerfBlueBlaster
 

EllipsesMark

New Member
OK!!!! I figured it out! At least on my end. So when I'm editing my audio. I've tried everything. However, I noticed, being the audio engineer/music producer, that the sound was creating this lag. I knew it had to be the audio because monitor out was off. I went back into the AE file and can't see audio editing very well. So what I did, was I edited my scene transition in AE. Exported it lossless into premiere with the alpha channel AVI. Then I edited my audio in premiere with the audio track mixer. Exported it to WEBM and still was getting massive lag and distortion. What I had on my audio master channel was an audio limiter. I took that off and mixed all my sounds to be roughly -8 to -5 dB. After exporting it to WEBM again and input this into OBS. The lag disappeared completely. Now it plays smooth with no dropped frames and no lag on the audio. No audio buffer. It plays clean.

I really hope this helps. Ive been racking my head against this issue for a little over 3 months now.

DO NOT CLIP YOUR AUDIO!!!!
 

Janttu

New Member
Thanks for the reply. You said you had an audio limiter in your master channel. Where do I see this and how can I disable it? I've done other steps before that so far.
 

Narcogen

Active Member
He means he had added a filter of the type Limiter to a source or scene. If you had added one, you'd know where to look to remove it. If you haven't added one, then there's nothing to remove.
 

Thall33

New Member
Solved! In After effects or premier (any of your video editing software) make sure at least the first few frames has the lowest or zero audio volume, I clipped the first 2 frames to have no audio and it had no pre or warm up clicks or sound bugs for me in streamlabs, after hours of other failed attempts. Hope this helps!
 
Top