Install

  • sudo apt-get remove golang --purge
  • curl -LO https://get.golang.org/$(uname)/go_installer && chmod +x go_installer && ./go_installer && rm go_installer
  • source $HOME/.bash_profile

compile something

  • go get github.com/ncw/rclone
  • $HOME/go/bin/rclone help

if you get process killed try

  • go get -d github.com/ncw/rclone
  • go build ./go/src/github.com/ncw/rclone
  • go install ./go/src/github.com/ncw/rclone
  • $HOME/go/bin/rclone

enable more swap if you have a 512MB VPS

  • sudo fallocate -l 1G /swapfile
  • sudo chmod 600 /swapfile
  • sudo mkswap /swapfile
  • sudo swapon /swapfile

Server Setup

  • Get yourself a VPS at DigitalOcean
  • git clone https://github.com/nwgat/wg-quick-setup && cd wg-quick-setup
  • sh wg-quick-setup-auto.sh (automatic, opens firewall, configure routing)
  • sh wg-quick-setup-manual.sh(manually input the ip/domain and ethernet device)
  • sh wg-quick-setup-uninstall.sh (removes /etc/wireguard and wireguard/wireguard-tools packages)

Client Setup

  • Windows: Open Wireguard. Press Ctrl + N. Now Copy & Paste the client config output here
  • Linux: copy the client config output to /etc/wireguard/wg0.conf and starte wireguard with wg-quick up wg0

  • sudo apt-get install git cmake gcc yasm build-essential autoconf libtool libfreetype-dev libfribidi-dev libfontconfig1-dev python libsdl2-2.0-0 libsdl2-dev libgnutls28-dev libva2 libva-dev vainfo libbluray-dev liblua5.3 liblua5.3-dev libdrm-dev libsdl2-dev libsdl2-mixer-dev libarchive-dev wayland-protocols libvdpau-dev libplacebo-dev libgdm-dev libluajit-5.1-dev -y
  • git clone https://github.com/mpv-player/mpv-build.git && cd mpv-build
  • ./use-mpv-release
  • ./use-ffmpeg-release
  • ./rebuild -j8
  • sudo ./install
  • echo "hwdec=vaapi" > .config/mpv/mpv.conf
  • mpv http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_2160p_60fps_normal.mp4

You will need to have ubuntu or another linux distro, its the easiest method

setting up and upgrading firmware

  • sudo apt-get update && sudo apt-get upgrade
  • sudo apt-get install python3-pip
  • sudo pip3 install esptool
  • sudo pip3 install mpfshell
  • dmesg | grep ttyUSB (find the correct port, should be ttyUSB0)
  • sudo esptool.py --port /dev/ttyUSB0 flash_id (check the device)
  • Download the firmware https://micropython.org/download#esp32
  • sudo esptool.py --port /dev/ttyUSB0 write_flash 0x1000 file.bin (now we flash with the file you downloaded`''

setting up wifi

  • mkdir esp && cd esp
  • echo "import wifi" > boot.py

now we need to create nano wifi.py and save the following code in it, dont forget to change network and password so it connects

import network station = network.WLAN(network.STA_IF)
station.active(True)
station.connect("yournetworkname", "yourwifipassword")
station.ifconfig()

connect and upload

mpfshell -o COM5 -c "put wifi.py"

mpfshell -o COM5 -c "put boot.py"

now reconnect the usb connector to reboot

mpfshell commands

  • help (shows all commands)
  • get boot.py (download from esp)
  • put boot.py (uploads to esp)
  • repl (interactive python shell)

Resources

AMD Settings

  • Enable GPU Scaling on 1920x1200 Display 1 (if you have one, this will make both 1080p)
  • Pixel Format: YCbCr 4:2:2 on Display 2 (Cam Link 4K)
  • Disable HDMI Link Assurance on Display 2 (just in case)

Windows Settings

  • Clone Displays (1080p)

Hardware

  • Directly plug in the cam link into your usb port, do not use cable (if you have 10Gbps or faster ports use that)

Capture (FFMPEG, AMF)

720p AVC

  • ffmpeg -hide_banner -rtbufsize 1024M -f dshow -i video="Cam Link 4K":audio="Digital Audio Interface (Cam Link 4K)" -vf scale=1280:-1 -pix_fmt yuv420p -c:v h264_amf -b:v 50M -c:a flac -preset:v high -f matroska test.mkv

720p HEVC

  • ffmpeg -hide_banner -rtbufsize 1024M -f dshow -i video="Cam Link 4K":audio="Digital Audio Interface (Cam Link 4K)" -vf scale=1280:-1 -pix_fmt yuv420p -c:v hevc_amf -b:v 50M -c:a flac -preset:v high -f matroska test.mkv

1080p AVC

  • ffmpeg -hide_banner -rtbufsize 1024M -f dshow -i video="Cam Link 4K":audio="Digital Audio Interface (Cam Link 4K)" -pix_fmt yuv420p -c:v h264_amf -b:v 50M -c:a flac -profile:v high -f matroska test.mkv

1080p HEVC

  • ffmpeg -hide_banner -rtbufsize 1024M -f dshow -i video="Cam Link 4K":audio="Digital Audio Interface (Cam Link 4K)" -pix_fmt yuv420p -c:v hevc_amf -b:v 50M -c:a flac -profile:v high -f matroska test.mkv

OBS Studio

  • You can now simply use it as usual in obs studio

Reference

  • switch to h264_nvenc or h264_qsv if you have nvidia or intel gpu
  • ffmpeg -hide_banner -list_devices true -f dshow -i dummy
  • if you are using a DSLR, try switching camera to 720p60 mode, also change the pixel format if it has support for that to YCbCr 4:2:2 or YCbCr 4:2:0 to lower the bandwith used
Receive $10 in credit at DigitalOcean for your VPS Hosting
Cheaper Games on Instant-Gaming
Proudly published with Ghost | Theme based on Draugur | Header Image by GUWEIZ@DeviantArt
Creative Commons Licence