Bug Report New Webcam causes growing delay

Lain

Forum Admin
Lain
Forum Moderator
Developer
I'll see what sort of hack I can work up or something, not sure
 

KOKOStern

Member
Finally found something that works!

I got LWS (Logitech Webcam Software) which comes with the driver for the webcam anyways.

When I record with LWS, everything is smooth and works fine and there's no delay (but obviously my options are limited).

So here's what I do - I just leave LWS on, it shows the camera preview, and from OBS I use software capture to capture just the camera portion of the window.

I get no lag camera (as it's sort of in preview mode all the time and not actually recording).

The only problem with this technique, is that the LWS preview is always 640x360, and only records on higher resolutions. When I capture the screen portion, it looks kinda crappy, certainly not using the full power of my webcam here.

I'm not sure how to actually get this looking better, but at least it's a start :).
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
I don't know what's causing it but I'm going to find out. This is bugging the living heck out of me and I'm going to get it fixed.

Could any of you willing test subjects see if you can experiment with older versions to see if there is any version where it was working or not?
 

KOKOStern

Member
I'm willing to do anything you'd ask me, if you want to contact me directly and run "live" tests while skype chatting I'd be down for that as well.

I've had the camera for several months and it hasn't been working on any version.

Tell me what you want done.
 

Bacon_Donut

New Member
Just wanted to put my hat in on the delay issue as well. It used to grow over time, which is a big deal when you stream for 8 hours or more, but one of the recent updates seemed to fix that and now it's a consistent 2 seconds or so for the whole time.

I use a Logitech C615 web cam.
 

mainpmf

New Member
I've been doing casual stream since the older versions of alpha obs.
I'm using the Logitech c920 and right now I always have a growing delay, if I change the webcam video format it gets nearly fixed. And i'm almost sure that there was an older version of obs that didn't caused any issues. If anyone also has a c920 and want to test it live add me on skype: mainpmf
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Could you guys try using the "Use mic QPC timestamp" feature in the advanced section of 0.473b test build 3? Also, increase the "scene buffering time" to like 700. Try it both on/off and see how it works.

You guys can also talk to me directly on IRC (#obsproject on quakenet) anytime if you ever have time to talk directly. I'm pretty much always on unless asleep. Just make sure to private message me to get my attention. Also KOKOStern, I sent you both a private message and email.
 

EasyGaming

New Member
So i have the C920 HD Pro and still the problem.
If i turn the webcam resolution down to 1280x720 it seems to be ok...

Some minutes ago i try do use 2 webcams the same time.
New sceen:
First the c920 with 1920x1080 in the right corner (only a very very smal delay) and then my old hercules dualpix hd720p with 1280x720 in the left corner. After i hit the OK button for the 2nd cam, the c920 have a huge delay. (1-2 sec)
Then i switch to an other sceen and back.
The delay is gone... (only the very very smal one is still there)

The same with scrolling text.
I try a very long scrolling text with border. Click ok = Huge Delay @ the prewiev.

I hope this was helpful.

greetz easy

Code:
Open Broadcaster Software v0.473b (test build 6) - 64bit ( ^ω^)
-------------------------------
CPU Name: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
CPU Speed: 3392MHz
Physical Memory:  16295MB Total, 11769MB Free
stepping id: 7, model 10, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 8, total cores 4
monitor 1: pos={0, 0}, size={1920, 1080}
monitor 2: pos={1920, 0}, size={1920, 1080}
Windows Version: 6.1 Build 7601 S
Aero is Disabled
------------------------------------------
Adapter 1
  Video Adapter: NVIDIA GeForce GTX 570
  Video Adapter Dedicated Video Memory: 1293352960
  Video Adapter Shared System Memory: 2952343552
------------------------------------------
Adapter 2
  Video Adapter: Intel(R) HD Graphics 3000
  Video Adapter Dedicated Video Memory: 67108864
  Video Adapter Shared System Memory: 1711276032
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1920x1080
------------------------------------------
Loading up D3D10...
Playback device {0.0.0.00000000}.{7d70eae7-2b0b-40c9-a91b-6d962b40ba51}
------------------------------------------
Using desktop audio input: Lautsprecher (Creative SB X-Fi)
Using 5.1 speaker setup
------------------------------------------
Using auxilary audio input: Kopfhörermikrofon (2- AKG Perception 120 USB)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
Using bitmap image
------------------------------------------
    device: Dualpix HD720p for Notebooks,
    device id \\?\usb#vid_06f8&pid_300b&mi_00#7&2bcbac03&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global,
    chosen type: YUY2, usingFourCC: false, res: 1280x800 - 1280x800, fps: 5-10, fourCC: 'YUY2'

Using directshow input
------------------------------------------
    device: Logitech HD Pro Webcam C920,
    device id \\?\usb#vid_046d&pid_082d&mi_00#7&2fd1f0c6&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083},
    chosen type: RGB24, usingFourCC: false, res: 1920x1080 - 1920x1080, fps: 5-30, fourCC: 00000000

Using directshow input
x264: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
x264: profile High, level 4.0
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1920, height: 1080
    preset: veryfast
    CBR: no
    CFR: no
    max bitrate: 3700
    buffer size: 3700
    quality: 8
------------------------------------------
Using text output
++++++++++++++++++++++++++++++++++++++++++++++++++++++
  New Scene
Using bitmap image
------------------------------------------
    device: Logitech HD Pro Webcam C920,
    device id \\?\usb#vid_046d&pid_082d&mi_00#7&2fd1f0c6&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083},
    chosen type: MJPG, usingFourCC: false, res: 1280x720 - 1280x720, fps: 5-30, fourCC: 'MJPG'

Using directshow input
------------------------------------------
    device: Dxtory Video 1,
    device id (null),
    chosen type: RGB32, usingFourCC: false, res: 1920x1080 - 1920x1080, fps: 30-30, fourCC: 00000000

Using directshow input
++++++++++++++++++++++++++++++++++++++++++++++++++++++
  New Scene
Using text output
Using bitmap image
------------------------------------------
    device: Dualpix HD720p for Notebooks,
    device id \\?\usb#vid_06f8&pid_300b&mi_00#7&2bcbac03&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global,
    chosen type: YUY2, usingFourCC: false, res: 1280x800 - 1280x800, fps: 5-10, fourCC: 'YUY2'

Using directshow input
------------------------------------------
    device: Logitech HD Pro Webcam C920,
    device id \\?\usb#vid_046d&pid_082d&mi_00#7&2fd1f0c6&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083},
    chosen type: RGB24, usingFourCC: false, res: 1920x1080 - 1920x1080, fps: 5-30, fourCC: 00000000

Using directshow input
++++++++++++++++++++++++++++++++++++++++++++++++++++++
  New Scene
Using bitmap image
------------------------------------------
    device: Logitech HD Pro Webcam C920,
    device id \\?\usb#vid_046d&pid_082d&mi_00#7&2fd1f0c6&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083},
    chosen type: MJPG, usingFourCC: false, res: 1280x720 - 1280x720, fps: 5-30, fourCC: 'MJPG'

Using directshow input
------------------------------------------
    device: Dxtory Video 1,
    device id (null),
    chosen type: RGB32, usingFourCC: false, res: 1920x1080 - 1920x1080, fps: 30-30, fourCC: 00000000

Using directshow input
++++++++++++++++++++++++++++++++++++++++++++++++++++++
  New Scene
Using text output
Using bitmap image
------------------------------------------
    device: Dualpix HD720p for Notebooks,
    device id \\?\usb#vid_06f8&pid_300b&mi_00#7&2bcbac03&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global,
    chosen type: YUY2, usingFourCC: false, res: 1280x800 - 1280x800, fps: 5-10, fourCC: 'YUY2'

Using directshow input
------------------------------------------
    device: Logitech HD Pro Webcam C920,
    device id \\?\usb#vid_046d&pid_082d&mi_00#7&2fd1f0c6&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083},
    chosen type: RGB24, usingFourCC: false, res: 1920x1080 - 1920x1080, fps: 5-30, fourCC: 00000000

Using directshow input
Total frames rendered: 19378, number of frames that lagged: 38 (0.20%) (it's okay for some frames to lag)
x264: frame I:80    Avg QP:20.65  size:242977
x264: frame P:4889  Avg QP:21.92  size:  2652
x264: frame B:14356 Avg QP:25.95  size:   436
x264: consecutive B-frames:  0.9%  0.1%  0.1% 98.9%
x264: mb I  I16..4: 35.8% 35.1% 29.1%
x264: mb P  I16..4:  0.3%  0.2%  0.0%  P16..4:  3.1%  0.8%  0.4%  0.0%  0.0%    skip:95.2%
x264: mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.8%  0.3%  0.0%  direct: 0.3%  skip:98.5%  L0:41.3% L1:52.0% BI: 6.7%
x264: 8x8 transform intra:33.8% inter:19.0%
x264: coded y,uvDC,uvAC intra: 64.4% 28.0% 8.2% inter: 0.4% 0.2% 0.0%
x264: i16 v,h,dc,p: 62% 18% 17%  3%
x264: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 12% 43%  7%  5%  5%  4%  5%  5%
x264: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 17% 16%  7%  7%  7%  6%  7%  7%
x264: i8c dc,h,v,p: 60% 21% 17%  2%
x264: Weighted P-Frames: Y:0.1% UV:0.1%
x264: kb/s:477.23
=====Stream End=======================================================================

Profiler results:

==============================================================
frame - [100%] [avg time: 7.508 ms] [avg calls per frame: 1] [children: 90.8%] [unaccounted: 9.2%]
| scene->Preprocess - [21.2%] [avg time: 1.592 ms] [avg calls per frame: 1]
| video encoding and uploading - [69.6%] [avg time: 5.225 ms] [avg calls per frame: 1] [children: 32.4%] [unaccounted: 37.2%]
| | CopyResource - [0.453%] [avg time: 0.034 ms] [avg calls per frame: 0]
| | conversion to 4:2:0 - [0.0666%] [avg time: 0.005 ms] [avg calls per frame: 0]
| | call to encoder - [31.8%] [avg time: 2.391 ms] [avg calls per frame: 0]
| | sending stuff out - [0.0133%] [avg time: 0.001 ms] [avg calls per frame: 0]
==============================================================
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Yes, I've done some testing and it appears to be related to bandwidth usage. If you use a high resolution capture in the device properties, this seems to be more likely to happen.

If you are having this issue, consider lowering the webcam resolution down to only the amount of resolution that you need (often people will have their webcam in the corner of their screen).

USB 2.0 for example does not have the sufficient bandwidth to to 1080p 30fps for webcam images and I think this may be related to the problem but I'm not entirely positive if that is the cause exactly. From my testing, lowering the webcam's resolution and trying out the different output formats helped significantly
 

jwagner01

New Member
I've had the chance to explore this issue a little further and I wanted to share my findings. I've been tinkering in v0.473b test build 11 x64 and, again, I'm using two Lifecam Cinema HDs - that are supposed to be capable of 1280x720 @ 30 FPS. I haven't had any success with the QPC timestamp or any other advanced audio/video feature settings. What I have found is that setting the source to 29 FPS rather than 30 seems to prevent the delay. While the resulting frame rate is certainly sub-optimal, the delay is no longer an issue.

Hopefully someone will find this workaround helpful and hopefully this gets you a little closer to that eureka moment Jim. I'm going to idle in the IRC chat (as jwagner01) for a while. If there is any other info or troubleshooting I can do to help please don't hesitate to let me know.
 
Top