Giter Site home page Giter Site logo

node-gpac-dash's Introduction

Build Status Tests

Build Status Tests

Build Status Tests

Build Status Tests

Build Status Tests

Build Status Build Status

Coverage Coverage

License OpenHub

GPAC Introduction

Current version: 2.5-DEV

Latest Release: 2.4

GPAC is an open-source multimedia framework focused on modularity and standards compliance. GPAC provides tools to process, inspect, package, stream, playback and interact with media content. Such content can be any combination of audio, video, subtitles, metadata, scalable graphics, encrypted media, 2D/3D graphics and ECMAScript. GPAC is best-known for its wide MP4/ISOBMFF capabilities and is popular among video enthusiasts, academic researchers, standardization bodies, and professional broadcasters.

For more information, visit https://gpac.io

GPAC is distributed under the LGPL v2.1 or later, and is also available, for most of it, under a commercial license.

Please ! cite ! our work in your research:

Features

GPAC can process, analyse, package, stream, encode, decode and playback a wide variety of contents. Selected feature list:

  • Audio: MPEG audio (mp1/2/3, aac), AC3, E-AC3, Opus, FLAC, …
  • Video: MPEG 1 / 2 / 4 (H264/AVC) / H (HEVC), VVC, AV1, VP9, Theora, ...
  • Subtitles: WebVTT, TTML (full, EBU-TTD, …), 3GPP/Apple Timed Text, …
  • Encryption: CENC, PIFF, ISMA, OMA, ...
  • Containers: MP4/fMP4/CMAF/Quicktime MOV/ProRes MOV, AVI, MPG, OGG, MKV, ...
  • Streaming: MPEG-2 Transport Stream, RTP, RTSP, HTTP, Apple HLS, MPEG-DASH, ATSC 3.0 ROUTE, ...
  • Supported IOs: local files, pipes, UDP/TCP, HTTP(S), custom IO
  • Presentation formats: MPEG-4 BIFS, SVG Tiny 1.2, VRML/X3D
  • JS scripting through QuickJS for both SVG/BIFS/VRML and extending GPAC framework tools
  • 3D support (360 videos, WebGL JS filters…)
  • Inputs: microphone, camera, desktop grabbing
  • Highly configurable media processing pipeline
  • Python and NodeJS bindings

Features are encapsulated in processing modules called filters:

  • to get the full list of available features, you can run the command line gpac -h filters or check filters' wiki.
  • to get the full list of playback features, check the dedicated wiki page.

Tools

MP4Box

MP4Box is a multi-purpose MP4 file manipulation for the prompt, featuring media importing and extracting, file inspection, DASH segmentation, RTP hinting, ... See MP4Box -h, man MP4Box or our wiki.

gpac

GPAC includes a filter engine in charge of stream management and used by most applications in GPAC - read this post for more discussion on how this impacts MP4Box. The gpac application is a direct interface to the filter engine of GPAC, allowing any combination of filters not enabled by other applications. See gpac -h, man gpac, man gpac-filters or our wiki for more details.

Getting started

Download

Stable and nightly builds installers for Windows, Linux, OSX, Android, iOS are available on gpac.io.

If you want to compile GPAC yourself, please follow the instructions in the build section of our wiki.

Documentation

The general GPAC framework documentation is available on wiki.gpac.io, including HowTos.

GPAC tools are mostly wrappers around an underlying library called libgpac which can easily be embedded in your projects. The libgpac developer documentation is available at doxygen.gpac.io, including documentation of JS APIs, Python APIs and NodeJS APIs.

Testing

GPAC has a test suite exercising most features of the framework. The test suite is in a separate repository https://github.com/gpac/testsuite/, but is available as a submodule of the GPAC main repository. To initialize the testsuite submodule, do git submodule update --init.

For more details on the test suite, read this page and check the testsuite readme.

Per-commit build and tests results are available.

Support, ongoing tasks and bugs

Please use github for feature requests and bug reports. When filing a request there, please tag it as feature-request.

Contributing

A complex project like GPAC wouldn’t exist and persist without the support of its community. Please contribute: a nice message, supporting us in our communication, reporting issues when you see them… any gesture, even the smallest ones, counts.

If you want to contribute to GPAC, you can find ideas at GSoC page or look for a good first issue. In any doubt please feel free to contact us.

Team

GPAC is brought to you by an experienced team of developers with a wide track-record on media processing.

The project is mainly developed in the MultiMedia group of Telecom Paris with the help of many great contributors.

GPAC has a peculiar story: started as a startup in NYC, GPAC gained traction from research and a nascent multimedia community as it was open-sourced in 2003. Since then we have never stopped transforming GPAC into a useful and up-to-date project, with many industrial R&D collaborations and a community of tens of thousands of users. This makes GPAC one of the few open-source multimedia projects that gathers so much diversity.

Roadmap

Users are encouraged to use the latest tag or the master branch.

V2.X

Targets:

  • DASH event support
  • Web GUI
  • QUIC support
  • ROUTE file repair support
  • FLUTE support
  • Rust Bindings

node-gpac-dash's People

Contributors

cconcolato avatar jeanlf avatar peterkort 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-gpac-dash's Issues

Dash.js does not work with simple server setting

I have dash.mpd file ready in the root dict of the server. I can use MP4Client or GPAC -gui and IP address to access the video.

However, when I run the server and Dash.js. The server shows that something is trying to set up the connection but failed for some reason.
[03:06:03.747] Runnning ~/node-gpac-dash/gpac-dash.js using /usr/local/bin/node version v12.13.1 in ~/node-gpac-dash [03:06:03.752] Server running on port 8000 on all IP in normal mode [03:06:09.860] Request for file: 'tiled1M_dash.mpd' at UTC 1635386769859 [03:06:10.382] Request for file: 'tiled1M_dash.mpd' at UTC 1635386770381 [03:06:10.894] Request for file: 'tiled1M_dash.mpd' at UTC 1635386770894 [03:06:11.405] Request for file: 'tiled1M_dash.mpd' at UTC 1635386771405 [03:08:24.260] Request for file: 'tiled1M_dash.mpd' at UTC 1635386904260 [03:08:24.775] Request for file: 'tiled1M_dash.mpd' at UTC 1635386904775 [03:08:25.289] Request for file: 'tiled1M_dash.mpd' at UTC 1635386905289 [03:08:25.853] Request for file: 'tiled1M_dash.mpd' at UTC 1635386905852

The Dash.js is returning:
http://localhost:8000/tiled1M_dash.mpd is not available

My system: Ubuntu 21.04

My GPAC:
gpac - GPAC command line filter engine - version 1.1.0-DEV-rev1414-g602d94512-master (c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io

My npm: @8.1.1

My Dash.js reference client: 4.1.1

Does anyone have an idea about this? By the way, I try to set the HTTP server with GPAC HTTP command but it does not work eighter. So I think it might be the problem of some settings. My ufw is disabled. I check many possible settings. So I just ask here.

Error: write after end

➜  buildz git:(master) ✗ node /Users/Nicholas/mozilla/node-gpac-dash/gpac-dash.js -segment-marker eods -chunk-media-segments -cors
...
[15:54:21.887] File output/v1_43_gpac.m4s, sending mdat data from 0 to 2616143 in 355 ms (total_sent: 2616144) at utc 1445554461887
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: write after end
    at ServerResponse.OutgoingMessage.write (_http_outgoing.js:413:15)
    at sendAndUpdateBuffer (/Users/Nicholas/mozilla/node-gpac-dash/gpac-dash.js:92:11)
    at readFromBufferAndSendBoxes (/Users/Nicholas/mozilla/node-gpac-dash/gpac-dash.js:214:13)
    at sendFragmentedFile (/Users/Nicholas/mozilla/node-gpac-dash/gpac-dash.js:274:23)
    at Parameters.watchListener (/Users/Nicholas/mozilla/node-gpac-dash/gpac-dash.js:357:3)
    at FSWatcher.emit (events.js:110:17)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1159:12)

I'm trying to understand, it looks like on file change, we're assuming we have a response in flight?

Using web-server outside the localhost

hi guys.

I am a bit new to the whole node thing, and I cant seem to understand what is missing to enable this server to work outside the localhost.

if I do the *curl http://127.0.0.1:8000/output/dashcast.mpd * locally, it works fine.
trying the same from another machine on a local network, I get "Connection refused". on the playback machine I am obviously calling the IP of the node web server, not locahost.

any pointers would be appreciated.

Thanks

Low-latency DASH Server with live content not working with dash.js

When I try using the dash.js player together with this program, it gives me an error message and no video loads.

XMLHttpRequest cannot load http://ip:8000/output/v1_215_gpac.m4s. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://ip:1234' is therefore not allowed access. The response had HTTP status code 404.

It loads the manifest just fine (I added the Access-Control-Allow-Origin for it to work), but as soon as it starts fetching the segments, it gives me that error. Probably because it starts with the first one, which usually isn't there anymore.

This is the lowest latency solution I've found so far, but I need a way to stream it through a browser, since people won't usually have MP4client with them, or a command line.

Browser log:

R rules.
dash.all.js:3 Checking download ratio rule...
dash.all.js:3 No requests made for this stream yet, bailing.
dash.all.js:3 Checking insufficient buffer rule...
dash.all.js:3 Not enough information for rule.
dash.all.js:3 [M…r.r…s.SwitchRequest, M…r.r…s.SwitchRequest]
dash.all.js:3 New quality of 0
dash.all.js:3 video Playback quality: 0
dash.all.js:3 Populate video buffers.
dash.all.js:3 video Quality changed to: 0
dash.all.js:3 Marking a special seek for initial video playback.
dash.all.js:3 Getting the initialization request.
dash.all.js:3 Got an initialization.
dash.all.js:3 Loading video initialization: http://ipadress:8000/output/v1_init_gpac.mp4
dash.all.js:3 M…r.vo.SegmentRequest {action: "download", startTime: NaN, streamType: "video", type: "Initialization Segment", duration: NaN…}
dash.all.js:3 BufferController video setState to:LOADING
dash.all.js:3 segment loaded: (200, 0ms, 7ms, 7ms) http://ipadress:8000/output/v1_init_gpac.mp4
dash.all.js:3 video Bytes finished loading: http://ipadress:8000/output/v1_init_gpac.mp4
dash.all.js:3 Push (video) bytes: 784
dash.all.js:3 Got loadmetadata event.
dash.all.js:3 playback initialized!
dash.all.js:3 Attempting play...
dash.all.js:3 Do play.
dash.all.js:3 Got play event.
dash.all.js:3 Starting playback.
dash.all.js:3 Append video complete: 0
dash.all.js:3 BufferController video setState to:READY
dash.all.js:3 Working time is video time: 0
dash.all.js:3 BufferController.validate() video | state: READY
dash.all.js:3 video Playback rate: 0
dash.all.js:3 video Working time: 0
dash.all.js:3 video Video time: 0
dash.all.js:3 Current video buffer length: 0
dash.all.js:3 BufferController video setState to:VALIDATING
dash.all.js:3 ABR enabled? (true)
dash.all.js:3 Check ABR rules.
dash.all.js:3 Checking download ratio rule...
dash.all.js:3 Total time: 0.007s
dash.all.js:3 Download time: 0.007s
dash.all.js:3 The ratios are NaN, bailing.
dash.all.js:3 Checking insufficient buffer rule...
dash.all.js:3 Not enough information for rule.
dash.all.js:3 [M…r.r…s.SwitchRequest, M…r.r…s.SwitchRequest]
dash.all.js:3 New quality of 0
dash.all.js:3 video Playback quality: 0
dash.all.js:3 Populate video buffers.
dash.all.js:3 Quality didn't change.
dash.all.js:3 Loading the video fragment for time: 0
dash.all.js:3 Getting the request for time: 0
dash.all.js:3 Got segments.
dash.all.js:3 null
dash.all.js:3 No segments found, so we must be using a SegmentTemplate.
dash.all.js:3 Index for time 0 is 1
dash.all.js:3 Checking for stream end...
dash.all.js:3 Live never ends! (TODO)
dash.all.js:3 Stream finished? false
dash.all.js:3 Got a request.
dash.all.js:3 M…r.vo.SegmentRequest {action: "download", startTime: 1, streamType: "video", type: "Media Segment", duration: 1…}
dash.all.js:3 Loading an video fragment: http://ipadress:8000/output/v1_1_gpac.m4s
dash.all.js:3 BufferController video setState to:LOADING
dash.all.js:3 GET http://ipadress:8000/output/v1_1_gpac.m4s d @ dash.all.js:3e @ dash.all.js:3load @ dash.all.js:3X @ dash.all.js:3f @ dash.all.js:1k.promiseDispatch.j @ dash.all.js:1e.promiseDispatch @ dash.all.js:1(anonymous function) @ dash.all.js:1B.port1.onmessage @ dash.all.js:1
ipadress/:1 XMLHttpRequest cannot load http://ipadress:8000/output/v1_1_gpac.m4s. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://ipadress:1234' is therefore not allowed access. The response had HTTP status code 404.
2dash.all.js:3 segment loaded: (0, 7ms, 0ms, 7ms) http://ipadress:8000/output/v1_1_gpac.m4s
dash.all.js:3 BufferController video setState to:READY
dash.all.js:3 Working time is video time: 0
dash.all.js:3 BufferController.validate() video | state: READY
dash.all.js:3 video Playback rate: 0
dash.all.js:3 video Working time: 0
dash.all.js:3 video Video time: 0
dash.all.js:3 Current video buffer length: 0
dash.all.js:3 BufferController video setState to:VALIDATING
dash.all.js:3 ABR enabled? (true)
dash.all.js:3 Check ABR rules
....

Console log

[01:11:41.219] Server running on ipadress:8000 in low-latency mode
[01:11:55.588] Request for file: output/dashcast.mpd at UTC 1444623115587
[01:11:56.665] Request for file: output/v1_init_gpac.mp4 at UTC 1444623116665
[01:11:57.729] Request for non existing file: output/v1_1_gpac.m4s at UTC 1444623117729
[01:11:58.677] Request for non existing file: output/v1_2_gpac.m4s at UTC 1444623118677
[01:11:59.686] Request for non existing file: output/v1_3_gpac.m4s at UTC 1444623119686

...

Error on run

I try to run this application but I get this error

node gpac-dash.js
[18:08:30.218] Runnning /usr/local/nginx/html/dash/gpac-dash.js using /usr/bin/nodejs version v0.10.25 in /usr/local/nginx/html/dash
[18:08:30.224] Server running on 127.0.0.1:8000 in normal mode

events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at errnoException (net.js:901:11)
at Server._listen2 (net.js:1039:14)
at listen (net.js:1061:10)
at net.js:1143:9
at dns.js:72:18
at process._tickCallback (node.js:415:13)
at Function.Module.runMain (module.js:499:11)
at startup (node.js:119:16)
at node.js:902:3

Thanks for all

best regards

Use of eods box for signaling chunk boundaries

Hi,

While working in low latency feature for dash.js and researching why content generated with node-gpac-dash is not compatible with it, I have discovered a problem related with the use of eods boxes for signaling chunk boundaries. Neither in Chrome nor Firefox the use of eods as a top level box is allowed and so, parsing process fails and playback doesn't work.

@cconcolato, is there any specification/proposal that points to the use of eods boxes for signaling chunk boundaries? I didn't find it in CMAF spec so I guess it might be an arbitrary decision taken by gpac. Not a problem with this (the use of eods boxes), I am just working in a fix for Chromium codebase and would like to document it appropriately.

Thanks!

Question about the configuration to achieve the real low latency

I was also reading the paper "Overhead and performance of low latency live streaming using MPEG-DASH". In this paper, it mentioned that the latency it can achieve is around 240ms.

I have tested this repo with the given parameters on my laptop. It seems that the best latency is around 2s with the given parameters in your wiki.

Do you know how should I set the paras to achieve 240ms delay?

Thanks.

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.