Question / Help Perfect 60fps local recording, ~40 fps streaming to Twitch?

thetones

New Member
Hi, back again with the same problem as before. Would like to hear any additional ideas to fix it. Two things to note are that I used to stream @ perfect 60fps last year to Twitch AND some of my viewers say that they see true 60fps (I don't see anywhere near it). That being said let's get right into it...

Internet: Up: ~40mbp/s - Down: ~9mbp/s This has been tested to Twitch, testmy.net, speedtest, etc. Everything reports of capable speeds, which makes me think it has to deal with packet loss.
Shaperprobe test:
Upstream: No shaper detected.
Median received rate: 11013 Kbps.

Downstream: No shaper detected.
Median received rate: 52938 Kbps.

Log of last night's stream:
Code:
20:22:47: =====Stream Start: 2013-11-08, 20:22:47===============================================
20:22:47:   Multithreaded optimizations: On
20:22:47:   Base resolution: 1920x1080
20:22:47:   Output resolution: 1280x720
20:22:47: ------------------------------------------
20:22:47: Loading up D3D10 on NVIDIA GeForce GTX 570...
20:22:47: ------------------------------------------
20:22:47: Audio Format: 48000hz
20:22:47: Playback device {0.0.0.00000000}.{f82bf582-091a-4d89-81ed-6fdf096fd8ae}
20:22:47: ------------------------------------------
20:22:47: Using desktop audio input: Speakers (Realtek High Definition Audio)
20:22:47: ------------------------------------------
20:22:47: Using auxilary audio input: 7 (Blue Snowball )
20:22:47: ------------------------------------------
20:22:47: Audio Encoding: AAC
20:22:47:     bitrate: 128
20:22:47: Using bitmap image
20:22:47: Using text output
20:22:47: ------------------------------------------
20:22:47:     device: AVerMedia BDA Analog Capture Secondary,
20:22:47:     device id \\?\pci#ven_1a0a&dev_6202&subsys_62021461&rev_01#4&1d7623a1&0&00e2#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{ede957b0-eaa5-4bf4-acf3-6e10cb4836c3},
20:22:47:     chosen type: YUY2, usingFourCC: false, res: 640x480 - 640x480, frameIntervals: 117647-333334
20:22:47:     use buffering: false - 0, fourCC: 'YUY2'
20:22:47: 
20:22:47: Using directshow input
20:22:47: Using Window Capture
20:22:47: ------------------------------------------
20:22:47:     device: Logitech HD Webcam C270,
20:22:47:     device id \\?\usb#vid_046d&pid_0825&mi_00#7&25e23937&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083},
20:22:47:     chosen type: I420, usingFourCC: false, res: 1280x720 - 1280x720, frameIntervals: 333333-2000000
20:22:47:     use buffering: false - 0, fourCC: 'I420'
20:22:47:     audio device: Disable,
20:22:47:     audio device id Disabled,
20:22:47: 
20:22:47: Using directshow input
20:22:47: Using Window Capture
20:22:47: Using bitmap image
20:22:47: ------------------------------------------
20:22:47:     device: Logitech HD Webcam C510,
20:22:47:     device id \\?\usb#vid_046d&pid_081d&mi_02#7&1e038a9d&2&0002#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083},
20:22:47:     chosen type: I420, usingFourCC: false, res: 1280x720 - 1280x720, frameIntervals: 333333-2000000
20:22:47:     use buffering: false - 0, fourCC: 'I420'
20:22:47:     audio device: Disable,
20:22:47:     audio device id Disabled,
20:22:47: 
20:22:47: Using directshow input
20:22:48: Using bitmap image
20:22:48: Using bitmap image
20:22:48: Scene buffering time set to 500
20:22:48: ------------------------------------------
20:22:48: Video Encoding: x264
20:22:48:     fps: 60
20:22:48:     width: 1280, height: 720
20:22:48:     preset: veryfast
20:22:48:     profile: high
20:22:48:     keyint: 120
20:22:48:     CBR: yes
20:22:48:     CFR: yes
20:22:48:     max bitrate: 4000
20:22:48:     buffer size: 4000
20:22:48: ------------------------------------------
20:22:48: MMDeviceAudioSource: Frequency for device 'Speakers (Realtek High Definition Audio)' is 768000, samples per sec is 96000
20:22:48: MMDeviceAudioSource: Frequency for device '7 (Blue Snowball )' is 176400, samples per sec is 44100
20:22:49: Using RTMP service: Twitch / Justin.tv
20:22:49:   Server selection: rtmp://live-iad.justin.tv/app
20:22:49:   Interface: Realtek PCIe GBE Family Controller (ethernet, 100 mbps)
20:22:49: Completed handshake with rtmp://live-iad.justin.tv/app in 196 ms.
20:22:51: SO_SNDBUF was at 8192
20:22:51: SO_SNDBUF is now 65536
20:22:52: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 131072 (buffer: 25326 / 528384)
20:22:52: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 262144 (buffer: 0 / 528384)
02:10:31: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 524288 (buffer: 0 / 528384)
02:44:20: Total frames encoded: 1373486, total frames duplicated: 337 (0.02%)
02:44:20: Total frames rendered: 1373491, number of late frames: 10 (0.00%) (it's okay for some frames to be late)
02:44:21: RTMPPublisher::SocketLoop: Graceful loop exit
02:44:21: Average send payload: 7790 bytes, average send interval: 15 ms
02:44:21: Number of times waited to send: 0, Waited for a total of 0 bytes
02:44:21: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
02:44:21: Number of bytes sent: 11842016495
02:44:21: 
02:44:21: Profiler time results:
02:44:21: 
02:44:21: ==============================================================
02:44:21: video thread frame - [100%] [avg time: 1.932 ms] [children: 88.6%] [unaccounted: 11.4%]
02:44:21: | scene->Preprocess - [77.7%] [avg time: 1.502 ms]
02:44:21: | GPU download and conversion - [10.9%] [avg time: 0.21 ms] [children: 10.2%] [unaccounted: 0.621%]
02:44:21: | | flush - [8.8%] [avg time: 0.17 ms]
02:44:21: | | CopyResource - [1.09%] [avg time: 0.021 ms]
02:44:21: | | conversion to 4:2:0 - [0.362%] [avg time: 0.007 ms]
02:44:21: Convert444Threads - [100%] [avg time: 0.65 ms] [children: 98.5%] [unaccounted: 1.54%]
02:44:21: | Convert444toNV12 - [98.5%] [avg time: 0.64 ms]
02:44:21: encoder thread frame - [100%] [avg time: 0.747 ms]
02:44:21: ==============================================================
02:44:21: 
02:44:21: 
02:44:21: Profiler CPU results:
02:44:21: 
02:44:21: ==============================================================
02:44:21: video thread frame - [cpu time: avg 1.334 ms, total 1.83278e+006 ms] [avg calls per frame: 1]
02:44:21: | scene->Preprocess - [cpu time: avg 1.056 ms, total 1.4517e+006 ms] [avg calls per frame: 1]
02:44:21: | GPU download and conversion - [cpu time: avg 0.172 ms, total 236575 ms] [avg calls per frame: 1]
02:44:21: | | flush - [cpu time: avg 0.151 ms, total 207856 ms] [avg calls per frame: 1]
02:44:21: | | CopyResource - [cpu time: avg 0.014 ms, total 19656.1 ms] [avg calls per frame: 1]
02:44:21: | | conversion to 4:2:0 - [cpu time: avg 0.002 ms, total 3400.83 ms] [avg calls per frame: 1]
02:44:21: Convert444Threads - [cpu time: avg 0.752 ms, total 2.06644e+006 ms] [avg calls per frame: 2]
02:44:21: | Convert444toNV12 - [cpu time: avg 0.75 ms, total 2.06031e+006 ms] [avg calls per frame: 2]
02:44:21: encoder thread frame - [cpu time: avg 0.072 ms, total 99138.6 ms] [avg calls per frame: 1]
02:44:21: ==============================================================
02:44:21: 
02:44:21: =====Stream End: 2013-11-09, 02:44:21=================================================
02:44:23: Browser Source plugin instance deleted; removing dynamically loaded localization strings
02:44:24: CLR host plugin instance deleted; removing dynamically loaded localization strings

Settings:
k76sSHj.png

ghVA1Ul.png

I19Olxq.png

HS5bcZR.png

9Hpfdzb.png

Things I've tried: Lowering and increasing bitrate, changing advanced settings to run "Above Normal". Deleting everything and re-adding as Global Source. Changing Twitch servers. This is pretty frustrating seeing as all of my local recordings are flawless, but all of my streams appear to be very laggy.

Link to stream recording that the log relates to:
http://www.twitch.tv/thetones/b/477956860

As always, I'm open to try any new or old suggestions and I appreciate anyone that offers their time to help me.
 

alpinlol

Active Member
Re: Perfect 60fps local recording, ~40 fps streaming to Twit

its pretty much twitch ... if i stream 720@60 on hashd everything looks perfectly smooth just like an 60 fps stream should look like and then i stream on twitch and it looks like there are a few frame laggs or pretty unstable 60 fps ... probably just the flashplayer which twitch is using
 

thetones

New Member
Re: Perfect 60fps local recording, ~40 fps streaming to Twit

alpinlol said:
its pretty much twitch ... if i stream 720@60 on hashd everything looks perfectly smooth just like an 60 fps stream should look like and then i stream on twitch and it looks like there are a few frame laggs or pretty unstable 60 fps ... probably just the flashplayer which twitch is using
Yeah that's the general consensus but I still see a ton of streams that have very fluid 60fps compared to mine. Maybe I'll just go through every Twitch server and see which one gives me the closest to true 60fps.
 

alpinlol

Active Member
Re: Perfect 60fps local recording, ~40 fps streaming to Twit

i get lucky a few times with twitch ... which results in an actual 60fps stream but its kinda rare happened to me maybe 3 times the last 2 months :/
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Re: Perfect 60fps local recording, ~40 fps streaming to Twit

Flash's decoder is really poor -- recorded output and streamed output are identical, so if it plays fine in recorded output but not on twitch, then it's probably flash having problems decoding an HD stream at 60fps. Flash is seriously horrible. I think twitch's player might also be suspect but I don't know enough about flash to really state that for certain, and I don't want to point fingers. Either way this is a known thing.

Especially prominent in 1080p 60fps, which is why people don't really ever stream with 1080p 60fps. 720p 60fps is usually fine, but depending on what you stream it can still have issues. It's really frustrating actually that free software can decode 1080p 60fps no problem but flash can't even properly handle 720p 60fps sometimes.
 

thetones

New Member
Re: Perfect 60fps local recording, ~40 fps streaming to Twit

Thanks Jim but I see people with very fluid 60fps streams. Bumping this with a follow up question; to anyone who seems to have a flawless 60fps stream, which Twitch server are you connecting to?
 

xiuide

Member
Re: Perfect 60fps local recording, ~40 fps streaming to Twit

This is going to sound really weird, but try streaming to twitch at 45FPS between the compression and the connection to twitches servers then down to the viewer. you ultimately give everything a little less data to mess with, and it results in a smoother video being served. It also has the benefit of needing less CPU to encode, while keeping the perceived video smooth. I wont go and say there is no different, because clearly there is 15 frames of data your not capturing, however I have a feeling you will lose less frames along the way, giving you a better stream (worked for me at least, and most cant tell i stream at 45, they think its 60)
 

thetones

New Member
Re: Perfect 60fps local recording, ~40 fps streaming to Twit

xiuide said:
This is going to sound really weird, but try streaming to twitch at 45FPS between the compression and the connection to twitches servers then down to the viewer. you ultimately give everything a little less data to mess with, and it results in a smoother video being served. It also has the benefit of needing less CPU to encode, while keeping the perceived video smooth. I wont go and say there is no different, because clearly there is 15 frames of data your not capturing, however I have a feeling you will lose less frames along the way, giving you a better stream (worked for me at least, and most cant tell i stream at 45, they think its 60)
I've tried streaming at 45 fps too. While I understand your logic it didn't really work well for me. I'd say it appeared to be a bit smoother but allow me to provide an example.

Streaming at 60fps produces a "jaggy" 45 fps stream.
Streaming at 45fps produces a "slightly laggy" 30 fps stream.

The frames are still being dropped and while 45 fps is more closer to what's intended I'd rather have more frames be dropped while still displaying more frames.
 
Top