Question / Help Choppiness with AmaRecTV for deinterlacing DVCam

zorgkang

New Member
First thanks for the software! I spent some time looking for a free program that would allow me to record DVcam (through a capture card) and allow me to compress it with x264 so I was really happy when I found this. Unfortunately, then I ran into the deinterlacing issue and my video card does not support the built-in deinterlacing methods (the ones that are decent). So I followed instructions on the forums for deinterlacing in AmaRecTV and streaming that to OBS for recording. The resolution is 720x480 and I would like to go with 60 fps which looks very fluid and nice after deinterlacing. It works, but for some reason, the stream turns choppy on and off (not consistently). Sometimes it's fluid, but then it looks like the fps drops, sometimes there will be a more noticeable stutter. However, OBS reports 0 dropped frames, and both OBS (10-20%) and AmaRec (3-5%) are using little CPU so I don't know where the problem is. Note that I see the same effect in the live stream(s) with varying intensities: the AmaRec window itself, and the OBS preview, but, not at the same time in AmaRec and OBS when I put the 2 windows side by side.

I tend to think the problem is AmaRec, especially since OBS says 0 dropped frames, but at the same time it only uses 3% CPU so why would that be? I'd like confirmation if you think it's AmaRec and hopefully some suggestions to improve my setup. One thing I could do is upgrade the video card in this pc so I could use say yadif2x in OBS, but how do I know what card would be "good enough"? Do you think it's worth it? Any other suggestion? Any other way to use an "external" deinterlacer, like in ffmpeg? I started looking into that, but honestly, it got complicated with command line stuff and not sure if I could stream from ffmpeg to OBS... At that point, it seems I could even encode and record with ffmpeg. But I'd like other users to be able to do it too. Anyway, thanks for any help!
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
First of all, could you post a log file of this? (Although it doesn't necessarily always help, more often than not it does, and I really don't know much about your computer setup without it)
 

zorgkang

New Member
Sure thing.
Code:
14:19:45: Open Broadcaster Software v0.613b - 32bit (´・ω・`)
14:19:45: -------------------------------
14:19:45: CPU Name: Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz
14:19:45: CPU Speed: 2793MHz
14:19:45: Physical Memory:  4095MB Total, 4095MB Free
14:19:45: stepping id: 5, model 30, family 6, type 0, extmodel 0, extfamily 0, HTT 1, logical cores 8, total cores 4
14:19:45: monitor 1: pos={0, 0}, size={1600, 900}
14:19:45: Windows Version: 6.1 Build 7601 S
14:19:45: Aero is Enabled
14:19:45: -------------------------------
14:19:45: OBS Modules:
14:19:45: Base Address     Module
14:19:45: 00200000         OBS.exe
14:19:45: 6C570000         OBSApi.dll
14:19:45: 6D5D0000         DShowPlugin.dll
14:19:45: 6D5B0000         GraphicsCapture.dll
14:19:45: 6D590000         NoiseGate.dll
14:19:45: 6C340000         PSVPlugin.dll
14:19:45: ------------------------------------------
14:19:45: Adapter 1
14:19:45:   Video Adapter: NVIDIA GeForce GTS 240
14:19:45:   Video Adapter Dedicated Video Memory: 1046020096
14:19:45:   Video Adapter Shared System Memory: 3220779008
14:19:45:   Video Adapter Output 1: pos={0, 0}, size={1600, 900}, attached=true
14:19:45: =====Stream Start: 2014-04-10, 14:19:45===============================================
14:19:45:   Multithreaded optimizations: On
14:19:45:   Base resolution: 720x480
14:19:45:   Output resolution: 720x480
14:19:45: ------------------------------------------
14:19:45: Loading up D3D10 on NVIDIA GeForce GTS 240 (Adapter 1)...
14:19:45: D3D10CreateDeviceAndSwapChain1: Failed on NVIDIA GeForce GTS 240: 0x80004002. Trying compatibility mode
14:19:45: ------------------------------------------
14:19:45: Audio Format: 44100 Hz
14:19:45: ------------------------------------------
14:19:45: Audio Channels: 1 Ch
14:19:45: Playback device Default
14:19:45: ------------------------------------------
14:19:45: Using desktop audio input: Speakers (Realtek High Definition Audio)
14:19:45: ------------------------------------------
14:19:45: Audio Encoding: AAC
14:19:45:     bitrate: 48
14:19:45: ------------------------------------------
14:19:45:     device: AmaRec Video Capture,
14:19:45:     device id (null),
14:19:45:     chosen type: RGB32, usingFourCC: false, res: 720x480 - 720x480, frameIntervals: 166833-166833
14:19:45:     use buffering: false - 0, fourCC: 00000000
14:19:45:     audio device: Disable,
14:19:45:     audio device id Disabled,
14:19:45:
14:19:45: Using directshow input
14:19:45: Scene buffering time set to 1000
14:19:45: Using custom x264 settings: "crf=18"
14:19:45: x264: VBV maxrate specified, but no bufsize, ignored
14:19:45: ------------------------------------------
14:19:45: Video Encoding: x264
14:19:45:     fps: 60
14:19:45:     width: 720, height: 480
14:19:45:     preset: medium
14:19:45:     profile: high
14:19:45:     keyint: 250
14:19:45:     CBR: no
14:19:45:     CFR: yes
14:19:45:     max bitrate: 1800
14:19:45:     buffer size: 0
14:19:45:     quality: 14
14:19:45: ------------------------------------------
14:20:27: Total frames encoded: 2458, total frames duplicated: 5 (0.20%)
14:20:27: Total frames rendered: 2462, number of late frames: 0 (0.00%) (it's okay for some frames to be late)
14:20:27:
14:20:27: Profiler time results:
14:20:27:
14:20:27: ==============================================================
14:20:27: video thread frame - [100%] [avg time: 2.385 ms] [children: 83.8%] [unaccounted: 16.2%]
14:20:27: | scene->Preprocess - [17.4%] [avg time: 0.414 ms]
14:20:27: | GPU download and conversion - [66.4%] [avg time: 1.584 ms] [children: 67.6%] [unaccounted: -1.22%]
14:20:27: | | flush - [1.72%] [avg time: 0.041 ms]
14:20:27: | | CopyResource - [65.7%] [avg time: 1.566 ms]
14:20:27: | | conversion to 4:2:0 - [0.252%] [avg time: 0.006 ms]
14:20:27: Convert444Threads - [100%] [avg time: 0.258 ms] [children: 98.1%] [unaccounted: 1.94%]
14:20:27: | Convert444toNV12 - [98.1%] [avg time: 0.253 ms]
14:20:27: encoder thread frame - [100%] [avg time: 0.56 ms] [children: 0.536%] [unaccounted: 99.5%]
14:20:27: | sending stuff out - [0.536%] [avg time: 0.003 ms]
14:20:27: ==============================================================
14:20:27:
14:20:27:
14:20:27: Profiler CPU results:
14:20:27:
14:20:27: ==============================================================
14:20:27: video thread frame - [cpu time: avg 1.172 ms, total 2886.02 ms] [avg calls per frame: 1]
14:20:27: | scene->Preprocess - [cpu time: avg 0.006 ms, total 15.6 ms] [avg calls per frame: 1]
14:20:27: | GPU download and conversion - [cpu time: avg 1.077 ms, total 2652.02 ms] [avg calls per frame: 1]
14:20:27: | | flush - [cpu time: avg 0.038 ms, total 93.601 ms] [avg calls per frame: 1]
14:20:27: | | CopyResource - [cpu time: avg 1.059 ms, total 2542.82 ms] [avg calls per frame: 1]
14:20:27: | | conversion to 4:2:0 - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
14:20:27: Convert444Threads - [cpu time: avg 0.247 ms, total 1185.61 ms] [avg calls per frame: 2]
14:20:27: | Convert444toNV12 - [cpu time: avg 0.24 ms, total 1154.41 ms] [avg calls per frame: 2]
14:20:27: encoder thread frame - [cpu time: avg 0.006 ms, total 15.6 ms] [avg calls per frame: 1]
14:20:27: | sending stuff out - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
14:20:27: ==============================================================
14:20:27:
14:20:27: =====Stream End: 2014-04-10, 14:20:27=================================================
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
I see you're using 'medium' x264 preset. That's going to eat a ton of CPU. That's almost assuredly the reason for your choppiness. You sure you can't use veryfast for it?
 

zorgkang

New Member
Not that simple unfortunately. I played with a lot of settings yesterday. Medium goes up to 50-60% CPU, but I got the same thing with veryfast (10-20% CPU as I said) and ultrafast. And what about the fact it says 0 dropped frames? Is that report accurate?
 

zorgkang

New Member
Update: Problem was not AmaRec, went back to testing with basic deinterlace methods in OBS directly and same thing. Using retro/doubling, I also see the image shaking vertically, on and off. Is that a problem with the deinterlacing algorithm or is there something wrong with the signal it's getting from the capture card? Still haven't found another program that can capture and deinterlace to 60 Hz so I could compare. ffmpeg didn't work because it doesn't support dshow input with crossbar. Just figuring out avisynth with live input through graphedit file now... Anyway OBS is still the best solution I've found so far.
 

zorgkang

New Member
Well... Managed to get Avisynth working and same thing (on and off fps drop, stuttering), even without any deinterlacing. And CPU usage is very low, I'm not even encoding, just viewing it directly in a media player (Zoom), so there's another bottleneck somewhere. No idea what it is. :(
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
I really wish you could upgrade that video card so you can use our deinterlacing shaders. That video card model (the 2xx series specifically) is known to be a major bottleneck with streaming, though usually only when streaming games on the same computer.
 

zorgkang

New Member
So I tried in another computer, and with a spare video card I had at home (Radeon HD 4890), which allowed me to try the other deinterlacing methods, but as I suspected, that didn't change anything. I really think the capture device is not properly capturing or transmitting each field. Any idea how I could double check that? I'm thinking of returning it, though not sure what else would be better in this price range (< $100). Suggestions? Anyway, I'm pretty sure I've eliminated OBS as a potential source of the problem, so thanks again for your help!
 
Top