Skip to content

ffmpeg-streamer is a packaged nodejs express server that wraps ffmpeg to allow easy streaming of video feeds directly to modern browsers for testing purposes. It currently includes 6 different types of output streaming which are mjpeg, jpeg via socket.io, progressive mp4, native hls, hls.js, and mse via socket.io. Video input types supported are…

License

Notifications You must be signed in to change notification settings

kevinGodell/ffmpeg-streamer

Repository files navigation

ffmpeg-streamer

ffmpeg-streamer is a packaged nodejs express server that wraps ffmpeg to allow easy streaming of video feeds directly to modern browsers for testing purposes. It currently includes 6 different types of output streaming which are mjpeg, jpeg via socket.io, progressive mp4, native hls, hls.js, and mse via socket.io. Video input types supported are rtsp, mp4, mjpeg, and hls.

Installation

ffmpeg-streamer has been packaged into an executable using pkg. The current binaries can be found on the releases page.

  • For desktop installation, simply download and extract.
  • For command line installation, see the following steps.
Downloading zipped archive

linux

wget https://github.com/kevinGodell/ffmpeg-streamer/releases/download/v0.1.0/ffmpeg-streamer-linux-x64.tar.gz

mac

curl -L -O https://github.com/kevinGodell/ffmpeg-streamer/releases/download/v0.1.0/ffmpeg-streamer-macos-x64.zip
Extracting zipped archive

linux

tar -xvf ffmpeg-streamer-linux-x64.tar.gz

mac

unzip ffmpeg-streamer-macos-x64.zip

Usage

  • For desktop usage, double click the executable to run it.
  • For command line usage, the following shows 2 options.
Start the app from the command line

linux

./ffmpeg-streamer-linux-x64

mac

./ffmpeg-streamer-macos-x64
Or start the app from the command line via pm2

linux

pm2 start ffmpeg-streamer-linux-x64

mac

pm2 start ffmpeg-streamer-macos-x64

After launching, you can use it via the web interface on port 8181. For example, if your are running it on your current machine, visit it in a modern browser via http://localhost:8181. If port 8181 was already in use, it will keep incrementing the port number by 1 until it finds one available. You can launch multiple copies of the app up to a total of 10, each listening on its own port. If you would like to store your last used settings, go to http://localhost:8181/activity and click the "create" button to use the activity log.

Dependencies

Ffmpeg is the only external software required to run the app. Nodejs is packaged inside the binary and is not needed to be installed separately on your system. When launching the app, it tries to find ffmpeg on your system using ffbinaries. If it cannot find ffmpeg, you will be prompted to install it to the current running directory via the web interface on port 8181. If it does find ffmpeg, but you would like to install a newer version, you can visit http://localhost:8181/install and force the installation.

Development

Clone the repo and move into the newly created directory
git clone https://github.com/kevinGodell/ffmpeg-streamer.git && cd ffmpeg-streamer
Install the module dependencies
npm install
Start the app in development mode
npm run dev
Build the binaries
npm run dist:pkg

Feature requests and problems

If you have an idea for a new feature or have a problem, please do not hesitate to open an issue. For problems, please include information about what operating system the app is running on and which operating system and browser you are using to view it. Any additional details would be helpful.

Screenshots

screenshot1 screenshot2

TODO

  • Add support for more input types such as local video hardware and artificially generated input
  • Add more ffmpeg settings to further customize the generated video for streaming
  • Improve playback of hls.js
  • Improve playback of mse via socket.io

JavaScript Style Guide

About

ffmpeg-streamer is a packaged nodejs express server that wraps ffmpeg to allow easy streaming of video feeds directly to modern browsers for testing purposes. It currently includes 6 different types of output streaming which are mjpeg, jpeg via socket.io, progressive mp4, native hls, hls.js, and mse via socket.io. Video input types supported are…

Resources

License

Stars

Watchers

Forks

Packages

No packages published