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.
- For desktop installation, simply download and extract.
- For command line installation, see the following steps.
Downloading zipped archive
curl -L -O https://github.com/kevinGodell/ffmpeg-streamer/releases/download/v0.1.0/ffmpeg-streamer-macos-x64.zip
Extracting zipped archive
tar -xvf ffmpeg-streamer-linux-x64.tar.gz
- 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
pm2 start ffmpeg-streamer-linux-x64
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.
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.
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
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.
- 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