-
-
Notifications
You must be signed in to change notification settings - Fork 110
Advanced tips
The built-in video player in SysDVR-Client 5.0 by default will use ffmpeg's default decoder for h264, in my tests this is always a software decoder, you can provide your own decoder name with the --decoder <decoder name> option from the command line.
This is especially useful on mini PCs where decoding the video stream in software is too slow.
To view the decoders installed on your pc you can do dotnet SysDVR-Client.dll --show-decoders, in the output the decoder called h264 is the default one, the part before : is the name you have to use with the --decoder option.
Note that the decoders shown are all the ones enabled in the ffmpeg build you're using, for example on an AMD pc you may see the Intel video decoder, that's not going to work.
As codecs are part of the ffmpeg libs you may want to provide your own libs, on windows replace the av*.dll files in runtimes/win-x64/native with your custom build. On linux and mac it depends on how you installed ffmpeg.
There's also the --hw-acc option that will choose the first decoder that it can find but it may not work because as explained earlier ffmpeg may show some decoders not compatible with your hardware.
Since version 5.0 the client includes a built-in video player for best performances but it is still possible to stream to external players with following command line options:
-
--rtspwill stream over rtsp on localhost on the port 6666, you can connect to it with players like mpv -
--stdoutwill stream the selected channel to the stdout, you can pipe this to other video players that support playing data from stdin. This is limited to one channel as it's not possible to launch two SysDVR-Client instances on the same console -
--mpvwill stream the selected channel to mpv via stdin, automatically configuring its command line options
These can also be set by enabling the advanced options in SysDVR-Client GUI.
There are more command line options, you can see them by running dotnet SysDVR-Client.dll --help
The best streaming setups i can think of, from best to worse, are:
- Switch and PC directly connected to each other via lan. For this to work you'd need to host a dhcp server, your own 90dns instance and a server to spoof conntest.
- Switch and PC connected via lan to the same router.
- Switch connected to a near 5GHz router and PC connected via lan.
Since SysDVR 4.0 the client has a custom WinUsb backend to improve USB performances on windows, due to protocol differences it won't work with libusb, if you're on windows and installed the libusb-win32 driver you can force it by selecting Force LibUsb backend in the GUI or by adding --no-winusb to the command line.
This is especially important for simple network mode.
The SysDVR server supports both RTSP over TCP and UDP, this usually doesn't matter but I've found different programs will connect using different modes, eg. mpv will always use TCP while obs will try UDP first and then TCP. Depending on your network environment you can find one to perform worse than the other so you'll have to test which one works best for you.
In mpv you can force udp mode by running mpv rtsp://<SwitchIpAddress>:6666/ --rtsp-transport=udp.
You can stream multiple consoles to the same pc by launching SysDVR-Client multiple times, for RTSP you have to change the port by adding the --rtsp-port <port number> option to the command line. This is not supported in the GUI.