Question / Help Stream seems dropping frames during 1 minute every 1h or so

palomino

New Member
Good morning,

I'm experiencing a strange issue while streaming with Open Broadcaster Software from a EasyCap Video Device (show up as "SMI Grabber Device"). I will try to explain me as clearly as I can.

I'm streaming PAL SD signal from composite input at 720x576 at 25 fps with a bitrate of 2000kbps. The destination server is an NGINX ubuntu linux machine inside my lan and the two systems are wired connected throug a switch. My system is a Core2Quad Q6600 with a Gigabyte Motherboard (P43-ES3G), 7 Gigs of RAM and an Nvidia Geforce GT610.

The stream is smooth most of time and, despite the fact that the system is not a last generation one, it loads about 30%-40% CPU, not more, all time. While I'm streaming I don't use the system and I close several software that could use huge CPU on the backgrount (such as Antivirus).

But I've noticed that after 1h or 1h 30 min (this not happens really at regular time intervals) the stream shows a strange flicker effect, like dropped frames. This effect remains for about a minute or so (maybe not all time) and then dissappears again during another hour or so. I've tried two different capture devices (another Easycap and a Canopus ADVC 55) and the problem persists (it seems more frequent or noticeable with Canopus, maybe because it outputs DV and no UYVY). I've monitored the system while the flicker/dropping effect, and there is no process or operation in the software that may saturate resources, and the log and Open Broadcaster does'nt reflect any frame drop. The dropping effect is shown on preview window, and with Flash Players and the RPI hardware enabled playback using omxplayer. So it's not a decoding fault. I've tried a virtual image of the server running in another computer too and the behaviour is the same, so it's not a server fault.

I've tried installing the software and capture device to another computer (a Core2Quad too, I don't have a newer system) and the behaviour is the same. I've tried using default settings, and with several advanced x264 settings, and nothing seems to change related to this issue. The only thing it seems to reduce the problem is increasing the "Scene buffer size", but not in a much noticeable way.

I would appreciate any help on improving this, because OBS is amazing software, and a really interesting project. Thanks for your time and sorry for my bad english.


This is my log file:

Code:
13:26:12: Open Broadcaster Software v0.592b - 64bit ( ^ω^)
13:26:12: -------------------------------
13:26:12: CPU Name: Intel(R) Core(TM)2 Quad CPU           @ 2.40GHz
13:26:12: CPU Speed: 2399MHz
13:26:12: Physical Memory:  7166MB Total, 5523MB Free
13:26:12: stepping id: 7, model 15, family 6, type 0, extmodel 0, extfamily 0, HTT 1, logical cores 4, total cores 4
13:26:12: monitor 1: pos={0, 0}, size={1024, 768}
13:26:12: Windows Version: 6.1 Build 7601 S
13:26:12: Aero is Disabled
13:26:12: -------------------------------
13:26:12: OBS Modules:
13:26:12: Base Address     Module
13:26:12: 000000003F9D0000 OBS.exe
13:26:12: 00000000F0B70000 OBSApi.dll
13:26:12: 00000000F5480000 DShowPlugin.dll
13:26:12: 00000000F39E0000 GraphicsCapture.dll
13:26:12: 00000000F5540000 NoiseGate.dll
13:26:12: 00000000FAF60000 PSVPlugin.dll
13:26:12: 00000000F5780000 VideoSourcePluginWrapper.dll
13:26:12: ------------------------------------------
13:26:12: Adapter 1
13:26:12:   Video Adapter: NVIDIA GeForce GT 610 
13:26:12:   Video Adapter Dedicated Video Memory: 1024917504
13:26:12:   Video Adapter Shared System Memory: 3221106688
13:26:12:   Video Adapter Output 1: pos={0, 0}, size={1024, 768}, attached=true
13:26:12: =====Stream Start: 2014-01-21, 13:26:12===============================================
13:26:12:   Multithreaded optimizations: On
13:26:12:   Base resolution: 720x576
13:26:12:   Output resolution: 720x576
13:26:12: ------------------------------------------
13:26:12: Loading up D3D10 on NVIDIA GeForce GT 610 (Adapter 1)...
13:26:12: ------------------------------------------
13:26:12: Audio Format: 48000hz
13:26:12: Playback device Default
13:26:12: ------------------------------------------
13:26:12: Using desktop audio input: Altavoces (Creative SB X-Fi)
13:26:12: ------------------------------------------
13:26:12: Audio Encoding: AAC
13:26:12:     bitrate: 128
13:26:12: ------------------------------------------
13:26:12:     device: SMI Grabber Device,
13:26:12:     device id \\?\usb#vid_1c88&pid_003c#smigrabber9876543210#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{03cb1a33-be78-45eb-b276-aa8f201b00f2},
13:26:12:     chosen type: UYVY, usingFourCC: false, res: 160x120 - 720x576, frameIntervals: 400000-400000
13:26:12:     use buffering: false - 0, fourCC: 'UYVY'
13:26:12: 
13:26:12:     device audio info - bits per sample: 16, channels: 2, samples per sec: 48000, block size: 4
13:26:12: Using directshow input
13:26:13: Scene buffering time set to 4000
13:26:13: Using custom x264 settings: "tune=film trellis=2 8x8dct=1 colormatrix=bt470bg sar=16:11"
13:26:13: ------------------------------------------
13:26:13: Video Encoding: x264
13:26:13:     fps: 25
13:26:13:     width: 720, height: 576
13:26:13:     preset: veryfast
13:26:13:     profile: high
13:26:13:     keyint: 250
13:26:13:     CBR: yes
13:26:13:     CFR: yes
13:26:13:     max bitrate: 2000
13:26:13:     buffer size: 2000
13:26:13: ------------------------------------------
13:26:13: MMDeviceAudioSource: Frequency for device 'Altavoces (Creative SB X-Fi)' is 384000, samples per sec is 48000
13:26:22:   Interface: Realtek RTL8168C(P)/8111C(P) Family PCI-E Gigabit Ethernet NIC (NDIS 6.20) (ethernet, 100 mbps)
13:26:22: Completed handshake with rtmp://192.168.0.231/live in 6 ms.
13:26:23: SO_SNDBUF was at 8192
13:26:23: SO_SNDBUF is now 65536
13:26:30: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 131072 (buffer: 0 / 272384)
13:29:36: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 262144 (buffer: 0 / 272384)
20:29:30: Total frames encoded: 634816, total frames duplicated: 4 (0.00%)
20:29:30: Total frames rendered: 634820, number of late frames: 0 (0.00%) (it's okay for some frames to be late)
20:29:31: RTMPPublisher::SocketLoop: Aborting due to WSAEnumNetworkEvents failure, 10038
20:29:31: Average send payload: 5318 bytes, average send interval: 20 ms
20:29:31: Number of times waited to send: 0, Waited for a total of 0 bytes
20:29:31: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
20:29:31: Number of bytes sent: 6745815270
20:29:31: 
20:29:31: Profiler time results:
20:29:31: 
20:29:31: ==============================================================
20:29:31: video thread frame - [100%] [avg time: 1.554 ms] [children: 93.5%] [unaccounted: 6.5%]
20:29:31: | scene->Preprocess - [75.2%] [avg time: 1.168 ms]
20:29:31: | GPU download and conversion - [18.3%] [avg time: 0.285 ms] [children: 17.3%] [unaccounted: 1.03%]
20:29:31: | | flush - [14.5%] [avg time: 0.226 ms]
20:29:31: | | CopyResource - [2.32%] [avg time: 0.036 ms]
20:29:31: | | conversion to 4:2:0 - [0.45%] [avg time: 0.007 ms]
20:29:31: Convert444Threads - [100%] [avg time: 1.013 ms] [children: 99%] [unaccounted: 0.987%]
20:29:31: | Convert444toNV12 - [99%] [avg time: 1.003 ms]
20:29:31: encoder thread frame - [100%] [avg time: 1.402 ms]
20:29:31: ==============================================================
20:29:31: 
20:29:31: 
20:29:31: Profiler CPU results:
20:29:31: 
20:29:31: ==============================================================
20:29:31: video thread frame - [cpu time: avg 1.044 ms, total 662958 ms] [avg calls per frame: 1]
20:29:31: | scene->Preprocess - [cpu time: avg 0.816 ms, total 518532 ms] [avg calls per frame: 1]
20:29:31: | GPU download and conversion - [cpu time: avg 0.048 ms, total 30513.8 ms] [avg calls per frame: 1]
20:29:31: | | flush - [cpu time: avg 0.028 ms, total 18298.9 ms] [avg calls per frame: 1]
20:29:31: | | CopyResource - [cpu time: avg 0.015 ms, total 9796.87 ms] [avg calls per frame: 1]
20:29:31: | | conversion to 4:2:0 - [cpu time: avg 0.001 ms, total 655.201 ms] [avg calls per frame: 1]
20:29:31: Convert444Threads - [cpu time: avg 0.945 ms, total 1.19999e+006 ms] [avg calls per frame: 2]
20:29:31: | Convert444toNV12 - [cpu time: avg 0.943 ms, total 1.19812e+006 ms] [avg calls per frame: 2]
20:29:31: encoder thread frame - [cpu time: avg 1.012 ms, total 642943 ms] [avg calls per frame: 1]
20:29:31: ==============================================================
20:29:31: 
20:29:31: =====Stream End: 2014-01-21, 20:29:31=================================================
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Re: Stream seems dropping frames during 1 minute every 1h or

That particular log didn't report any actual dropped frames (as in the dropped frame indicator on the status bar for example, which means network connectivity issues or insufficient bitrate). Perhaps you mean FPS issues? Your stream setup is pretty good, though your custom x264 settings are a bit unusual. OBS seems to be running fantastic itself:

20:29:30: Total frames encoded: 634816, total frames duplicated: 4 (0.00%)
20:29:30: Total frames rendered: 634820, number of late frames: 0 (0.00%) (it's okay for some frames to be late)
20:29:31: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)

Which means OBS itself did not actually pretty much ever fail to render or fail to send data out. The issue may be from what you're capturing itself, or the device used rather than OBS I'd say at this point, because everything is running at near perfect conditions in OBS itself.
 

palomino

New Member
Re: Stream seems dropping frames during 1 minute every 1h or

Thanks for your quick answer, Jim.

So i will investigate with external adjustments. The flickering isn't caused by the input DVD from where I'm capturing because I've tried more than one video device. The next step I will try is to adjust the power management setting from the nvidia control panel to "performance" to ensure the GPU is not causing the issue by some kind of power saving. I'll comment if this makes any difference.

Thanks in advance for your time.
 
Top