Question / Help Motion Lines/Blur for Livestream

cogden

New Member
I am posting to youtube using OBS. I am capturing from a Blackmagic Decklink SDI PCI card. The incoming feed is 1920x1080 at 59.94 FPS. During motion of hands or face movement, the video in the area of motion. Here is a link to the video that the following log corresponds to: https://www.youtube.com/watch?v=SkS8SumRZ04

You will likely need to jump ahead to 27 min when the band starts for examples of what I am talking about. It is even more apparent when watching the 720p setting. Thanks for any help you can provide.

It is running on a computer with 4 x 6 Core AMD Opteron 8431, it was a nice donation for the project. Let me know if you need any additional information.

10:18:24: =====Stream Start: 2014-03-09, 10:18:24===============================================
10:18:24: Multithreaded optimizations: On
10:18:24: Base resolution: 1920x1080
10:18:24: Output resolution: 1280x720
10:18:24: ------------------------------------------
10:18:24: Loading up D3D10 on Microsoft Basic Render Driver (Adapter 1)...
10:18:24: ------------------------------------------
10:18:24: Audio Format: 44100hz
10:18:24: Playback device Default
10:18:24: ------------------------------------------
10:18:24: Using desktop audio input: Speakers (Blackmagic Audio)
10:18:24: ------------------------------------------
10:18:24: Audio Encoding: AAC
10:18:24: bitrate: 128
10:18:24: ------------------------------------------
10:18:24: device: (null),
10:18:24: device id (null),
10:18:24: chosen type: HDYC, usingFourCC: true, res: 1920x1080 - 1920x1080, frameIntervals: 333667-333667
10:18:24: use buffering: false - 0, fourCC: 'HDYC'
10:18:24: audio device: Decklink Audio Capture,
10:18:24: audio device id (null),
10:18:24:
10:18:24: device audio info - bits per sample: 16, channels: 2, samples per sec: 48000, block size: 4
10:18:24: Using directshow input
10:18:24: Scene buffering time set to 700
10:18:24: ------------------------------------------
10:18:24: Video Encoding: x264
10:18:24: fps: 30
10:18:24: width: 1280, height: 720
10:18:24: preset: faster
10:18:24: profile: high
10:18:24: keyint: 60
10:18:24: CBR: yes
10:18:24: CFR: no
10:18:24: max bitrate: 2500
10:18:24: buffer size: 2500
10:18:24: ------------------------------------------
10:18:28: Using RTMP service: Youtube
10:18:28: Server selection: rtmp://a.rtmp.youtube.com/live2
10:18:28: Interface: Microsoft Network Adapter Multiplexor Driver #2 (ethernet, 2000 mbps)
10:18:28: Completed handshake with rtmp://a.rtmp.youtube.com/live2 in 250 ms.
10:18:29: SO_SNDBUF was at 65536
10:18:29: SO_SNDBUF is now 65536
10:18:31: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 131072 (buffer: 6313 / 335872)
10:18:31: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 262144 (buffer: 4903 / 335872)
11:58:12: Audio device 'Speakers (Blackmagic Audio)' has been lost, attempting to reinitialize
11:58:13: Device 'Remote Audio' reacquired.
11:58:13: Audio timestamp for device 'Decklink Video Capture' was behind target timestamp by 1710
11:58:44: Total frames encoded: 180562, total frames duplicated: 8156 (4.52%)
11:58:44: Number of frames skipped due to encoder lag: 2 (0.00%)
11:58:44: Total frames rendered: 180346, number of late frames: 189 (0.10%) (it's okay for some frames to be late)
11:58:44: RTMPPublisher::SocketLoop: Graceful loop exit
11:58:44: Average send payload: 5325 bytes, average send interval: 16 ms
11:58:44: Number of times waited to send: 0, Waited for a total of 0 bytes
11:58:44: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
11:58:44: Number of bytes sent: 1980446801
11:58:45:
11:58:45: Profiler time results:
11:58:45:
11:58:45: ==============================================================
11:58:45: video thread frame - [100%] [avg time: 14.056 ms] [children: 89.7%] [unaccounted: 10.3%]
11:58:45: | scene->Preprocess - [54.8%] [avg time: 7.702 ms]
11:58:45: | GPU download and conversion - [34.9%] [avg time: 4.91 ms] [children: 34.5%] [unaccounted: 0.441%]
11:58:45: | | flush - [0.932%] [avg time: 0.131 ms]
11:58:45: | | CopyResource - [32.4%] [avg time: 4.549 ms]
11:58:45: | | conversion to 4:2:0 - [1.2%] [avg time: 0.168 ms]
11:58:45: Convert444Threads - [100%] [avg time: 0.593 ms] [children: 97.1%] [unaccounted: 2.87%]
11:58:45: | Convert444toNV12 - [97.1%] [avg time: 0.576 ms]
11:58:45: encoder thread frame - [100%] [avg time: 8.33 ms] [children: 1.66%] [unaccounted: 98.3%]
11:58:45: | sending stuff out - [1.66%] [avg time: 0.138 ms]
11:58:45: ==============================================================
11:58:45:
11:58:45:
11:58:45: Profiler CPU results:
11:58:45:
11:58:45: ==============================================================
11:58:45: video thread frame - [cpu time: avg 13.164 ms, total 2.37423e+006 ms] [avg calls per frame: 1]
11:58:45: | scene->Preprocess - [cpu time: avg 7.234 ms, total 1.30475e+006 ms] [avg calls per frame: 1]
11:58:45: | GPU download and conversion - [cpu time: avg 4.612 ms, total 831875 ms] [avg calls per frame: 1]
11:58:45: | | flush - [cpu time: avg 0.129 ms, total 23359.4 ms] [avg calls per frame: 1]
11:58:45: | | CopyResource - [cpu time: avg 4.348 ms, total 784188 ms] [avg calls per frame: 1]
11:58:45: | | conversion to 4:2:0 - [cpu time: avg 0.098 ms, total 17843.8 ms] [avg calls per frame: 1]
11:58:45: Convert444Threads - [cpu time: avg 0.577 ms, total 2.28975e+006 ms] [avg calls per frame: 22]
11:58:45: | Convert444toNV12 - [cpu time: avg 0.567 ms, total 2.24934e+006 ms] [avg calls per frame: 22]
11:58:45: encoder thread frame - [cpu time: avg 8.011 ms, total 1.44639e+006 ms] [avg calls per frame: 1]
11:58:45: | sending stuff out - [cpu time: avg 0.124 ms, total 22500 ms] [avg calls per frame: 1]
11:58:45: ==============================================================
11:58:45:
11:58:45: =====Stream End: 2014-03-09, 11:58:45=================================================
 

Jack0r

The Helping Squad
http://www.blackmagicdesign.com/product ... specs#4013
HD Format Support
720p50, 720p59.94, 720p60, 1080PsF23.98, 1080p23.98, 1080PsF24, 1080p24, 1080PsF25, 1080p25, 1080PsF29.97, 1080p29.97, 1080PsF30, 1080p30, 1080i50, 1080i59.94 and 1080i60.

So you are getting interlaced input as it looks. Which explains these lines. I am unfortunately no expert on de-interlacing but you should be able to get a better picture quality using one of the Deinterlacing filters in the video capture device settings of OBS.
 

cogden

New Member
Shortly after I posted I found the deinterlacing settings. Using the blend option certain improved it, not perfect but much better. Unfortunately I am having a hard time getting the same quality consistently though, and the audio is slightly off. I think the audio/video sync issue may be related to reading timestamps from the input but I don't know for sure.
 

dodgepong

Administrator
Community Helper
I would recommend using Yadif rather than Blend deinterlacing. Blend will still have a "ghosting" effect, which doesn't look great.
 

cogden

New Member
I switched to Yadif and will try to run another full test. Trying to find the sweet spot with bitrate too as I am currently on a 5mbps upload.
 

Vizeroh

New Member
I switched to Yadif and will try to run another full test. Trying to find the sweet spot with bitrate too as I am currently on a 5mbps upload.
I'm not expert, but with 5, which is the exact same as mine, I'd suggest 3000-3500. :) I use 3500 of my 5000 with no problems at all.
 

cogden

New Member
Here is the latest result:

With the log output attached.

I think overall it looks good and the audio seems to be more in sync with Yadif vs Blend, but it does have some chop. I realize I only have it at 2500 for bitrate, will bumping that up improve the chop and give a smoother look? Or will some other setting better handle that?

Thank you all for each time you help.
 

Attachments

  • 2014-03-14 - 2nd.txt
    5.2 KB · Views: 36

Krazy

Town drunk
Well the GPU you are using is severely underpowered and it's causing x264 to have to duplicate a lot of frames. OBS uses the GPU quite heavily to work it's magic, so unfortunately you need at least a decent one. The (I assume) integrated graphics adapter that is in your current setup just isn't up to snuff as indicated by these lines in you log:

12:20:26: | scene->Preprocess - [31.7%] [avg time: 17.124 ms]
12:20:26: | GPU download and conversion - [16.2%] [avg time: 8.754 ms] [children: 6.64%] [unaccounted: 9.56%]
12:20:26: | | flush - [0.272%] [avg time: 0.147 ms]
12:20:26: | | CopyResource - [6.1%] [avg time: 3.295 ms]

These times are all quite high, unfortunately.
 

cogden

New Member
I have a ATI Radeon HD 5450 1GB DDR3 card in there. It is on a PCEx 1x lane though due to the limitations of the motherboard. The CPU is quite powerful though and I figured it would make up the difference. Is there a different recommendation for GPU in such an environment? I am not certain it is correctly using that card vs the onboard though.

The input stream is 59.94 fps but the output needs to be 30 fps for youtube.
 

dodgepong

Administrator
Community Helper
It would be helpful if you posted a full log, rather than excerpts.

OBS does its rendering on the GPU, which leaves the CPU mostly free to only do recording. It's the things that makes OBS as fast as it is, but also requires good graphics hardware. If you have a Radeon GPU in your streaming PC, OBS isn't using it. According to that log, it's running on a "Microsoft Basic Render Driver", which is making it run as poorly as it is. Make sure the correct GPU is selected in your Video settings.
 

cogden

New Member
Here is a picture of the video settings:
upload_2014-3-16_20-36-24.png


There is only one video adapter to select. I have also attached a full day's log.
 

Attachments

  • 2014-03-15-1657-13.log
    28.1 KB · Views: 10

Krazy

Town drunk
The only thing I can think of right now is to maybe update/reinstall your GPU drivers. I'll see if I can't get some more insight from one of the developers.
 

cogden

New Member
I updated the GPU drivers before continuing. Doing a little more review and thinking about how it is currently set up, i came across this: https://obsproject.com/forum/threads/laptop-black-screen-when-capturing-read-here-first.5965/. I wasn't receiving a black screen but it definitely wasn't using the GPU correctly. I changed which display it was outputting on and now I see it reporting in the logs that it is loading up on the ATI Radeon HD 5400 Series as we would expect and hope.

The audio is still out of sync though, not sure why or what I can do to tweak that.

Before posting I did the following adjustments between the first log and 2nd log
  • Updated to the most recent version from 0.612b (I had been avoiding due to a problem I was having that seemed related to the new version)
  • Changed the bitrate from 2500 to 3000
  • Change x264 processing from faster to very fast
The changes seem to have improved it but the video still seems to be behind the audio. Also, looking at the GUI, it shows FPS as just 10, which seems pretty low.

I can provide a video link again if that helps.
 

Attachments

  • 2014-03-17-2143-58.log
    28.7 KB · Views: 8
  • 2014-03-17-2226-38.log
    5.4 KB · Views: 4
  • 2014-03-17-2228-12.log
    11.4 KB · Views: 4

cogden

New Member
Interesting finding, when using the GPU the FPS drops to 10 all the time, but when using the CPU only the FPS is about 20. I thought the GPU was supposed to be better? I definately see it being better in some of the timings but at the cost of half the frames?
 

cogden

New Member
I changed the 'Force desktop audio to use video timestamps as a base for audio time' to enabled and then did a global offset of 420 ms and the audio sync issue seems to be pretty much cleared up.

I still don't understand why the output at the bottom status bar is just 10 FPS and why the late and duplicated frame counts are so high. Let me know if you have any insight or things to point me towards.

Thank you again for all the help each of you has provided.
 

Attachments

  • 2014-03-22-0051-37.log
    16 KB · Views: 3
Top