This file contains hidden or 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
# Command for streaming USB Webcam to RTMP sink without audio | |
/usr/bin/ffmpeg -y -f v4l2 -video_size 640x480 -framerate 25 -i /dev/video0 -vcodec h264_omx -f flv rtmp://localhost/show/stream | |
# Command for streaming USB Webcam to RTMP sink with audio | |
/usr/bin/ffmpeg -y -f v4l2 -video_size 640x480 -framerate 25 -i /dev/video0 -vcodec h264_omx -c:a aac -b:a 160k -ar 44100 -f flv rtmp://localhost/show/stream |
This file contains hidden or 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 | |
git clone https://github.com/sergey-dryabzhinsky/nginx-rtmp-module.git | |
sudo apt-get -y install build-essential libpcre3 libpcre3-dev libssl-dev | |
wget http://nginx.org/download/nginx-1.18.0.tar.gz | |
tar -xf nginx-1.18.0.tar.gz | |
cd nginx-1.18.0 | |
./configure --with-http_ssl_module --add-module=../nginx-rtmp-module | |
make -j 1 | |
sudo make install |
This file contains hidden or 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
worker_processes auto; | |
events { | |
worker_connections 1024; | |
} | |
# RTMP configuration | |
rtmp { | |
server { | |
listen 1935; | |
chunk_size 4000; |
This file contains hidden or 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
worker_processes auto; | |
events { | |
worker_connections 1024; | |
} | |
# RTMP configuration | |
rtmp { | |
server { | |
listen 1935; | |
chunk_size 4000; |
This file contains hidden or 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
worker_processes auto; | |
events { | |
worker_connections 1024; | |
} | |
# RTMP configuration | |
rtmp { | |
server { | |
listen 1935; | |
chunk_size 4000; |
This file contains hidden or 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 | |
echo "Compiling FFMPEG.........." | |
echo "" | |
sudo apt-get -y install autoconf automake build-essential cmake doxygen git graphviz imagemagick libasound2-dev libass-dev libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libfreetype6-dev libgmp-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libopus-dev librtmp-dev libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev libsnappy-dev libsoxr-dev libssh-dev libssl-dev libtool libv4l-dev libva-dev libvdpau-dev libvo-amrwbenc-dev libvorbis-dev libwebp-dev libx264-dev libx265-dev libxcb-shape0-dev libxcb-shm0-dev libxcb-xfixes0-dev libxcb1-dev libxml2-dev lzma-dev meson nasm pkg-config python3-dev python3-pip texinfo wget yasm zlib1g-dev libgmp3-dev libgmp-dev libdrm-dev | |
cd /home/pi/ | |
if [ ! -d ffmpeg/ffmpeg-libraries ] | |
then | |
mkdir -p ~/ffmpeg/ffmpeg-libraries |
This file contains hidden or 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 | |
#Creates swap partition on boards with lesser than 3.5GB Memory/RAM | |
echo "" | |
echo "Checking memory size.........." | |
Totalmem=$(cat /proc/meminfo|grep MemTotal|grep -o '[0-9]*') | |
if (($Totalmem > 3500000)); then | |
echo "" | |
echo "You have got enough memory. No need for a swap partition.........." |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import socket | |
import sys | |
import RPi.GPIO as GPIO | |
import _thread | |
import datetime | |
import random | |
import requests | |
import os |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<playlist xmlns="http://xspf.org/ns/0/" xmlns:vlc="http://www.videolan.org/vlc/playlist/ns/0/" version="1"> | |
<title>Playlist</title> | |
<trackList> | |
<track> | |
<location>file://192.168.1.4/shivasiddharth/20180905/SIDDHY%20GENERAL/Movies/2%20States%20(2014).mp4</location> | |
<extension application="http://www.videolan.org/vlc/playlist/0"> | |
<vlc:id>0</vlc:id> | |
<vlc:option>file-caching=1000</vlc:option> | |
<vlc:option>stop-time=1800.000</vlc:option> |
This file contains hidden or 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 | |
sudo apt-get update | |
sudo apt-get install nginx | |
sudo apt-get install libnginx-mod-rtmp | |
cat << EOF >> /etc/nginx/nginx.conf | |
rtmp { | |
server { | |
listen 1935; | |
chunk_size 4096; |