Lightweight codec for streaming 1080p 60 FPS in real time

0

Specifying Problem

I want to stream my desktop to another computer over 1Gbps Ethernet with following requirements:

  • Resolution: 1920 x 1080
  • FPS: 60
  • Input Data: raw 24bit true color (3Gbps)
  • Max Output Bitrate: 800Mbps
  • Latency: < 50ms (Network latency is less than 1ms)
  • CPU: Use less than 20% of Intel Core2 Quad Q9300
  • Does not depend on specific hardware acceleration

Suppose that I'm playing a game over the stream (which I'm not) so the frame rate and latency is the most critical issue.

Question

I'm looking for a solution where I can compress the raw video data with 10x to 20x speed to real time. I don't care about bitrate.

Tested Software

  • RDP: Uses less than 40Mbps in highest quality and there is no option to set frame rate to 60FPS.
  • TightVNC: Allows specifing quality and encoding algorithm. Using "raw tight" as encoding parameter with AVB 80Mbps 60FPS reached on a 4GHz Intel Core i7-6700K but on lower end machine some serious lag start to apear. Using raw encoder, lag disappeared but the required bandwidth gets over 3Gbps so the fps is limited and some frame are teared
  • GamingAnywhere: This software uses H264 to encode raw data and send it over the network, but the encoder prevents it from reaching 60FPS (used bandwidth is < 60Mbps)

Tested Encoders

Tested on raw data input – single thread:

  • H264: runs at 1.33x (1x mean 60FPS)

    ffmpeg -i raw.avi -vcodec libx264 -crf 0 -preset ultrafast -threads 1 out.mp4

  • MJPEG: runs at 0.33x

  • PNG: PNG is more computationally complex than MJPEG so I didn't test it.

user41209

Posted 2018-03-22T14:57:42.080

Reputation: 139

@user41209 I wonder why GPU encoding is not an option here. H.264 is not so computationally expensive if you don't want high compression ratios. – slhck – 2018-03-22T15:36:54.443

Answers

0

The answer is VC2 which is specifically designed for Ethernet and streaming 1080p 60FPS video. from codec page on ffmpeg website

SMPTE VC-2 (previously BBC Dirac Pro). This codec was primarily aimed at professional broadcasting but since it supports yuv420, yuv422 and yuv444 at 8 (limited range or full range), 10 or 12 bits, this makes it suitable for other tasks which require low overhead and low compression (like screen recording).

target video bitrate Usually that’s around 1:6 of the uncompressed video bitrate (e.g. for 1920x1080 50fps yuv422p10 that’s around 400Mbps). Higher values (close to the uncompressed bitrate) turn on lossless compression mode.

user41209

Posted 2018-03-22T14:57:42.080

Reputation: 139

Thanks for the feedback, user41209. Q&A sites like those in the StackExchange sites work best for non-opinion, semi-permanent answers. Your question is complex enough and has enough potential for people to argue about options that it's probably worth registering at a forum-style site, instead of a Q&A site. – Christopher Hostage – 2018-03-22T17:36:03.793

1

@user41209 I was actually trying to help you post a good quality question that fits within our on topic guidelines (not just a shopping question) and is also not a subjective question that is likely to be closed. After your question was edited by another user to bring it within scope I was the one that happily reopened it.

– Mokubai – 2018-03-22T18:37:09.130

@user41209 It may be hard to know what the community rules are if you're just starting out. Please don't assume negative intent from the side of moderators – they're trying to keep questions on topic and solvable. We'd like to have questions focus on the actual issue (i.e. streaming from one PC to another) instead of the assumed solution (i.e. give me a lightweight codec to do so). – slhck – 2018-03-22T20:06:15.547

Please stop adding irrelevant commentary to your posts. If you have something to discuss, feel free to visit [meta]. – slhck – 2018-03-23T08:05:18.577