Hardware H.264 encoding (Intel Quick Sync, NVIDIA CUDA)

Supported cards and issues

Hardware H.264 encoding (Intel Quick Sync, NVIDIA CUDA)

Postby atracurio » Fri Jan 22, 2016 4:07 pm

H264 software real-time encoding in 1080p takes huge CPU load, even on a 4 core i7 core processor.

Hardware encoding technologies such as Intel's Quick Sync or NVIDIA CUDA (or NVENC) could relieve CPU stress at high resolutions.

Are there any plans to implement hardware based codecs?
atracurio
 
Posts: 0
Joined: Fri Jan 22, 2016 3:51 pm

Re: Hardware H.264 encoding (Intel Quick Sync, NVIDIA CUDA)

Postby admin » Fri Jan 22, 2016 8:34 pm

...maybe...

There are already implementations by mainconcept and leadtools, but ... yes...maybe...
admin
Site Admin
 
Posts: 1001
Joined: Fri Aug 21, 2009 10:13 am

Re: Hardware H.264 encoding (Intel Quick Sync, NVIDIA CUDA)

Postby atracurio » Sun Jan 24, 2016 6:54 am

To put you into context:

I need to stream real time video (webcam or camcorder source) over a LAN. With "real time" i mean latencies below 1000 ms. The less, the better.

Since I'll be using the same machine for running other programs, I need to minimize CPU impact of the live encoder.

Bandwidth is not a problem, since we'll stream over a LAN.

So, to minimize CPU stress It's mandatory to use HW encoding, especially if we stream HD video (720p 30 fps or more).

Tricks that work:

* Capture compressed content and stream original content:

- If bandwidth is not a problem and our webcam has an MJPG video source pin we can stream MJPG video with minimal CPU impact.
Pros: High quality video. Minimum CPU stress as live server will not need to perform video transcoding. Realtime (latencies below 300 ms). Works with VLC.
Cons: High bandwidth depending on the resolution and framerate.

- If our webcam supports hardware H.264 encoding (e.g. Logitech c920) we'll take advantage of the same pros with lower bandwidth.
****** TRICK ****** TO ENABLE H.264 VIDEO PIN IN THE C920 DO NOT USE LOGITECH'S DRIVER. USE MICROSOFT'S USB VIDEO DRIVER. It's fully compatible and will enable in-camera H.264 encoding.


* If our video source streams only raw video (e.g. Magewell USB Capture HDMI) we'll have to encode it first.
Options:
- Use Unreal Live Server.
Pros: High quality (depending on bitrate) and low latency.
Cons: High CPU load.

- Use external software to encode video.
OBS: If we use Intel's Quick Sync or Nvidia NVENC we'll minimize CPU load. The bad: I'm getting latencies around 15 SECONDS!!!
ffmpeg: I haven't tried it yet.
atracurio
 
Posts: 0
Joined: Fri Jan 22, 2016 3:51 pm

Re: Hardware H.264 encoding (Intel Quick Sync, NVIDIA CUDA)

Postby admin » Sun Jan 24, 2016 9:31 am

ffmpeg might help; and of course, you can use hardware IP encoders like our UM400 or Teradek Vidiu.
admin
Site Admin
 
Posts: 1001
Joined: Fri Aug 21, 2009 10:13 am

Re: Hardware H.264 encoding (Intel Quick Sync, NVIDIA CUDA)

Postby atracurio » Sun Jan 24, 2016 11:26 am

OBS works fine with Unreal Media Player. There is almost no lag.

The problem is that I want to use VLC as media player. It works but video plays with a huge delay.

I'd like to use VLC because I created a WPF application which uses Vlc.DotNet.

I wonder if it would be possible to add a control like there is in the SDK C# example, but in a WPF application.
atracurio
 
Posts: 0
Joined: Fri Jan 22, 2016 3:51 pm

Re: Hardware H.264 encoding (Intel Quick Sync, NVIDIA CUDA)

Postby atracurio » Sun Jan 24, 2016 2:55 pm

Solved.

My setup:

Camcorder (HDMI OUT) --> Magewell USB HDMI --> OBS RTMP stream --> UMS

In order to play it in VLC without lag, enable audio sync and tweak clock-jitter.


On an i7 laptop at 720p 30fps (enough for my purposes) with Quick Sync enabled in OBS i get a CPU usage of around 3-4%.
atracurio
 
Posts: 0
Joined: Fri Jan 22, 2016 3:51 pm


Return to Capture and TV-Tuner cards

Who is online

Users browsing this forum: No registered users and 0 guests

cron