Skip to content

Instantly share code, notes, and snippets.

@Domin8-IPTV
Domin8-IPTV / nginx_vod.sh
Created September 24, 2019 02:09
ON DEMAND USING NGINX + FFMPEG
#!/bin/bash
###############################
# Here You can Edit Your Data #
###############################
LOG_LOCATION=/tmp
##########################################
##############END EDIT DATA###############
##########################################
txtrst=$(tput sgr0) # Text reset
txtred=$(tput setab 1) # Red Background
@Domin8-IPTV
Domin8-IPTV / nginx_rtmp.sh
Created September 24, 2019 01:52
nginx rtmp install
Bash:
#!/bin/bash
# chmod +x nginx_rtmp.sh && ./nginx_rtmp.sh
echo "Installing NGINX+RTMP+MPEGTS"
apt-get update -qq
apt-get -y install libpcre3 libpcre3-dev libssl-dev php-fpm
# make folders
@Domin8-IPTV
Domin8-IPTV / xtream-api.php
Created September 23, 2019 23:15
xtream-api
<?php
set_time_limit(0);
define("MAIN_DIR", "/home/xtreamcodes/");
define("IPTV_PANEL_DIR", MAIN_DIR . "iptv_xtream_codes/");
define("STREAMS_PATH", IPTV_PANEL_DIR . "streams/");
define("TIMEOUT", 60); // TIMEOUT BEFORE CANCELLING
define("AUTH", "98671942"); // API AUTHENTICATION
<?php
/**
* M4UNDY
* Add and Edit DNS records using cloudflare API
*/
class CloudflareDNSAPI{
protected $ZoneID;
public function __construct($ZoneID) {
$this->zone_id = $ZoneID;
$this->url = 'https://api.cloudflare.com/client/v4/';
#!/bin/bash
sudo apt-add-repository -y ppa:kirillshkrogalev/ffmpeg-next && sudo apt-add-repository -y ppa:obsproject/obs-studio
sudo apt-get update
sudo apt-get install ffmpeg obs-studio
@Domin8-IPTV
Domin8-IPTV / avi2mp4.php
Created July 5, 2019 13:09
convert avi to mp4 using ffmpeg
#!/usr/bin/env php
<?php
declare(strict_types = 1);
if ($argc !== 2) {
fprintf ( STDERR, "usage: %s dir\n", $argv [0] );
die ( 1 );
}
$dir = rtrim ( $argv [1], DIRECTORY_SEPARATOR );
if (! is_readable ( $dir )) {
fprintf ( STDERR, "supplied path is not readable! (try running as an administrator?)" );
@Domin8-IPTV
Domin8-IPTV / web-fm.php
Created June 24, 2019 01:10
browser based file manager sign in username and password with MD5 encryption
<?php
/**
* File Manager Script
*/
// Default language ('en' and other from 'filemanager-l10n.php')
$lang = 'en';
// Auth with login/password (set true/false to enable/disable it)
$use_auth = true;
@Domin8-IPTV
Domin8-IPTV / lamp.sh
Created June 20, 2019 00:32
ubuntu lamp install
#!/bin/bash
#Instructions to use this script
#
#chmod +x lamp.sh
#
#sudo ./lamp.sh
echo "###################################################################################"
@Domin8-IPTV
Domin8-IPTV / vod2hls.sh
Created June 17, 2019 20:34
create hls live stream from files
#!/bin/bash
# Change this to path of file to stream /edit/to/vod/path.mp4
mediaFile="/edit/to/vod/path.mp4"
### 480x video400kbps audio40kbps ###
mediaStreams="-map 0"
audCodec="-acodec mp2"
audKbps="-b:a 40k"
@Domin8-IPTV
Domin8-IPTV / ffmpeg2mp4.php
Created May 23, 2019 17:14
use ffmpeg to convert all media files in directory to mp4
<?php
/**
* cd into folder with video files and run:
* php /path/to/ffmpeg2mp4.php mp4
*/
class Transcoder{
protected static $ffmpeg='ffmpeg';