Git Product home page Git Product logo

kevingodell / ffmpeg-streamer Goto Github PK

View Code? Open in Web Editor NEW
82.0 82.0 25.0 151.87 MB

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.

License: MIT License

JavaScript 71.43% HTML 28.57%

ffmpeg-streamer's Introduction

Hi there 👋

Buy me a coffee

Donate via PayPal

Sponsored by moe @ shinobi cctv

ffmpeg-streamer's People

Contributors

kevingodell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ffmpeg-streamer's Issues

native hls not supported

Hello,

On default settings after launching ffmpeg-streamer everything works fine except native hls src. I see such message: native hls not supported. Any idea why? OS: MacOS BigSur. I'm using Unix Executable File.

Problem with HLS

I have been spending a couple days looking at the project and even more time looking at:
https://github.com/kevinGodell/mse-live-player

And I noticed something.. When I try to play the HLS streams, the player I was trying seems to have problems while loading the first videos. After some time, it seems like it starts doing fine.

Here is some information:

  1. The parameters I am using for ffmpeg (listed below). The source is an mjpeg camera.
  2. The first request of the player to get the playlist works just fine and this is how the returned playlist looks:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-MAP:URI="init-room.mp4"
#EXTINF:9.820000,
room1.m4s
#EXTINF:9.903000,
room2.m4s
#EXTINF:10.010000,
room3.m4s
  1. The player plays the first 10 seconds just fine (I am guessing this is the init-id.mp4), but then most of the times it has problems continuing the stream for some time and then it continues.
    What's weird is that you can see the requests for the video being made and downloaded, but the players have problems playing them.

  2. The player I was trying is hls-js. If you just put any hls stream from ffmpeg-streamer from a camera on their demo you should be able to recreate.

Here are some screenshots that hopefully can show what I mean:

Here you can see how the player has some video buffered, but refuses to play it, and it keeps making requests to get the playlist
image

I did noticed something:
The player throws a media error that says:
details: "bufferSeekOverHole", fatal: false, reason: "fragment loaded with buffer holes, seeking from 75.987958 to 77.932291", frag: t}

I did try this in other players, one of them VHS (videojs-http-streaming) did not work at all, the one that comes with your project, and it seems to experience the same problem (but has a bit more luck recoverying) and VLC which is the only one that can play the stream without problems.

Do you think I may have some problems with the way I am running ffmpeg? I have not been able to figure out what the problem is.

 {
      "id": "room1",
      "name": "room1",
      "logLevel": "quiet",
      "params": [
          "-hwaccel",
          "auto",
          "-analyzeduration",
          "10000000",
          "-probesize",
          "1048576",
          "-re",
          "-use_wallclock_as_timestamps",
          "1",
          "-f",
          "mjpeg",
          "-i",
          "http://192.168.0.15/axis-cgi/mjpg/video.cgi?camera=1&resolution=352x240&1569462930455",
          "-an",
          "-c:v",
          "libx264",
          "-tune",
          "zerolatency",
          "-r",
          "15",
          "-vf",
          "scale=trunc(iw*0.9/2)*2:-2",
          "-min_frag_duration",
          "10000000",
          "-frag_duration",
          "10000000",
          "-crf",
          "15",
          "-preset",
          "veryfast",
          "-profile:v",
          "baseline",
          "-level:v",
          "3.1",
          "-pix_fmt",
          "yuv420p",
          "-f",
          "mp4",
          "-movflags",
          "+dash+negative_cts_offsets",
          "pipe:1",
          "-c",
          "mjpeg",
          "-q",
          "10",
          "-r",
          "7",
          "-vf",
          "scale=trunc(iw*0.75/2)*2:-2",
          "-f",
          "image2pipe",
          "pipe:4"
      ],
      "hlsBase": "room1",
      "hlsListSize": 10
  }

Decklink Input Support

Hi

Hope you are doing well.

Would it be possible to add decklink sdi input.

Regards,

Fahad

Chunked-encoding streaming output

Hi @kevinGodell,

Great project! I've been playing with it for the last few days and enjoying it very much :-)

I've been trying to use your project to create a CMAF-compatible fMP4 output.

For this to work the server would have to stream the last-not-yet-finished response using chunked-encoding (since there's no correct content-length yet). Is it possible?

On the ffmpeg-side, it's possible to instruct it to output such streams using the dash muxer with the streaming=1 , hls_playlist...and just for fun (since you're using hls.js as the HLS player)...the lhls option could be used to instruct the player to enable the low latency options.

Would this be possible?

it takes a long time for video play

i trying to use version 0.0.7 with ffmpeg v. 3.4 in windows.
while i run this app with type RTSP, it takes a long time for the video to play
have i miss something or what i should to do in settings before i run this app?

default files and settings -- nothing happens (black screen)

I tried to use the default and I don't see anything happening other than 503. Am I doing something wrong?

ffmpeg-streamer ver: 0.0.12
ffmpeg ver: 2.8.15-0ubuntu0.16.04.1

-loglevel info -progress pipe:3 -hwaccel auto -analyzeduration 10000000 -probesize 1048576 -re -f hls -i http://commondatastorage.googleapis.com/gtv-videos-bucket/CastVideos/hls/TearsOfSteel.m3u8 -c:a aac -c:v copy -f mp4 -movflags +dash+negative_cts_offsets pipe:1 -c mjpeg -q 10 -r 7 -vf scale=trunc(iw*0.75/2)*2:-2 -f image2pipe pipe:4

anand@ubulap2:~/ffmpeg-streamer$ npm run dev

[email protected] dev /home/anand/ffmpeg-streamer
node --trace-warnings app 3000 development

Listening on port 3000.
GET / 200 14.306 ms - 42836
GET /mdi/material-icons.css 304 5.415 ms - -
GET /mdl/material.deep_orange-blue.min.css 304 2.626 ms - -
GET /mdl/material.min.js 304 2.352 ms - -
GET /images/forkme_right_orange_ff7600.png 304 7.879 ms - -
GET /javascripts/index.js 304 0.626 ms - -
GET /mdi/MaterialIcons-Regular.woff2 304 0.916 ms - -
POST / 200 25.244 ms - 5681
GET /mdi/material-icons.css 304 1.594 ms - -
GET /mdl/material.deep_orange-blue.min.css 304 0.441 ms - -
GET /assets/hls.min.js 304 3.784 ms - -
GET /mdl/material.min.js 304 1.307 ms - -
GET /javascripts/player.js 304 1.769 ms - -
GET /javascripts/video.js 304 1.799 ms - -
GET /hls/test.m3u8 503 1.082 ms - 14
GET /mdi/MaterialIcons-Regular.woff2 304 1.696 ms - -
GET /mp4/test.mp4?t=1:28:23_PM 503 0.460 ms - 13
GET /hls/test.m3u8 503 0.395 ms - 14
GET /mp4/test.mp4?t=1:28:24_PM 503 0.266 ms - 13
GET /mp4/test.mp4?t=1:28:24_PM 503 0.274 ms - 13
GET /hls/test.m3u8 503 0.289 ms - 14
GET /mp4/test.mp4?t=1:28:25_PM 503 0.491 ms - 13
GET /mp4/test.mp4?t=1:28:25_PM 503 0.296 ms - 13
GET /mp4/test.mp4?t=1:28:26_PM 503 0.679 ms - 13
GET /mp4/test.mp4?t=1:28:26_PM 503 0.382 ms - 13
GET /hls/test.m3u8 503 0.345 ms - 14
GET /mp4/test.mp4?t=1:28:27_PM 503 0.627 ms - 13
GET /mp4/test.mp4?t=1:28:28_PM 503 0.267 ms - 13
GET /mp4/test.mp4?t=1:28:28_PM 503 0.237 ms - 13
GET /mp4/test.mp4?t=1:28:29_PM 503 0.240 ms - 13
GET /mp4/test.mp4?t=1:28:29_PM 503 0.234 ms - 13
GET /mp4/test.mp4?t=1:28:30_PM 503 0.541 ms - 13
GET /mp4/test.mp4?t=1:28:30_PM 503 0.240 ms - 13
GET /hls/test.m3u8 503 0.291 ms - 14

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

How can I use this program to process multiple requests

Hello , this is a great project , and now i am trying to use it .but now i have a different issue.
How can I use this program to process multiple requests?

for example:
Now I have more than one rtsp request, how can i handle these requests?

Why 10 instances limit

First of all, what a great project man, thanks for sharing it. I have been trying to do this my self for a while but yours is way more advanced already.

I was wondering why in the docs you mention the app can be run, up to a total of 10 times?
Why would you be able to run it more than 10 times, if your hardware can handle it?
(I have not tested to run it more than 10 times yet, but I was just curious about it)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.