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 outputs only 1 stream which is mjpeg,
Video input types is the screen capture and the third argument can be set for selecting the screen ID
run ffmpeg -f avfoundation -list_devices true -i ""
to find out the list of devices
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.
linux
wget https://github.com/kevinGodell/ffmpeg-streamer/releases/download/v0.0.12/ffmpeg-streamer-linux-x64.tar.gz
mac
curl -L -O https://github.com/kevinGodell/ffmpeg-streamer/releases/download/v0.0.12/ffmpeg-streamer-macos-x64.zip
linux
tar -xvf ffmpeg-streamer-linux-x64.tar.gz
mac
unzip ffmpeg-streamer-macos-x64.zip
- For desktop usage, double click the executable to run it.
- For command line usage, the following shows 2 options.
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.
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.
git clone https://github.com/kevinGodell/ffmpeg-streamer.git && cd ffmpeg-streamer
npm install
npm run dev
npm run dist:pkg
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