Bug Report Jittery video recording (SOLVED)

Relshak

New Member
(Log file at the bottom of this post)

I am trying to record SNES emulation (I own the game I'm emulating), but every recording has video that kind of jerks and stutters, as though it's missing frames. I've tried Higan, ZSNES and SNES9x. So far, SNES9x has given me the least terrible results, so I'm trying to work with it.

When I'm playing the game, it's a really smooth 60fps that only chokes a bit when it's trying to sync the 60fps to the normal 59.97 or so. It's almost undetectable. (Higan is famous for not having this issue, but it has other issues for me.)

Watch the background as it scrolls by and how it jerks: http://www.youtube.com/watch?v=2LUSaoTAB3A (SNES9x)

Normally 30FPS doesn't look nearly that badly.

Recording things that are not emulation seem to be fairly smooth (such as music videos). I even recorded a movie using the internal ZSNES software, then window-captured the video itself into OBS and didn't see the same jitteriness while performing the same movement in the game that I would otherwise be straight emulating. (Again, I'm not trying to use ZSNES, it was just an experiment to get usable video.)

I've tried so many settings. I've spent hours a day for over a week trying different things. I've set the bitrate very high, very low, half buffer, double buffer, zero buffer, set the quality to 0, 5, 10, 7, X, (), everything. I've turned CFR and CBR on and off. I've lowered the resolution, raised the framerate, changed the recording filename, saved to a second SATA hard drive, moved my page file to the second hard drive and saved to the first, turned VSync in the games on and off, closed all programs, gave OBS High Priority in the task manager, gave both OBS and the emulator high priority, moved OBS to Core 0/1 and put the emulator on 2/3, I've set custom x264 settings, minimize the OBS window when recording to hide the preview, enabled/disabled sound and microphone, changed the audio bitrate, enabled/disabled multithreaded optimizations, I typically try to use game capture, but it's the same with window capture.

It seems like no matter what I do, I always always always get the exact same jitter that you see in the video above.

Any suggestions?

Edit: I've also tried DXTory and bringing it in as a video capture device. The results are still inconclusive. I may need to do more testing there.

Code:
Open Broadcaster Software v0.51b - 64bit ( ^ω^)
-------------------------------
CPU Name: AMD Phenom(tm) II X4 965 Processor
CPU Speed: 3406MHz
Physical Memory:  8191MB Total, 6193MB Free
stepping id: 3, model 4, family 15, type 0, extmodel 8, extfamily 0, HTT 1, logical cores 4, total cores 4
monitor 1: pos={0, 0}, size={1920, 1080}
monitor 2: pos={-1360, 0}, size={1360, 768}
Windows Version: 6.1 Build 7601 S
Aero is Disabled
------------------------------------------
Adapter 1
  Video Adapter: AMD Radeon HD 7700 Series
  Video Adapter Dedicated Video Memory: 1054019584
  Video Adapter Shared System Memory: 4026132480
=====Stream Start: 2013-04-30, 11:35:37===============================================
  Multithreaded optimizations: On
  Base resolution: 1280x720
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
Playback device Default
------------------------------------------
Using desktop audio input: Speakers (2- Realtek High Definition Audio)
------------------------------------------
Audio Encoding: AAC
    bitrate: 64
Using graphics capture
x264: VBV maxrate specified, but no bufsize, ignored
------------------------------------------
Video Encoding: x264
    fps: 60
    width: 1280, height: 720
    preset: ultrafast
    CBR: no
    CFR: no
    max bitrate: 1000
    buffer size: 0
    quality: 10
------------------------------------------
Using graphics capture
SharedTexCapture hooked
Total frames rendered: 1184, number of frames that lagged: 0 (0.00%) (it's okay for some frames to lag)
=====Stream End: 2013-04-30, 11:35:57=================================================
=====Stream Start: 2013-04-30, 11:35:57===============================================
  Multithreaded optimizations: On
  Base resolution: 1280x720
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
Playback device Default
------------------------------------------
Using desktop audio input: Speakers (2- Realtek High Definition Audio)
------------------------------------------
Audio Encoding: AAC
    bitrate: 64
Using graphics capture
x264: VBV maxrate specified, but no bufsize, ignored
------------------------------------------
Video Encoding: x264
    fps: 60
    width: 1280, height: 720
    preset: ultrafast
    CBR: no
    CFR: no
    max bitrate: 1000
    buffer size: 0
    quality: 10
------------------------------------------
SharedTexCapture hooked
Using Window Capture
Total frames rendered: 4274, number of frames that lagged: 2 (0.05%) (it's okay for some frames to lag)
=====Stream End: 2013-04-30, 11:37:09=================================================
=====Stream Start: 2013-04-30, 11:37:53===============================================
  Multithreaded optimizations: On
  Base resolution: 1280x720
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
Playback device Default
------------------------------------------
Using desktop audio input: Speakers (2- Realtek High Definition Audio)
------------------------------------------
Audio Encoding: AAC
    bitrate: 64
Using Window Capture
x264: VBV maxrate specified, but no bufsize, ignored
------------------------------------------
Video Encoding: x264
    fps: 60
    width: 1280, height: 720
    preset: ultrafast
    CBR: no
    CFR: no
    max bitrate: 1000
    buffer size: 0
    quality: 10
------------------------------------------
Total frames rendered: 4344, number of frames that lagged: 0 (0.00%) (it's okay for some frames to lag)
=====Stream End: 2013-04-30, 11:39:05=================================================
------------------------------------------
=====Stream Start: 2013-04-30, 11:42:36===============================================
  Multithreaded optimizations: On
  Base resolution: 1280x720
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
Playback device Default
------------------------------------------
Using desktop audio input: Speakers (2- Realtek High Definition Audio)
------------------------------------------
Audio Encoding: AAC
    bitrate: 64
Using Window Capture
x264: VBV maxrate specified, but no bufsize, ignored
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1280, height: 720
    preset: ultrafast
    CBR: no
    CFR: no
    max bitrate: 1000
    buffer size: 0
    quality: 10
------------------------------------------
Total frames rendered: 65, number of frames that lagged: 0 (0.00%) (it's okay for some frames to lag)
=====Stream End: 2013-04-30, 11:42:39=================================================
=====Stream Start: 2013-04-30, 11:42:40===============================================
  Multithreaded optimizations: On
  Base resolution: 1280x720
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
Playback device Default
------------------------------------------
Using desktop audio input: Speakers (2- Realtek High Definition Audio)
------------------------------------------
Audio Encoding: AAC
    bitrate: 64
Using Window Capture
x264: VBV maxrate specified, but no bufsize, ignored
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1280, height: 720
    preset: ultrafast
    CBR: no
    CFR: no
    max bitrate: 1000
    buffer size: 0
    quality: 10
------------------------------------------
Total frames rendered: 4195, number of frames that lagged: 1 (0.02%) (it's okay for some frames to lag)
=====Stream End: 2013-04-30, 11:45:00=================================================
=====Stream Start: 2013-04-30, 11:50:06===============================================
  Multithreaded optimizations: On
  Base resolution: 1280x720
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
Playback device Default
------------------------------------------
Using desktop audio input: Speakers (2- Realtek High Definition Audio)
------------------------------------------
Using auxilary audio input: Microphone (Blue Snowball )
------------------------------------------
Audio Encoding: AAC
    bitrate: 64
Using Window Capture
x264: VBV maxrate specified, but no bufsize, ignored
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1280, height: 720
    preset: ultrafast
    CBR: no
    CFR: no
    max bitrate: 1000
    buffer size: 0
    quality: 10
------------------------------------------
Using Window Capture
Using bitmap image
Total frames rendered: 1768, number of frames that lagged: 1 (0.06%) (it's okay for some frames to lag)
=====Stream End: 2013-04-30, 11:51:06=================================================
=====Stream Start: 2013-04-30, 11:51:13===============================================
  Multithreaded optimizations: On
  Base resolution: 1280x720
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
Playback device Default
------------------------------------------
Using desktop audio input: Speakers (2- Realtek High Definition Audio)
------------------------------------------
Using auxilary audio input: Microphone (Blue Snowball )
------------------------------------------
Audio Encoding: AAC
    bitrate: 64
Using Window Capture
Using bitmap image
x264: VBV maxrate specified, but no bufsize, ignored
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1280, height: 720
    preset: ultrafast
    CBR: no
    CFR: no
    max bitrate: 1000
    buffer size: 0
    quality: 10
------------------------------------------
Total frames rendered: 4381, number of frames that lagged: 21 (0.48%) (it's okay for some frames to lag)
=====Stream End: 2013-04-30, 11:53:40=================================================
=====Stream Start: 2013-04-30, 11:54:51===============================================
  Multithreaded optimizations: On
  Base resolution: 1280x720
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
Playback device Default
------------------------------------------
Using desktop audio input: Speakers (2- Realtek High Definition Audio)
------------------------------------------
Using auxilary audio input: Microphone (Blue Snowball )
------------------------------------------
Audio Encoding: AAC
    bitrate: 64
Using graphics capture
Using bitmap image
x264: VBV maxrate specified, but no bufsize, ignored
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1280, height: 720
    preset: ultrafast
    CBR: no
    CFR: no
    max bitrate: 1000
    buffer size: 0
    quality: 10
------------------------------------------
using memory capture
Total frames rendered: 545, number of frames that lagged: 0 (0.00%) (it's okay for some frames to lag)
=====Stream End: 2013-04-30, 11:55:09=================================================
=====Stream Start: 2013-04-30, 11:55:13===============================================
  Multithreaded optimizations: On
  Base resolution: 1280x720
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
Playback device Default
------------------------------------------
Using desktop audio input: Speakers (2- Realtek High Definition Audio)
------------------------------------------
Using auxilary audio input: Microphone (Blue Snowball )
------------------------------------------
Audio Encoding: AAC
    bitrate: 64
Using graphics capture
Using bitmap image
x264: VBV maxrate specified, but no bufsize, ignored
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1280, height: 720
    preset: ultrafast
    CBR: no
    CFR: no
    max bitrate: 1000
    buffer size: 0
    quality: 10
------------------------------------------
using memory capture
Total frames rendered: 3938, number of frames that lagged: 0 (0.00%) (it's okay for some frames to lag)
=====Stream End: 2013-04-30, 11:57:24=================================================
=====Stream Start: 2013-04-30, 11:59:20===============================================
  Multithreaded optimizations: On
  Base resolution: 1280x720
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
Playback device Default
------------------------------------------
Using desktop audio input: Speakers (2- Realtek High Definition Audio)
------------------------------------------
Using auxilary audio input: Microphone (Blue Snowball )
------------------------------------------
Audio Encoding: AAC
    bitrate: 64
Using graphics capture
Using bitmap image
x264: VBV maxrate specified, but no bufsize, ignored
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1280, height: 720
    preset: ultrafast
    CBR: no
    CFR: no
    max bitrate: 1000
    buffer size: 0
    quality: 10
------------------------------------------
using memory capture
Total frames rendered: 3006, number of frames that lagged: 0 (0.00%) (it's okay for some frames to lag)
=====Stream End: 2013-04-30, 12:01:00=================================================

Profiler results:

==============================================================
frame - [100%] [avg time: 3.996 ms] [avg calls per frame: 1] [children: 91.9%] [unaccounted: 8.08%]
| scene->Preprocess - [56.4%] [avg time: 2.254 ms] [avg calls per frame: 1]
| video encoding and uploading - [35.5%] [avg time: 1.419 ms] [avg calls per frame: 1] [children: 35.1%] [unaccounted: 0.375%]
| | CopyResource - [0.2%] [avg time: 0.008 ms] [avg calls per frame: 0]
| | conversion to 4:2:0 - [4.33%] [avg time: 0.173 ms] [avg calls per frame: 0]
| | call to encoder - [30.2%] [avg time: 1.208 ms] [avg calls per frame: 0]
| | sending stuff out - [0.375%] [avg time: 0.015 ms] [avg calls per frame: 0]
==============================================================
 

paibox

heros in an halfshel
Re: Jittery video recording

Because of the peculiarities when it comes to screen rendering in most of these emulators, I would suggest that you turn on Aero and use inner window capture instead of game capture.
 

Relshak

New Member
Re: Jittery video recording

paibox said:
Because of the peculiarities when it comes to screen rendering in most of these emulators, I would suggest that you turn on Aero and use inner window capture instead of game capture.

I assumed Aero was always bad. I'll try that right now
 

dodgepong

Administrator
Community Helper
Re: Jittery video recording

Aero is only bad when using Monitor capture in Windows 7. Otherwise it's fine. Aero is necessary for Window capture to work correctly. You might get a slight performance increase from disabling it, but IMO it's not worth it.
 

Relshak

New Member
Re: Jittery video recording

So, I enabled Aero and did Window Capture and... man. It did not stutter, jitter, gyrate, wiggle, wriggle or jiggle even once.

While I hate getting excited just to get disappointed later, this really seemed to fix the issue. I can't wait to start making proper videos.

Thank you very much!
 

paibox

heros in an halfshel
No problem, haha. I've seen this happen before, with snes9x and other emulators. While I won't say that the people coding them are doing something wrong when presenting their frame buffer, they're not doing it the way most applications and games do it.

There's a thread somewhere around here about DeSMuME, which presents its OpenGL framebuffer in some very non-ordinary fashion, causing it to work very badly with game capture, while window capture works perfectly fine. (Since Window capture depends on the Desktop Window Manager (DWM) rather than the underlying functions of the specific hardware acceleration, such as Direct3D and OpenGL, and the DWM tends to keep these things pretty strict.)
 
Top