HeartOfGermany
New Member
Hello. I have a Problem, that is hard to fix... I need to Stream my Monitor to the ffplay.exe with as low lag as possible. That means: If ffplay would send keyboard and mouse input, it should feel at least almost as fluid as just doing it on the real monitor.
Why? I need to record the screen and than play it on a second screen with the left side of image cropped. I already reduced the lag in ffplay with the following command:
START C:\Users\Ultron\Downloads\rescale\ffmpeg\bin\ffplay -probesize 40 -i udp://224.0.0.1:9999 -vf "scale=0.5*iw:-1"
- probesize 40 just reduces the buffer size to a bare minimum. Just enough, so it even can play the stream at all!
40 or 200 does not make a noticeable difference btw.
Well... If I test it, it has a delay of around 500ms. So for a live picture this absolutely is unusable! I cannot allow any more than 50ms delay. This is the max that can work for me!
Is there a way, to increase the rendering speed as frick? I mean, since the stream is on the local machine per the public broadcast domain/IP, there is no bottleneck in transfer speed - so I do not care about a raw video or a lossless compressed video at all.
Why that all? If I tell, you call me absolutely heck of insane. So please do not ask. :D ;)
Very important: I do not care, what kind of solution I use, but I want to be able to stream absolutely anything, even HDCP content (even though it is not important for my purpouse I guess). At least a fullscreen game and the desktop with browser and more needs to be streamable.
NVIDIA Gamestream (Geforce Experience) has an ultra low latency. This would be plenty for my purpouse. But there are problems:
- I need to be able to play the stream 2 times at the same time, also on the same PC (yes, absolutely required!); Nvidia Gamestream can only be viewed 1 Time, since it actually is intended to be a local, low latency, remote desktop app basically.
- I need to be able to crop the video > like with the command I posted early (Gamestream cannot be cropped - it is just 1:1 output, since it is within an app)
What I did so far:
- OBS is streaming via "Record" - mode. The file output path is the local broadcast IP (=stream)
- Codec:
*FFMPEG output to URL
*15000kbps (looks good enough, changing to 150 only does not improve latency!)
*keyframes - does not affect latency
*hevc_nvenc (nvenc_hevc) >> = Nvidia hardware rendering??? I use GTX 1060 by the way.
*Audio - does not matter, latency unaffected
So now I am out of ideas... What to do? There are like a hundret of codecs to select. Which one is good for my usecase?
If I want to start the streaming, I press record. Just execute the command, I posted above, this plays back the stream in ffplay - but about 500ms delayed...
Thanks!
Edit: I edited the FPS from 30-60 with a considerable improvement. Now like 100ms only. How to increase beyond 60fps?
> https://obsproject.com/forum/threads/obs-144fps.93940/
3rd post there is a link, that shows a stream with 144fps (or 143 to be exact). How do I do that? I cannot find a cfg file in the install directory...
Edit 2: Found it - got 120 to work. Yet better delay. Still, to bad for any gaming whatsoever.
Why? I need to record the screen and than play it on a second screen with the left side of image cropped. I already reduced the lag in ffplay with the following command:
START C:\Users\Ultron\Downloads\rescale\ffmpeg\bin\ffplay -probesize 40 -i udp://224.0.0.1:9999 -vf "scale=0.5*iw:-1"
- probesize 40 just reduces the buffer size to a bare minimum. Just enough, so it even can play the stream at all!
40 or 200 does not make a noticeable difference btw.
Well... If I test it, it has a delay of around 500ms. So for a live picture this absolutely is unusable! I cannot allow any more than 50ms delay. This is the max that can work for me!
Is there a way, to increase the rendering speed as frick? I mean, since the stream is on the local machine per the public broadcast domain/IP, there is no bottleneck in transfer speed - so I do not care about a raw video or a lossless compressed video at all.
Why that all? If I tell, you call me absolutely heck of insane. So please do not ask. :D ;)
Very important: I do not care, what kind of solution I use, but I want to be able to stream absolutely anything, even HDCP content (even though it is not important for my purpouse I guess). At least a fullscreen game and the desktop with browser and more needs to be streamable.
NVIDIA Gamestream (Geforce Experience) has an ultra low latency. This would be plenty for my purpouse. But there are problems:
- I need to be able to play the stream 2 times at the same time, also on the same PC (yes, absolutely required!); Nvidia Gamestream can only be viewed 1 Time, since it actually is intended to be a local, low latency, remote desktop app basically.
- I need to be able to crop the video > like with the command I posted early (Gamestream cannot be cropped - it is just 1:1 output, since it is within an app)
What I did so far:
- OBS is streaming via "Record" - mode. The file output path is the local broadcast IP (=stream)
- Codec:
*FFMPEG output to URL
*15000kbps (looks good enough, changing to 150 only does not improve latency!)
*keyframes - does not affect latency
*hevc_nvenc (nvenc_hevc) >> = Nvidia hardware rendering??? I use GTX 1060 by the way.
*Audio - does not matter, latency unaffected
So now I am out of ideas... What to do? There are like a hundret of codecs to select. Which one is good for my usecase?
If I want to start the streaming, I press record. Just execute the command, I posted above, this plays back the stream in ffplay - but about 500ms delayed...
Thanks!
Edit: I edited the FPS from 30-60 with a considerable improvement. Now like 100ms only. How to increase beyond 60fps?
> https://obsproject.com/forum/threads/obs-144fps.93940/
3rd post there is a link, that shows a stream with 144fps (or 143 to be exact). How do I do that? I cannot find a cfg file in the install directory...
Edit 2: Found it - got 120 to work. Yet better delay. Still, to bad for any gaming whatsoever.
Last edited: