A Node.js backend utilizing FFmpeg to process videos into HLS and Adaptive Bitrate Streaming formats. Includes APIs for video conversion, storage, and serving HLS playlists and segments, ensuring smooth and adaptive streaming based on network conditions.
- Git clone the project repository on your local system
git clone https://github.com/deepeshdm/HugOrShrug.git
- Install dependencies in package.json
cd HLS_transcoder
npm install
- Download FFMPEG software on your local machine & find path of installation
// MacOS
brew install ffmpeg
which ffmpeg
// LINUX
sudo apt update
sudo apt install ffmpeg
which ffmpeg
- Inside Index.js set the above found path to FFMPEG_PATH, also set HOST variable to where your backend will be hosted, this path is used in segment playlists.
const HOST = 'http://localhost'
const PORT = 3000;
const FFMPEG_PATH = '/opt/homebrew/bin/ffmpeg'; // Locally installed ffmpeg application path
- Run the backend server
node index.js
- Setup Frontend (OPTIONAL) - https://github.com/deepeshdm/StreamPlus.git