SysDVR - Stream gameplay directly to a pc

SysDVR
Stream/record gameplay to a PC via USB or network.
upload_2019-10-21_9-21-20.png

Update: Version 5.0 has been released with low latency streaming, be sure to check it out on github.

This is an experimental sysmodule that allows capturing the running game output on a pc.
As this uses switch's built-in game recording feature it has the same limitations: 720p@30fps and only works on the games that enable it, but by sending the video to another device there's no time limit to the recording.

There are two modes: USB and Network, both work fine but USB is slightly better, at least compared to wifi, didn't try with a LAN adapter.
Players like mpv or vlc can play the stream directly so you can use any screen recording applications but it's also possible to write the stream directly to a file.
To use the USB version you need the UsbStream program you'll find on the github page, it's built using .NET 5 and works on both windows and linux, haven't tried mac but in theory it should work too.

You can see it in action in the two teasers i posted while working on it:



As you can see it's not meant for remote play, but it can work as a basic capture card, audio output is uncompressed so it can be useful for ripping OSTs .

Download and wall of text guide on github: https://github.com/exelix11/SysDVR/
To get notified of updates you can follow this thread or join my new discord server (i also have a twitter account where occasionally post development updates).

Please make sure to read the full readme before reporting issues as it explains the most common problems you may encounter.
 
Last edited by exelix11,

exelix11

Developer
OP
Developer
Joined
Feb 25, 2015
Messages
915
Trophies
1
Location
C:\users\exelix11\
XP
3,062
Country
Italy
When using the gui version of usbstream 2.0 if you select to connect over network(tcp) it will begin by opening a cmd prompt and then endlessly say "waiting for client to connect on 6666". I have successfully gotten the usb mode to work with ease, I switched to network in the config homebrew app and it says streaming over network, however the pc never connects and endlessly reads the message above. Am I missing something? Is tcp mode just broken with UsbStreamGUI 2.0? Tried this on 3 different routers as well.
It's called relay cause it will send the video data to another app, you're supposed to launch another program like mvp or vlc and manually connect to tcp://localhost:<port number> and setting the proper args for raw h264 decoding

--------------------- MERGED ---------------------------

Read the readme, it shows how to do it. USBStream GUI is for usb only. You will need to follow https://github.com/exelix11/SysDVR/#network-streaming
Probably there's some confusion about this.
Network mode is for SysDVR to stream via network on its own, as in you don't need custom receiver programs like UsbStream
TCP or Relay mode in UsbStream is to receive the stream via USB and then relay it via network, ideally on the same pc to avoid performance loss.
The first feature is to actually stream wireless, the second one is a way of allowing other non-supported players to stream via USB
 
  • Like
Reactions: Ka_Ninja

strunx

Member
Newcomer
Joined
Oct 24, 2014
Messages
8
Trophies
0
Age
33
XP
140
Country
United States
When i try to launch it, i receive this error:


Error:
An assembly specified in the application dependencies manifest (UsbStream.deps.json) was not found:
package: 'LibUsbDotNet', version: '3.0.48-alpha'
path: 'runtimes/win-x64/lib/netcoreapp2.1/LibUsbDotNet.dll'

.net core 3.0 is installed, both 64 and x86 version, even sdk because i though maybe could be that so i'm running out of ideas xD
 

exelix11

Developer
OP
Developer
Joined
Feb 25, 2015
Messages
915
Trophies
1
Location
C:\users\exelix11\
XP
3,062
Country
Italy
When i try to launch it, i receive this error:


Error:
An assembly specified in the application dependencies manifest (UsbStream.deps.json) was not found:
package: 'LibUsbDotNet', version: '3.0.48-alpha'
path: 'runtimes/win-x64/lib/netcoreapp2.1/LibUsbDotNet.dll'

.net core 3.0 is installed, both 64 and x86 version, even sdk because i though maybe could be that so i'm running out of ideas xD
Did you extract the whole zip ? Looks like you skipped the runtimes folder that's supposed to be in the archive.
 

strunx

Member
Newcomer
Joined
Oct 24, 2014
Messages
8
Trophies
0
Age
33
XP
140
Country
United States
Did you extract the whole zip ? Looks like you skipped the runtimes folder that's supposed to be in the archive.
Yeah, that was exactly the problem but it was weird, i extracted the zip twice yesterday and today i had to add an exception to windows defender because i dont't know why but every time i extracted the zip, the whole runtimes folder dissapeared. Solved, thanks for pointing me the way
 

exelix11

Developer
OP
Developer
Joined
Feb 25, 2015
Messages
915
Trophies
1
Location
C:\users\exelix11\
XP
3,062
Country
Italy
I tried this out on Linux and it works good.
That is after I played around a bit, since I could not for the life of me get mpv to stream it live in sync. After some testing I found that saving the audio and video to files and muxing them after the fact produced great videos that were in sync.

I proceeded to make up my own process that resulted in a great live stream from the system that was in sync and no storage space was used on my system.
All it took was making fifo files for the audio and video then telling usbstream to save to those fifo's.
Then at the same time I have a ffmpeg process mux them together and pipe the output directly to ffplay via stdin.

So far in my tests it works great.
Follow-up on this, i just found out windows has fifos as well so i'm trying to implement livestream support.
Could you share your ffmpeg command ? I'm currently using this:
Code:
-f s16le -ar 48000 -ac 2 -i "//./pipe/UsbStreamA" -f h264 -i "//./pipe/UsbStreamV" -deinterlace -vcodec copy -pix_fmt yuv420p -preset veryfast -r 30 -g 60 -b:v 2500k -acodec libmp3lame -ar 44100 -threads 6 -qscale 3 -b:a 712000 -bufsize 512k -f flv "rtmp://a.rtmp.youtube.com/......."
Not an expert in ffmpeg magic at all and as expected quality is not really what i'd would like
 

shadowofdarkness

Well-Known Member
Member
Joined
Apr 17, 2007
Messages
536
Trophies
1
XP
2,260
Country
Canada
Follow-up on this, i just found out windows has fifos as well so i'm trying to implement livestream support.
Could you share your ffmpeg command ? I'm currently using this:
Code:
-f s16le -ar 48000 -ac 2 -i "//./pipe/UsbStreamA" -f h264 -i "//./pipe/UsbStreamV" -deinterlace -vcodec copy -pix_fmt yuv420p -preset veryfast -r 30 -g 60 -b:v 2500k -acodec libmp3lame -ar 44100 -threads 6 -qscale 3 -b:a 712000 -bufsize 512k -f flv "rtmp://a.rtmp.youtube.com/......."
Not an expert in ffmpeg magic at all and as expected quality is not really what i'd would like

Here is the commands I was using to stream it live. It would never get out of sync playing most games like Mario Kart or NSMBUDX. But it didn't like the Let's GO games when transitioning to a encounter.

./dotnet UsbStream.dll video file video.264 audio file audio.raw &
ffmpeg -fflags +genpts -framerate 30 -i video.264 -f s16le -ar 48000 -ac 2 -i audio.raw -c:v copy -c:a copy -f matroska - | ffplay -

Naturally ffmpeg could output to a file but I was just outputting to a pipe for immediate live playing. My command also left everything untouched and just muxed the audio and video together in a container for the player to have a easy time. Yours probably has some slowdown due to transcoding.
 
Last edited by shadowofdarkness,

exelix11

Developer
OP
Developer
Joined
Feb 25, 2015
Messages
915
Trophies
1
Location
C:\users\exelix11\
XP
3,062
Country
Italy
Here is the commands I was using to stream it live. It would never get out of sync playing most games like Mario Kart or NSMBUDX. But it didn't like the Let's GO games when transitioning to a encounter.

./dotnet UsbStream.dll video file video.264 audio file audio.raw &
ffmpeg -fflags +genpts -framerate 30 -i video.264 -f s16le -ar 48000 -ac 2 -i audio.raw -c:v copy -c:a copy -f matroska - | ffplay -

Naturally ffmpeg could output to a file but I was just outputting to a pipe for immediate live playing. My command also left everything untouched and just muxed the audio and video together in a container for the player to have a easy time. Yours probably has some slowdown due to transcoding.
oh right i forgot about -framerate 30, was getting a 25 fps stream and that broke everything.
Only audio has to be encoded, for video i can stream HOS h264 feed directly, even tho youtube once in a while complains about frequency of keyframes. Youtube's live preview has around 15s which looks just a bit above average for live streams so i'd say i'm getting there.
Thanks for the input
 

virusburger101

Member
Newcomer
Joined
Jul 30, 2018
Messages
15
Trophies
0
Age
33
XP
348
Country
United States
Just an interesting point I tried running the 2.0 version on SXOS just because the newest version of the cfw can start running stuff like this now. But the full version with the homebrew app and wireless will crash the cfw on a reboot, but the USB only version works perfectly. So anyone else that's running into this issue just know this will work AMAZINGLY on the USB mode and for now, you just have to manually disable it when needing to use the USB port.

Other than that thanks for the amazing tool!
 

exelix11

Developer
OP
Developer
Joined
Feb 25, 2015
Messages
915
Trophies
1
Location
C:\users\exelix11\
XP
3,062
Country
Italy
Just an interesting point I tried running the 2.0 version on SXOS just because the newest version of the cfw can start running stuff like this now. But the full version with the homebrew app and wireless will crash the cfw on a reboot, but the USB only version works perfectly. So anyone else that's running into this issue just know this will work AMAZINGLY on the USB mode and for now, you just have to manually disable it when needing to use the USB port.

Other than that thanks for the amazing tool!
Don't see why the other version should crash on sx, sounds more like you have other sysmodules thtat use too much memory
 

lordzombies

Member
Newcomer
Joined
Nov 11, 2017
Messages
10
Trophies
0
Age
34
Location
UK
XP
79
Country
United Kingdom
Thought i'd save everybody time and let them know it doesnt work in VR mode. i was hoping to stream the blaster gun, even if it would appear to be two circles. hah.

excellent when you get it working wireless however, better than kitkat for the 3ds in my opinion.
 

Itsblaze302

Active Member
Newcomer
Joined
Nov 4, 2017
Messages
33
Trophies
0
Age
25
XP
165
Country
United States
i am playing a game that goes into local wireless mode and wont allow to stream the gameplay, will there be a patch in the future or no way to record while in local wireless?
 

exelix11

Developer
OP
Developer
Joined
Feb 25, 2015
Messages
915
Trophies
1
Location
C:\users\exelix11\
XP
3,062
Country
Italy
This only works on cfw?
Yes

i am playing a game that goes into local wireless mode and wont allow to stream the gameplay, will there be a patch in the future or no way to record while in local wireless?
Not sure, still looking into the possibility of patching games that don't support it but it doesn't seem easy. About your case you mean via USB right ? Cause i'm pretty sure local wireless mode disconnects from the actual wireless thus network streaming would not work no matter what.
 

OkazakiTheOtaku

no thanks, I don't want a custom title
Member
Joined
Jul 20, 2016
Messages
1,461
Trophies
1
Location
127.0.0.1
XP
3,114
Country
Japan
I don't understand how to use UsbStream on *nix. It says it is supported and there is a runtime for my operating system but I don't see an actual CLI binary.
 

exelix11

Developer
OP
Developer
Joined
Feb 25, 2015
Messages
915
Trophies
1
Location
C:\users\exelix11\
XP
3,062
Country
Italy
I don't understand how to use UsbStream on *nix. It says it is supported and there is a runtime for my operating system but I don't see an actual CLI binary.
Download and install .net core runtime according to your distro instructions. If your distro is not officially supported just download the binaries. extract somewhere and add to path.
Then just run dotnet UsbStream.dll
 
  • Like
Reactions: OkazakiTheOtaku

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: Only thing you catch are STDs.