- Ubuntu 18.04
- NVIDIA driver 430.40
- NVIDIA Video Codec SDK 9.0.20
gst-launch-1.0 -v videotestsrc ! video/x-raw,width=1280,height=640 ! glimagesink
gst-launch-1.0 -v videotestsrc ! video/x-raw,width=1280,height=640 ! videoconvert ! x264enc key-int-max=12 byte-stream=true ! mpegtsmux ! tcpserversink port=8888 host=0.0.0.0
vlc using tcp://192.168.1.192:8888
Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:
Considerations to take when live streaming:
The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:
-
Set the buffer size (
-bufsize:v) equal to the target bitrate (-b:v). You want to ensure that you're encoding in CBR mode. -
Set up the encoders as shown:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @rem Place this file at the live/ directory of the downloaded LIVE555 source files. | |
| @rem Based on instructions at https://nspool.github.io/2016/02/building-live555/ | |
| @rem Tested with Visual Studio 2015 on Windows 10 | |
| @echo off | |
| if exist "%TEMP%\sed.vbs" goto skip_gen_sed | |
| > "%TEMP%\sed.vbs" ( | |
| REM thanks to https://stackoverflow.com/questions/127318/is-there-any-sed-like-utility-for-cmd-exe | |
| @echo.Dim pat, patparts, rxp, inp | |
| @echo.pat = WScript.Arguments(0^) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #CODE | |
| #Generate root password | |
| import random, string | |
| password = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(20)) | |
| #Download ngrok | |
| ! wget -q -c -nc https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip | |
| ! unzip -qq -n ngrok-stable-linux-amd64.zip | |
| #Setup sshd |