Encoding over lan and GPU assisted encoding

Bensam123

Member
I've tried a few different pieces of streaming software and this one looks pretty promising.

Have you guys considered offloading encoding to a different computer on a LAN? I honestly would really love this feature and that seems to be part of what puts such a huge load on everyones computer. I know you can buy a capture card and hook it up to a secondary PC, but that comes with a hit to quality and there are usually limitations involved with capture cards. It honestly isn't very elegant either.

I understand it's impossible to transmit raw video data across the network as gigabit is too slow, but with some light encoding I think it would be possible to remove most of the burden from the client PC and relay it to a server on the network which then fully encodes it and sends it off to Twitch.


Also have you guys considered GPU encoding? I'm not talking about using the built in encoder in GPU now days as it offers horrendous quality, but utilizing a second graphics card or IGP to do parallel tasks (using it as a coprocessor). This is also another option that is not available in any other piece of streaming software, but I think everyone would thoroughly enjoy. Most people have a secondary PCIE slot sitting open waiting for another video card or a built in IGP already.

Using something like OpenCL. I would thoroughly <3 any of these options.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
There are people currently experimenting with it -- not sure how great the results will be though, yet. Encoding via lan would be really cool though. If you can get a network connection of sufficiently high bandwidth it should be easily doable. I want to personally experiment with these things in the future myself as well.
 

Bensam123

Member
Yeah, they're really cool, but the moment I mention GPU encoding people instantly think of the built in hardware encoder, but I'm simply referring to using the GPU as a coprocessor. Using something like OpenCL and a secondary graphics card, which wouldn't have to be powerful at all, it would take almost all the load off the CPU. With a IGP that's like a win-win for anyone with a computer built in the last three years. Anyone else could simply buy a cheap graphics card for like $20.

I'm really stuck between a rock and a hard spot right now. I have a i7-860 and it's showing its age. I have the option of upgrading to a faster processor, but I would rather not do that. I really need a option to get rid of the encoding workload.

I thought about getting the Avermedia Live Gamer HD for xsplit, but that seems like a $200 waste of money for something that could be added to the software itself and offloaded to something that costs 10% of the cost. Not to mention that's pretty much the price of an entirely new processor.

I have a lan server as well that I use for everything else that I would love to use for the encoding workload. I know quite a few people that have a secondary lan computer as well and gigabit is pretty standard.

I know there is some experimentation, but for how long this stuff has been out really nothing is being done with it (referring to x264 encoding, IGPs, and opencl). I was reading some topics on doom9, but that is really early alpha stage stuff as well and would probably be impossible to hobble together with prebuilt streaming software from my end.

I mentioned this on FFsplit and no one seemed interested and I've read a few topics of people suggesting similar things on the xsplit forums, but the staff there seems to have no interest in doing anything interesting with the software. The thing's a pos, but streamers don't have a lot of real options right now.
 

hilalpro

Member
Jim said:
-- not sure how great the results will be though,
i have tried this with bandicam (xvid light compression) + ffmpeg. the results are great (almost tripled my fps for the same performance) the down side is a delay in stream.

should have like atleast 15 seconds buffer on the real time file + the typical delay in stream..

if only adobe flash player had support for xvid in the first place.
 

Fred_

New Member
From what I've heard, GPU doesn't help very much, if at all in some cases. I didn't read that thread, but I from what I've read on irc, they've put only motion estimation on the gpu. Maybe it helps on faster presets, i've previously only been interested in slower presets.
 

Bensam123

Member
Perhaps not in that specific implementation, but I don't believe GPU assisted encoding to be a win/loss. Having a second coprocessor you can shove tasks off to that wouldn't negatively effect system performance would be a pure win.

I don't think having a stream delay would be that terrible as getting the stream out isn't that time sensitive (within reason). Time for people receiving the stream compared to when it's broadcast is all relative, with the exception being chat that can break that immersion.
 

Fred_

New Member
I guess it depends on what you're streaming. Pushing out more tasks to the gpu while streaming games seems like a poor idea, but if you're not streaming games it could be a better idea.
 

Bensam123

Member
Aye, utilizing a GPU thats already being used by gaming is a bad idea. I was talking about a IGP (graphics processor found on newer Intel and AMD chips, which is rarely used if you have a dedicated video card bar Lucid Virtu) or a secondary graphics card, which can be bought for $10-20.
 

ooferomen

New Member
seem like usb 3.0 would be ideal for a 2 PC encoding setup but i don't think there is an ethernet over usb driver or something similar for windows :|
 

pystub

New Member
Just a suggestion for transport format for LAN encoding: MJPEG. Transcoding a full HD movie with no audio from h264 ran at about 65 fps on my old Core 2 Quad while using 75% of the CPU (20% should be attributed to decoding). Bitrate was about 3 MB/s. Quality doesn't seem to be affected, all the small detail and grain was retained. FFmpeg was used for the test and I bet that JPEG can be easily encoded with a GPGPU.
 

Bensam123

Member
:O

I didn't think of USB3 and you can do networking over USB... it's even built into windows! At least it used to be in Windows XP. I haven't tried it in years. That's something I haven't thought about in a long time, it would also give you a cheap 5 gigabit connection as long as you can find a device to connect the two. Holy shit.

I haven't heard of MJPEG, definitely sounds like something that would be great for light encoding before sending it across the network for full encoding.

And yeah, it's entirely possible to do both GPU assisted encoding and lan encoding removing practically all workload...
 

mark7807

New Member
Any word on this? This has always been a method of consideration as I have a decent gaming laptop, as well as my gaming rig. Any word on this and using some sort of plugin with OBS?
 

ooferomen

New Member
Bensam123 said:
:O

I didn't think of USB3 and you can do networking over USB... it's even built into windows! At least it used to be in Windows XP. I haven't tried it in years. That's something I haven't thought about in a long time, it would also give you a cheap 5 gigabit connection as long as you can find a device to connect the two. Holy shit.

I haven't heard of MJPEG, definitely sounds like something that would be great for light encoding before sending it across the network for full encoding.

And yeah, it's entirely possible to do both GPU assisted encoding and lan encoding removing practically all workload...

you don't even need a device to connect them. usb 3.0 spec allows a direct connection with a simple crossover cable.
 

Bensam123

Member
Well I didn't know that. Before you had to use a special cable for it... That makes it even easier... I know they increased the length of runs for USB 3 as well, so it's possible to run them across a house or into another room.

USB 3 is full duplex now so it functions a lot like ethernet. You can also find cheap USB 3 PCIe adapters so this would be relatively easy for people to adopt or use.

Jim said he was considering lan encoding as per the first page and that it may be fairly easy to implement. I bumped it so it wouldn't be forgotten and some brainstorming could happen. USB as a alternative to ethernet, if more bandwidth is needed, and MJPG are interesting thoughts. After doing some reading on mjpeg, I'm unsure how mjpeg would deal with high motion scenes... I've seen it used with IP cams, but those are hardly high FPS or high motion. Perhaps there is more to it.
 

pystub

New Member
Bensam123 said:
I'm unsure how mjpeg would deal with high motion scenes...
As far as I know, MJPEG encodes every frame separately as a JPEG image, there is no motion prediction.
 

Bensam123

Member
So, I've been thinking about jerry-rigging a way to do lan encoding. Some people have mentioned using a RTMP relay server in order to combine streams... What would happen if you set OBS for it's native res, a quality of 10, max audio settings, the fastest possible encoder setting, and an absurdly high bitrate of like 900,000 or something like that. Then send that stream over the lan to a relay server, where it would re-encode the stream and then send it to Twitch?

It seems like a duct tape mod, but I'm curious if anyone has experience with doing this. The idea being computer A will do absolutely no encoding on the stream due to the streaming settings and will have higher performance because of it, while computer B does all the encoding somewhere else.

That aside, does anyone know of a easy to use relay program that may fit this? I know Xsplit had the option of adding a stream as a source... How easy would that be to implement in OBS?
 
Top