Question / Help Audio desyncs from video as time goes on

McEgan

New Member
So I tried streaming my PC gameplay for the first time (I've been doing xbox 360 for months now with no issues)..I ended up having to use my Avermedia Live Gamer HD to capture as my weak 9800GTX couldn't keep up with using game capture and playing the game. I was sending both the video and audio through HDMI. It seemed to work ok, except the frame rate on the output was still a little choppy even with using card (probably just my GPU being weak again).

Anyway, I streamed for about 9 hours and I went back to watch it. The first few hours are ok...audio and video seem synced. Then I fast forwarded to the last hour and noticed audio and video were heavily desynced. I read over on the xsplit forum for this capture card that this happens whenever you tab into and out of a game. I don't know if thats what caused it here, but I did tab in/out about 15-20 times over the course of the gameplay. Is there something I can change so that this doesn't happen, even with tabbing in/out? Below is the video, and the log.

http://www.twitch.tv/footjobkid/b/473874625


Code:
21:12:13: Open Broadcaster Software v0.553b - 64bit ( ^ω^)
21:12:13: -------------------------------
21:12:13: CPU Name: Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
21:12:13: CPU Speed: 3500MHz
21:12:13: Physical Memory:  8139MB Total, 3923MB Free
21:12:13: stepping id: 9, model 10, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 8, total cores 4
21:12:13: monitor 1: pos={-1920, 0}, size={1920, 1080}
21:12:13: monitor 2: pos={0, 0}, size={1920, 1080}
21:12:13: Windows Version: 6.1 Build 7601 S
21:12:13: Aero is Enabled
21:12:13: -------------------------------
21:12:13: OBS Modules:
21:12:13: Base Address     Module
21:12:13: 000000003F530000 OBS.exe
21:12:13: 00000000EEA40000 OBSApi.dll
21:12:13: 00000000F8400000 DShowPlugin.dll
21:12:13: 00000000F84F0000 GraphicsCapture.dll
21:12:13: 00000000F84C0000 NoiseGate.dll
21:12:13: 00000000F84A0000 PSVPlugin.dll
21:12:13: ------------------------------------------
21:12:13: Adapter 1
21:12:13:   Video Adapter: NVIDIA GeForce 9800 GTX+
21:12:13:   Video Adapter Dedicated Video Memory: 511246336
21:12:13:   Video Adapter Shared System Memory: 3757649920
21:47:04: =====Stream Start: 2013-10-26, 21:47:04===============================================
21:47:04:   Multithreaded optimizations: On
21:47:04:   Base resolution: 1280x720
21:47:04:   Output resolution: 1280x720
21:47:04: ------------------------------------------
21:47:04: Loading up D3D10 on NVIDIA GeForce 9800 GTX+...
21:47:04: C:/Users/McEgan/AppData/Roaming/OBS/shaderCache/shaders/DrawTexture.pShader.blob
21:47:04: C:/Users/McEgan/AppData/Roaming/OBS/shaderCache/shaders/DrawSolid.pShader.blob
21:47:04: C:/Users/McEgan/AppData/Roaming/OBS/shaderCache/shaders/DrawYUVTexture.pShader.blob
21:47:04: Playback device Default
21:47:04: ------------------------------------------
21:47:04: Using desktop audio input: S/PDIF Pass-through Device (2- ASUS Xonar Essence STX Audio Device)
21:47:04: ------------------------------------------
21:47:04: Using auxilary audio input: Microphone (2- ASUS Xonar Essence STX Audio Device)
21:47:04: ------------------------------------------
21:47:04: Audio Encoding: AAC
21:47:04:     bitrate: 160
21:47:04: ------------------------------------------
21:47:04:     device: AVerMedia HD Capture C985 Bus 7,
21:47:04:     device id \\?\pci#ven_1af2&dev_a001&subsys_a0011af2&rev_00#4&299066b9&0&00e6#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{957bd672-7934-4b55-b81a-3e22b14c679a},
21:47:04:     chosen type: YV12, usingFourCC: true, res: 1280x720 - 1280x720, frameIntervals: 166666-666666, fourCC: 'YV12'
21:47:04: 
21:47:04: C:/Users/McEgan/AppData/Roaming/OBS/shaderCache/plugins/DShowPlugin/shaders/YVUToRGB.pShader.blob
21:47:04:     device audio info - bits per sample: 16, channels: 2, samples per sec: 44100, block size: 4
21:47:04: Using directshow input
21:47:04: C:/Users/McEgan/AppData/Roaming/OBS/shaderCache/shaders/DrawTexture_ColorAdjust.pShader.blob
21:47:04: ------------------------------------------
21:47:04: Video Encoding: x264
21:47:04:     fps: 60
21:47:04:     width: 1280, height: 720
21:47:04:     preset: medium
21:47:04:     CBR: yes
21:47:04:     CFR: no
21:47:04:     max bitrate: 3000
21:47:04:     buffer size: 3000
21:47:04: ------------------------------------------
21:47:04: MMDeviceAudioSource: Frequency for device 'S/PDIF Pass-through Device (2- ASUS Xonar Essence STX Audio Device)' is 352800, samples per sec is 44100
21:47:04: MMDeviceAudioSource: Frequency for device 'Microphone (2- ASUS Xonar Essence STX Audio Device)' is 352800, samples per sec is 44100
21:47:06: Using RTMP service: Twitch / Justin.tv
21:47:06:   Server selection: rtmp://live-jfk.justin.tv/app
21:47:06:   Interface: Realtek PCIe GBE Family Controller (ethernet, 1000 mbps)
21:47:09: SO_SNDBUF was at 8192
21:47:09: SO_SNDBUF is now 65536
21:47:11: RTMPPublisher::Socketloop: Increasing send buffer to ISB 131072 (buffer: 8617 / 404480)
21:47:11: RTMPPublisher::Socketloop: Increasing send buffer to ISB 262144 (buffer: 9865 / 404480)
21:47:13: RTMPPublisher::Socketloop: Increasing send buffer to ISB 524288 (buffer: 0 / 404480)
22:59:52: RTMPPublisher::Socketloop: Increasing send buffer to ISB 1048576 (buffer: 0 / 404480)
07:22:41: Total frames rendered: 2041134, number of late frames: 67938 (3.33%) (it's okay for some frames to be late)
07:22:42: RTMPPublisher::SocketLoop: Graceful loop exit
07:22:42: Number of times waited to send: 0, Waited for a total of 0 bytes
07:22:42: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
07:22:42: 
07:22:42: Profiler results:
07:22:42: 
07:22:42: ==============================================================
07:22:42: frame - [100%] [avg time: 9.169 ms (cpu time: avg 4.493 ms, total 9.1723e+006 ms)] [avg calls per frame: 1] [children: 100%] [unaccounted: 0.0436%]
07:22:42: | frame preprocessing and rendering - [24.5%] [avg time: 2.246 ms (cpu time: avg 2.166 ms, total 4.42216e+006 ms)] [avg calls per frame: 1] [children: 23.1%] [unaccounted: 1.35%]
07:22:42: | | scene->Preprocess - [23.1%] [avg time: 2.122 ms (cpu time: avg 2.048 ms, total 4.18083e+006 ms)] [avg calls per frame: 1]
07:22:42: | video encoding and uploading - [75.5%] [avg time: 6.919 ms (cpu time: avg 2.325 ms, total 4.74706e+006 ms)] [avg calls per frame: 1] [children: 75.3%] [unaccounted: 0.12%]
07:22:42: | | flush - [0.633%] [avg time: 0.058 ms (cpu time: avg 0.051 ms, total 104162 ms)] [avg calls per frame: 1]
07:22:42: | | CopyResource - [65.7%] [avg time: 6.02 ms (cpu time: avg 1.477 ms, total 3.01569e+006 ms)] [avg calls per frame: 0]
07:22:42: | | conversion to 4:2:0 - [0.0763%] [avg time: 0.007 ms (cpu time: avg 0.003 ms, total 7363.24 ms)] [avg calls per frame: 0]
07:22:42: | | call to encoder - [8.87%] [avg time: 0.813 ms (cpu time: avg 0.776 ms, total 1.58396e+006 ms)] [avg calls per frame: 0]
07:22:42: | | sending stuff out - [0.109%] [avg time: 0.01 ms (cpu time: avg 0.009 ms, total 19796.5 ms)] [avg calls per frame: 0]
07:22:42: | Convert444Threads - [369%] [avg time: 33.847 ms (cpu time: avg 0.819 ms, total 1.67219e+006 ms)] [avg calls per frame: 1]
07:22:42: ==============================================================
07:22:42: 
07:22:42: =====Stream End: 2013-10-27, 07:22:42=================================================

(code tags people.. code tags -jim)
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Turn on "Use Buffering" (at 0 is fine). The option will ensure syncing. This will also be fixed in the rewrite as the design finally fixes the necessity for the option as well as device audio/video syncing.
 

uNbea7

New Member
well I've got the same problem. this issue started with an obs update somewhere between june/july 2013... since then I had the issue that after minutes a short audio delay occurs... and over time it gets worse. unfortunately the buffering function or adjusting my audio quality to the same as my local device isnt helping either.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
If you do have this issue, please make sure to specify with what device, and what specifically is coming after what. Also, a log file is nice just to see specs and further device information.
 

uNbea7

New Member
Hello Jim,

sorry for the inconvenience. I'll try to explain it step by step.
My current streaming setup consists of one streaming pc with the Live Gamer HD C985 and a gaming pc.
The issue that im having is quite severe, the longer i play the more of an audio delay I get. I capture Video and Audio via HDMI on the Liver Gamer HD.When I start streaming everything is fine, after a few minutes the audio tends to be delayed by a few milisecs... unfortunately as time goes by the delay is getting bigger and bigger. I tried everything I found in this forum, buffering, audio qualities, different streaming setups ( more frames / less frames / different resolutions). I'll provide you a few logs with different settings where the problem with the audio occurs.

The funny thing is that all started arround june/july with an OBS Update. If I install an older version of OBS i dont have any problems with the audio, additionally I dont have any issues with audio when I use other programs (well got other problems there :P). Unfortunately I cant use the older OBS version because the Microphone Noise Gate isnt in there yet and I have static mic noise in the background all the time.

a few logfiles on my ftp:
http://www.iamfriendly.de/OBS.zip

regards and thanks,


uNbea7




edit. Version 0.522b working without problems... any version later produces that audio problem
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Come by chat some time so I can take a closer look at exactly what commit caused the problem.
 

uNbea7

New Member
Hi Jim,

im fairly certain now that the issue is created by "alt-tab"ing out of the game. (BF3 / BF4) I'll test the next few days streaming without the HDMI Audio to desktop and use 3,5mm audio out - line in method. I'll keep you up to date about this issue...

regards,

Alex aka uNbea7
 
Top