Skip to content

Instantly share code, notes, and snippets.

View roommini's full-sized avatar
🎯
Focusing

Chanchai Srithep roommini

🎯
Focusing
View GitHub Profile
@noelli
noelli / 1 NGINX RTMP-Server Setup for local Streams.md
Last active June 2, 2025 02:38
Compile NGINX with RTMP and setup Multi-Streaming

Compile NGINX with RTMP and setup Multi-Streaming

These Scripts will install NGINX with the RTMP Module in the usual directories similar to installation with apt-get.

The RTMP-Server you get with this can then be used to do one ore more of the following:

  • deliver streams in a local network
  • deliver streams to websites similar to youtube
  • transcode rtmp streams to hls video
  • publish to multiple streaming providers
  • record livestreams to a harddrive
@jerturowetz
jerturowetz / ffmpeg_the_works.sh
Last active January 22, 2025 19:14
ffmpeg commands for optimized video output
#!/bin/bash
#
# Example usage:
# bash ffmpeg_the_works.sh PATH/TO/FILE.mp4
if ! command -v ffmpeg > /dev/null;
then
echo "Missing ffmpeg!";
exit 1;
fi
@Domin8-IPTV
Domin8-IPTV / make247.sh
Created May 23, 2019 17:11
ffmpeg concatenate all media files in the current directory with .mp4 extension
#!/bin/sh
# use ffmpeg to concatenate all the mp4 files in the media directory
# make file executable and run like this
# ./make247.sh /path/to/media/folder
#
IN_DIR="$1";
if [ "$IN_DIR" = '' ] ; then
IN_DIR="."
fi
for f in ${IN_DIR}/*.mp4; do echo "file '$f'" >> concat-list.txt; done
@fititnt
fititnt / README.md
Created December 23, 2018 11:46 — forked from mrbar42/README.md
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
@mrbar42
mrbar42 / README.md
Last active October 6, 2025 18:45
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
@nonwip
nonwip / ffmpeg.md
Last active November 26, 2025 12:38
Convert video files to MP4 through FFMPEG

This is my personal list of functions that I wrote for converting mov files to mp4!

Command Flags

Flag Options Description
-codec:a libfaac, libfdk_aac, libvorbis Audio Codec
-quality best, good, realtime Video Quality
-b:a 128k, 192k, 256k, 320k Audio Bitrate
-codec:v mpeg4, libx264, libvpx-vp9 Video Codec
@kekePower
kekePower / ffmpeg.inc
Last active August 9, 2020 19:04
build.leia extension to download, compile and install ffmpeg
# Extension to build and install FFmpeg
# See https://github.com/kekePower/build.leia
STANDALONE=true
FFMPEG_RELEASE=ffmpeg-3.4.2
SOURCE=http://ffmpeg.org/releases/${FFMPEG_RELEASE}.tar.bz2
FFMPEG=${KODIDIR}/depends
# Checking to see if either wget or curl is available.
if [[ -f $( which wget ) ]]; then
@nemoTyrant
nemoTyrant / gen.php
Created May 25, 2016 05:58
nginx secure link
<?php
$ts = '1463646983';
$hash = str_replace('=', '',strtr(base64_encode(md5('1463646983 secret', TRUE)), '+/', '-_')); // base64url
echo $hash;
?>
@bftanase
bftanase / secure_link.php
Last active July 20, 2025 16:26
generate URL for nginx secure_link
@mharsch
mharsch / gist:5188206
Last active March 13, 2025 04:28
serve HLS (HTTP Live Streaming) content from node.js

HLS streaming from node

Provided that you already have a file or stream segmenter generating your .m3u8 playlist and .ts segment files (such as the ffmpeg 'hls' muxer), this little node server will serve up those files to an HLS compatible client (e.g. Safari). If you're using node for your streaming app already, this obviates the need to serve the HLS stream from a separate web server.

loosely based on https://gist.github.com/bnerd/2011232

// loosely based on https://gist.github.com/bnerd/2011232
// requires node.js >= v0.10.0
// assumes that HLS segmenter filename base is 'out'
// and that the HLS playlist and .ts files are in the current directory