Question / Help Arch Linux - slow frames on stream [ENG/GER]

cxrx

New Member
hey there,

I have been using Arch since 2015 and struggling with obs-studio for 3 days.
After all, I got obs-studio, it started "lagging" due streaming. Let me explain this "issue".
Yesterday, it started buffering after a several seconds like every 3-6 seconds. Today, it seems like streaming continously but on a low stream speed 0.2-0.5. Optically, I would say the stream runs on slow motion.
But I don't have clue, why it occurs...

CPU: Intel i7 3770k
GPU: Nvidia 680 GTX
SSD: Samsung Evo

Network analyzing
Download 97 000 kb/s
Upload 33 000 kb/s

OBS Setting

Encoder: just listed one x264
Broadcast method: CBR
Bitrate: 1600
Buffer size: not custom
Keyframe: 2
CPU presets: superfast
Server: tried variety server spots e.g. frankfurt, france, sweden, ...
scale filter: bilinear
FPS: 30
NV12, 601, limited
stream delay of 20 seconds
reconnect: yes

Also have installed Windows 7 on hard disk and tried to stream - same issue ( operating system independent )


23:52:47.941: Processor: 8 logical cores
23:52:47.941: Processor: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
23:52:47.941: Physical Memory: 15986MB Total
23:52:47.941: Kernel Version: Linux 4.5.4-1-ARCH
23:52:47.941: Distribution: "Arch Linux" Unknown
23:52:47.956: OBS 0.14.2-1 (linux)
23:52:47.956: ---------------------------------
23:52:47.957: ---------------------------------
23:52:47.957: audio settings reset:
23:52:47.957: samples per sec: 44100
23:52:47.957: speakers: 2
23:52:48.092: OpenGL version: 4.1 (Core Profile) Mesa 11.2.2
23:52:48.092:
23:52:48.129: ---------------------------------
23:52:48.129: video settings reset:
23:52:48.129: base resolution: 1920x1080
23:52:48.129: output resolution: 1920x1080
23:52:48.129: fps: 30/1
23:52:48.129: format: NV12
23:52:48.130: ---------------------------------
23:52:48.131: Loading module: image-source.so
23:52:48.131: ---------------------------------
23:52:48.131: Loading module: linux-alsa.so
23:52:48.131: ---------------------------------
23:52:48.132: Loading module: linux-capture.so
23:52:48.132: ---------------------------------
23:52:48.132: Loading module: linux-decklink.so
23:52:48.133: No blackmagic support
23:52:48.133: Failed to start search for DeckLink devices
23:52:48.133: ---------------------------------
23:52:48.134: Loading module: linux-jack.so
23:52:48.134: ---------------------------------
23:52:48.135: Loading module: linux-pulseaudio.so
23:52:48.135: ---------------------------------
23:52:48.135: Loading module: linux-v4l2.so
23:52:48.135: ---------------------------------
23:52:48.136: Loading module: obs-ffmpeg.so
23:52:48.136: ---------------------------------
23:52:48.136: Loading module: obs-filters.so
23:52:48.136: ---------------------------------
23:52:48.137: os_dlopen(/usr//lib/obs-plugins/obs-libfdk.so->/usr//lib/obs-plugins/obs-libfdk.so): libfdk-aac.so.1: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
23:52:48.137:
23:52:48.137: Module '/usr//lib/obs-plugins/obs-libfdk.so' not found
23:52:48.137: ---------------------------------
23:52:48.137: Loading module: obs-outputs.so
23:52:48.137: ---------------------------------
23:52:48.137: Loading module: obs-transitions.so
23:52:48.137: ---------------------------------
23:52:48.138: Loading module: obs-x264.so
23:52:48.138: ---------------------------------
23:52:48.138: Loading module: rtmp-services.so
23:52:48.138: ---------------------------------
23:52:48.139: Loading module: text-freetype2.so
23:52:48.139: =====================================================================
23:52:48.139: output 'simple_stream' (rtmp_output) created
23:52:48.139: encoder 'simple_h264_stream' (obs_x264) created
23:52:48.139: AAC encoder bitrate mapping:
23:52:48.139: 32 kbit/s: 'FFmpeg Standard AAC Encoder' (ffmpeg_aac)
23:52:48.139: 64 kbit/s: 'FFmpeg Standard AAC Encoder' (ffmpeg_aac)
23:52:48.139: 96 kbit/s: 'FFmpeg Standard AAC Encoder' (ffmpeg_aac)
23:52:48.139: 128 kbit/s: 'FFmpeg Standard AAC Encoder' (ffmpeg_aac)
23:52:48.139: 160 kbit/s: 'FFmpeg Standard AAC Encoder' (ffmpeg_aac)
23:52:48.139: 192 kbit/s: 'FFmpeg Standard AAC Encoder' (ffmpeg_aac)
23:52:48.139: 224 kbit/s: 'FFmpeg Standard AAC Encoder' (ffmpeg_aac)
23:52:48.139: 256 kbit/s: 'FFmpeg Standard AAC Encoder' (ffmpeg_aac)
23:52:48.139: 288 kbit/s: 'FFmpeg Standard AAC Encoder' (ffmpeg_aac)
23:52:48.139: 320 kbit/s: 'FFmpeg Standard AAC Encoder' (ffmpeg_aac)
23:52:48.139: encoder 'simple_aac' (ffmpeg_aac) created
23:52:48.139: output 'simple_file_output' (ffmpeg_muxer) created
23:52:48.139: service 'default_service' (rtmp_common) created
23:52:48.139: All scene data cleared
23:52:48.139: ------------------------------------------------
23:52:48.144: pulse-input: Server name: 'pulseaudio 8.0'
23:52:48.144: pulse-input: Sample spec is not valid
23:52:48.144: Failed to create source 'Desktop Audio'!
23:52:48.144: source 'Desktop Audio' (pulse_output_capture) created
23:52:48.145: pulse-input: Server name: 'pulseaudio 8.0'
23:52:48.145: pulse-input: Sample spec is not valid
23:52:48.145: Failed to create source 'Mic/Aux'!
23:52:48.145: source 'Mic/Aux' (pulse_input_capture) created
23:52:48.145: xshm-input: Geometry 1920x1080 @ 0,0
23:52:48.146: source 'Bildschirmaufnahme (XSHM)' (xshm_input) created
23:52:48.146: source 'Szene' (scene) created
23:52:48.163: == Profiler Results =============================
23:52:48.163: run_program_init: 254,179Â ms
23:52:48.163: ┣OBSApp::AppInit: 1,558 ms
23:52:48.163: ┃ ┗OBSApp::InitLocale: 1,352 ms
23:52:48.163: â”—OBSApp::OBSInit: 234,593Â ms
23:52:48.163: ┣obs_startup: 1,905 ms
23:52:48.163: â”—OBSBasic::OBSInit: 205,904Â ms
23:52:48.163: ┣OBSBasic::InitBasicConfig: 0,292 ms
23:52:48.163: ┣OBSBasic::ResetAudio: 0,346 ms
23:52:48.163: ┣OBSBasic::ResetVideo: 172,639 ms
23:52:48.163: ┣OBSBasic::InitOBSCallbacks: 0,007 ms
23:52:48.163: ┣OBSBasic::InitHotkeys: 0,033 ms
23:52:48.163: ┣obs_load_all_modules: 8,8 ms
23:52:48.163: ┃ ┣obs_init_module(image-source.so): 0,002 ms
23:52:48.163: ┃ ┣obs_init_module(linux-alsa.so): 0,001 ms
23:52:48.163: ┃ ┣obs_init_module(linux-capture.so): 0,369 ms
23:52:48.163: ┃ ┣obs_init_module(linux-decklink.so): 0,077 ms
23:52:48.163: ┃ ┣obs_init_module(linux-jack.so): 0,001 ms
23:52:48.163: ┃ ┣obs_init_module(linux-pulseaudio.so): 0,001 ms
23:52:48.163: ┃ ┣obs_init_module(linux-v4l2.so): 0,001 ms
23:52:48.163: ┃ ┣obs_init_module(obs-ffmpeg.so): 0,057 ms
23:52:48.163: ┃ ┣obs_init_module(obs-filters.so): 0,004 ms
23:52:48.163: ┃ ┣obs_init_module(obs-outputs.so): 0,001 ms
23:52:48.163: ┃ ┣obs_init_module(obs-transitions.so): 0,003 ms
23:52:48.163: ┃ ┣obs_init_module(obs-x264.so): 0,001 ms
23:52:48.163: ┃ ┣obs_init_module(rtmp-services.so): 0,065 ms
23:52:48.163: ┃ ┗obs_init_module(text-freetype2.so): 0,02 ms
23:52:48.163: ┣OBSBasic::ResetOutputs: 0,272 ms
23:52:48.163: ┣OBSBasic::CreateHotkeys: 0,019 ms
23:52:48.163: ┣OBSBasic::InitService: 0,042 ms
23:52:48.163: ┣OBSBasic::InitPrimitives: 0,104 ms
23:52:48.163: â”—OBSBasic::Load: 7,645Â ms
23:52:48.163: =================================================
23:52:59.152: Update check: last known remote version is 0.4.0
23:56:06.159: encoder 'simple_h264_stream' destroyed
23:56:06.159: encoder 'simple_aac' destroyed
23:56:06.159: output 'simple_stream' destroyed
23:56:06.159: output 'simple_file_output' destroyed
23:56:06.159: output 'adv_stream' (rtmp_output) created
23:56:06.159: output 'adv_file_output' (ffmpeg_muxer) created
23:56:06.159: encoder 'streaming_h264' (obs_x264) created
23:56:06.159: encoder 'adv_aac0' (ffmpeg_aac) created
23:56:06.159: encoder 'adv_aac1' (ffmpeg_aac) created
23:56:06.159: encoder 'adv_aac2' (ffmpeg_aac) created
23:56:06.159: encoder 'adv_aac3' (ffmpeg_aac) created
23:56:06.160: Settings changed (outputs)
23:56:06.160: ------------------------------------------------
00:10:10.879: ---------------------------------
00:10:10.879: [x264 encoder: 'streaming_h264'] preset: superfast
00:10:10.879: [x264 encoder: 'streaming_h264'] settings:
00:10:10.879: rate_control: CBR
00:10:10.879: bitrate: 2500
00:10:10.879: buffer size: 2500
00:10:10.879: crf: 0
00:10:10.879: fps_num: 30
00:10:10.879: fps_den: 1
00:10:10.879: width: 1920
00:10:10.879: height: 1080
00:10:10.879: keyint: 60
00:10:10.879: vfr: off
00:10:10.879:
00:10:10.888: ---------------------------------
00:10:10.889: [FFmpeg aac encoder: 'Track1'] bitrate: 160, channels: 2
00:10:10.890: Output 'adv_stream': 30 second delay active, preserve on disconnect is on
00:10:17.060: Output 'adv_stream': stopping
00:10:17.060: Output 'adv_stream': Total encoded frames: 31463
00:10:17.060: Output 'adv_stream': Total drawn frames: 31467
00:10:17.060: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 791 (2,5%)
00:10:17.065: ==== Streaming Stop ================================================
 
Last edited:

cxrx

New Member
I will give it a try. Going to log in to my windows first, before I can run the program. Thanks for you answer!
@Boildown Updated information.

nuzvl7c.png
 
Last edited:

Boildown

Active Member
So that's not it, that looks fine. I guess on OBS-Studio lagged frames are like duplicated frames in OBS Classic.

00:10:17.060: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 791 (2,5%)

You probably want that number to be less than 1%. You need to decrease your encode settings to decrease that number, can you try downscaling to 720p?
 

cxrx

New Member
I have decreased it to 1280x720 from 1920x1080 in encoder settings.
I'm curious, what does in "Video" -> "Output (Scaled) Resolution" mean?
I have changed the settings in encoder settigs to an output of 1280x720, do I have to change it in "Video" also? I don't think so...

Anyway, here is the stream. I'm going to hit university class. Going to shut the twitch-stream down at 10-11 p.m.
https://www.twitch.tv/crxstudent


Edit:// more information

What I have discovered: The ram usage is almost 15 GB of 16GB virtual memory.
When I close obs, its getting back to 1.2GB of 16GB ram usage.

Edit:// After I closed obs and restart it, it took around 2GB of 16GB ram usage... I don't get it.
When I streamed for like 5~15minutes, it took ~15GB ram usage..Now its just holding himself back with 2GB/16GB ram usage.
 
Last edited:
Top