3 ms·
Big big question here: how can you pipe inputs to it? In a browser version. Say you want to transcode video right in the browser after capturing it with MediaRe
by anovikov 5y ago
Big big question here: how can you pipe inputs to it? In a browser version. Say you want to transcode video right in the browser after capturing it with MediaRecorder and producing say, HLS chunks. Getting output is easy, but how to pipe input chunks there? All examples for browser JS i could see only deal with the ready files on input :/
- mercora 5y agoit uses the [0]File System API of emscripten. i think it is possible to pipe via stdin somehow but i have no experience with any of this stuff but am interested to do something similar myself. although i don't want to transcode but repackage input streams for browser consumption. I also found [1]this which implements various filesystem backends in a compatible way afaict although the XHR backend [2]requires some index file i would like to avoid and its also not clear to me if this will actually stream data and/or use range requests. [0] https://emscripten.org/docs/api_reference/Filesystem-API.html https://emscripten.org/docs/api_reference/Filesystem-API.htm... [1] https://github.com/jvilk/BrowserFS https://github.com/jvilk/BrowserFS [2] https://github.com/jvilk/BrowserFS/blob/a96aa2d417995dac7d376987839bc4e95e218e06/src/backend/HTTPRequest.ts#L58 https://github.com/jvilk/BrowserFS/blob/a96aa2d417995dac7d37...
- tyingq 5y agoThere's an example of that here: https://blog.scottlogic.com/2020/11/23/ffmpeg-webassembly.html https://blog.scottlogic.com/2020/11/23/ffmpeg-webassembly.ht... <ctrl-f>Creating a Streaming Transcoder