Skip to content

Instantly share code, notes, and snippets.

# run this on the clean CLI
# bash <(curl -sL https://gist.githubusercontent.com/johan149/98604b831521a6c2435bfb74eacf075e/raw/7601555f22c12d8bce2854d4975d14a326dd16bd/install_docker.sh)
# install docker
sudo apt update
sudo apt -y install apt-transport-https ca-certificates curl software-properties-common aria2
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt update
apt-cache policy docker-ce
# SRT config.
listen 1935;
max_connections 1000;
daemon off;
srs_log_tank console;
http_api {
enabled on;
listen 1985;
listen 1935;
max_connections 1000;
daemon off;
srs_log_tank console;
http_api {
enabled on;
listen 1985;
}
http_server {
enabled on;
# bash <(curl -sL https://gist.githubusercontent.com/johan149/dfbc121b2eacbf2f7044fa500aa8e518/raw/f9f8fcebddc7744504b3daf4fdf30b44b1649de5/install_cuda_12.1.1_ubuntu2024.sh)
# Remove current cuda version
sudo apt-get --purge remove -y "*cuda*" "*cublas*" "*cufft*" "*cufile*" "*curand*" "*cusolver*" "*cusparse*" "*gds-tools*" "*npp*" "*nvjpeg*" "nsight*" "*nvvm*"
sudo apt-get --purge remove -y "*nvidia*" "libxnvctrl*"
sudo apt-get autoremove -y
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda-repo-ubuntu2004-12-1-local_12.1.1-530.30.02-1_amd64.deb
listen 1935;
max_connections 1000;
daemon off;
srs_log_tank console;
http_api {
enabled on;
listen 1985;
}
http_server {
enabled on;
@johan149
johan149 / install_dev_srs.sh
Last active November 8, 2023 23:02
Install SRS dev docker
# run this on the clean CLI
# bash <(curl -sL https://gist.githubusercontent.com/johan149/8eba975312814db14155ba9e56010946/raw/d0b6eeaa14291d4395c059890eff04bff385f678/install_dev_srs.sh)
# install docker
sudo apt update
sudo apt -y install apt-transport-https ca-certificates curl software-properties-common aria2
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt update
apt-cache policy docker-ce
@johan149
johan149 / ffmpeg_optimized_videos.md
Last active December 25, 2021 01:44
Convert HQ image sequences to h264/mp4 h265/mp4 ogv/theora & vp9/webm For Cross-Browser Compatibility
  • H264 CRF 17
ffmpeg -y -r 30 -f image2 -i "C:\Users\server\Downloads\meetmo\meetmo_2.0\auth\animations\bg\login_bg.%04d.png" -c:v libx264 -crf 17 -profile:v high -preset veryslow -pix_fmt yuv420p -color_primaries 1 -color_trc 1 -colorspace 1 -movflags +faststart -an "C:\Users\server\Downloads\meetmo\meetmo_2.0\auth\animations\login_bg_h264_crf17.mp4"
  • H264 CRF 23
ffmpeg -y -r 30 -f image2 -i "C:\Users\server\Downloads\meetmo\meetmo_2.0\auth\animations\bg\login_bg.%04d.png" -c:v libx264 -crf 23 -profile:v high -preset veryslow -pix_fmt yuv420p -color_primaries 1 -color_trc 1 -colorspace 1 -movflags +faststart -an "C:\Users\server\Downloads\meetmo\meetmo_2.0\auth\animations\login_bg_h264_crf23.mp4"
  • H264 CRF 25