Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLS (HTTP Live Streaming) and DASH support #166

Open
wants to merge 43 commits into
base: master
Choose a base branch
from

Conversation

davedoesdev
Copy link

@davedoesdev davedoesdev commented Oct 5, 2021

Add support for streaming (POST) via HLS and DASH.
Uses asyncify and wasm.

Also updates FFmpeg to n4.4

@davedoesdev
Copy link
Author

Docker image for buliding is available as davedoesdev/ffmpeg.js

@davedoesdev davedoesdev changed the title HLS (HTTP Live Streaming) support HLS (HTTP Live Streaming) and DASH support Oct 17, 2021
This was referenced Nov 7, 2021
@davedoesdev
Copy link
Author

davedoesdev commented Nov 10, 2021 via email

@davedoesdev
Copy link
Author

davedoesdev commented Nov 10, 2021 via email

@Banou26
Copy link

Banou26 commented Nov 10, 2021

@davedoesdev Yeah i was just asking if there was a way to not POST the result buffers, but i just looked at the files you have and quickly found https://github.com/Kagami/ffmpeg.js/pull/166/files#diff-422ddc10e000c1fc59beea711ad0f2643abd420405c383c377b11227c0e58776 which i can modify to get back the array buffers without POSTing anything, so i deleted the message
BTW thanks for this, pretty hyped to see what we can do with it

@davedoesdev
Copy link
Author

@Banou26 yes that's the file that needs modifying. If I get time I'll see about adding an option to do this.

@davedoesdev
Copy link
Author

@Banou26 see davedoesdev#2

Upper layer can always terminate worker if it needs
to exit without waiting
Also update other submodules that have newer versions available
@Banou26
Copy link

Banou26 commented Jul 24, 2022

Is this fork able to use async/await for input IO, would i be able to make similar changes in libav to get async/await working ? I've tried to use avformat demuxer/muxer with asyncify but it resulted in errors like

Uncaught (in promise) RuntimeError: null function or function signature mismatch
    at 00aa48d6:0x1051e8
    at 00aa48d6:0xb58ba
    at 00aa48d6:0xb6e58
    at 00aa48d6:0x1bda07
    at 00aa48d6:0x1be4a8
    at 00aa48d6:0x1a14c8
    at ret.<computed> (libav.js:9:3812847)
    at dynCallLegacy (libav.js:9:3807081)
    at dynCall (libav.js:9:3807167)
    at libav.js:9:3807319

When used in coordination with stuff like avio_alloc_context, which allows for custom input/output functions(more detailed example here emscripten-core/emscripten#16686)

If i had async/await working for pulling data that'd make my life and code way easier

Basically any async/await in the main program(my own c++ code calling libav) loop worked fine, but if it was called from a libav callback(libav calling back my functions), async/await completly broke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants