These are commands I use on a regular basis. For the sake of simplicity, the filenames I use in the examples below are in.mp4
and out.mp4
, though you can use your imagination to picture blah.mov
or audio.wav
on a case-by-case basis.
This file contains 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
#! /bin/bash | |
set -e | |
wget https://go.dev/dl/go1.22.4.linux-amd64.tar.gz | |
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.22.4.linux-amd64.tar.gz | |
rm go1.22.4.linux-amd64.tar.gz | |
echo "Checking golang version" | |
echo "export PATH=$PATH:/usr/local/go/bin" >>~/.bashrc | |
source ~/.bashrc |
This file contains 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
## ====================================================================================================== ## | |
## Visit this page for a list of all variables: https://github.com/arut/nginx-rtmp-module/wiki/Directives ## | |
## Visit this site for many more configuration examples: https://github.com/arut/nginx-rtmp-module ## | |
## This example file was put together by Andre "ustoopia" for usage on https://youtube.com/ustoopia ## | |
## ====================================================================================================== ## | |
user www-data; # Only used on linux. Nginx will run under this username. | |
worker_processes 1; # Set this to how many processors/cores CPU has. Relates to "worker_connections" | |
pid /run/nginx.pid; # Sets the location of the process id file (used on linux only). | |
include /etc/nginx/modules-enabled/*.conf; # Include all the optional configuration files stored here. | |
events { |
This file contains 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
#!/bin/bash | |
set -e | |
rm -rf openresty-1.19.3.2 openresty-1.19.3.2.tar.gz | |
apt-get update -y | |
apt-get install -y libpcre3-dev \ | |
libssl-dev \ | |
perl \ | |
make \ | |
build-essential \ |
Moved to git repository: https://github.com/denji/nginx-tuning
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
This file contains 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
#!/bin/sh | |
# View the data disk. | |
fdisk -l | |
# View the partition UUID of the data disk. | |
lsblk -f | |
# NTP service synchronizes with the NTP server. | |
sudo apt-get install ntp | |
apt install ntpstat | |
apt install numactl |
This file contains 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
const ec = new TextEncoder(); | |
const algorithm = { name: "HMAC", hash: "SHA-256" }; | |
// generates a signature for the given data using the given key | |
async function generateHmacKey(secret) { | |
const { subtle } = globalThis.crypto; | |
return subtle.importKey( | |
"raw", | |
typeof secret === "string" ? ec.encode(secret) : secret, | |
algorithm, |
This file contains 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
"use strict"; | |
(function (window) { | |
// Insight API | |
var API_URL = 'https://rum-cdn.cdnmadeeasy.com'; | |
// Get resources list from the API | |
var RESOURCES_URL = 'https://rum-cdn.cdnmadeeasy.com/providers'; | |
// Resources list TTL in the LocalStorage(5 minutes) | |
var RESOURCES_TTL = 5 * 60 * 1000; // Resources list TTL in the LocalStorage(5 minutes) | |
var QUEUE_LIMIT = 10; // Defaults for repeats. Those could be overridden by settings from rum-cdn |
This file contains 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
<html> | |
<head> | |
<link href="https://releases.transloadit.com/uppy/v3.0.1/uppy.min.css" rel="stylesheet" /> | |
</head> | |
<body> | |
<div id="drag-drop-area" style="height: 300px"></div> | |
<div class="for-ProgressBar"></div> <button class="upload-button" | |
style="font-size: 30px; margin: 20px">Upload</button> |
This file contains 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
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
NewerOlder