GithubHelp home page GithubHelp logo

ilian / mkv-web Goto Github PK

View Code? Open in Web Editor NEW
46.0 3.0 4.0 10.02 MB

Play MKV files right in your web browser

License: GNU General Public License v3.0

HTML 3.21% Nix 1.34% TypeScript 89.60% JavaScript 5.85%
webassembly ffmpeg mediasource web-workers

mkv-web's People

Contributors

ilian 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

Watchers

 avatar  avatar  avatar

mkv-web's Issues

Change input MKV file without reload

Playing a different MKV file requires the user to reload the browser to spawn a new worker. We can add a method to the worker to unmount the old file and mount the new file.

Handle unsupported codecs

Some MPEG-4 profiles are not supported on every platform, such as h264 (High 10) on Firefox for Windows 11.
We could prompt the user to install the required codec or use a different browser.
Alternatively, we could transcode the media file with ffmpeg but this likely leads to a degraded user-experience since transcoding is highly cpu-intensive, especially on lower-end devices.

How do I use this project?

I wanted to try this project out but I cannot find any instructions for how to actually use it. One of the bug reports mentioned something about compiling, but it is not obvious how to do that.

Thanks

Getting error when running npm start

PS D:\projects\MKV web> npm start  

> [email protected] start
> webpack-dev-server 

<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:9000/
<i> [webpack-dev-server] Content not from webpack is served from 'D:\projects\MKV web\public' directory
node:internal/crypto/hash:68
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:68:19)
    at Object.createHash (node:crypto:138:10)
    at BulkUpdateDecorator.hashFactory (D:\projects\MKV web\node_modules\webpack\lib\util\createHash.js:155:18)
    at BulkUpdateDecorator.update (D:\projects\MKV web\node_modules\webpack\lib\util\createHash.js:46:50)
    at OriginalSource.updateHash (D:\projects\MKV web\node_modules\webpack-sources\lib\OriginalSource.js:131:8)
    at NormalModule._initBuildHash (D:\projects\MKV web\node_modules\webpack\lib\NormalModule.js:888:17)
    at handleParseResult (D:\projects\MKV web\node_modules\webpack\lib\NormalModule.js:954:10)
    at D:\projects\MKV web\node_modules\webpack\lib\NormalModule.js:1048:4
    at processResult (D:\projects\MKV web\node_modules\webpack\lib\NormalModule.js:763:11)
    at D:\projects\MKV web\node_modules\webpack\lib\NormalModule.js:827:5 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

then i solved it by setting environment variable like this

$env:NODE_OPTIONS="--openssl-legacy-provider"

then i use

npm start

i get

> [email protected] start
> webpack-dev-server

<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:9000/
<i> [webpack-dev-server] Content not from webpack is served from 'D:\projects\MKV web\public' directory
assets by status 294 KiB [cached] 3 assets
orphan modules 247 KiB [orphan] 224 modules
runtime modules 5.41 KiB 21 modules
cacheable modules 30.3 MiB
  modules by path ./node_modules/ 365 KiB 38 modules
  modules by path ./src/ 29.9 MiB
    modules by path ./src/worker/ffmpeg-core/ 29.9 MiB
      ./src/worker/ffmpeg-core/ffmpeg-core.js 85.7 KiB [built] [code generated]
      ./src/worker/ffmpeg-core/ffmpeg-core.wasm 29.8 MiB [built] [code generated] [1 error]
    ./src/index.ts + 3 modules 26.9 KiB [built] [code generated]
    ./src/worker/chunked-remuxer-worker.ts + 1 modules 17.6 KiB [built] [code generated]

WARNING in ./node_modules/ws/lib/buffer-util.js 103:21-42
Module not found: Error: Can't resolve 'bufferutil' in 'D:\projects\MKV web\node_modules\ws\lib'
 @ ./node_modules/ws/lib/websocket.js 31:21-45
 @ ./node_modules/ws/index.js 3:18-44
 @ ./src/worker/ffmpeg-core/ffmpeg-core.js 107:292-305 113:33-53
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

WARNING in ./node_modules/ws/lib/validation.js 109:22-47
Module not found: Error: Can't resolve 'utf-8-validate' in 'D:\projects\MKV web\node_modules\ws\lib'
 @ ./node_modules/ws/lib/sender.js 11:30-53
 @ ./node_modules/ws/index.js 8:19-42
 @ ./src/worker/ffmpeg-core/ffmpeg-core.js 107:292-305 113:33-53
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

WARNING in ./src/worker/ffmpeg-core/ffmpeg-core.js 13:61-86
Module not found: Error: Can't resolve 'worker_threads' in 'D:\projects\MKV web\src\worker\ffmpeg-core'
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

WARNING in ./src/worker/ffmpeg-core/ffmpeg-core.js 45:183-200
Module not found: Error: Can't resolve 'crypto' in 'D:\projects\MKV web\src\worker\ffmpeg-core'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
        - install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "crypto": false }
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value.
Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/

4 warnings have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

ERROR in ./node_modules/ws/lib/permessage-deflate.js 3:13-28
Module not found: Error: Can't resolve 'zlib' in 'D:\projects\MKV web\node_modules\ws\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "zlib": require.resolve("browserify-zlib") }'
        - install 'browserify-zlib'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "zlib": false }
 @ ./node_modules/ws/lib/websocket.js 14:26-57
 @ ./node_modules/ws/index.js 3:18-44
 @ ./src/worker/ffmpeg-core/ffmpeg-core.js 107:292-305 113:33-53
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

ERROR in ./node_modules/ws/lib/receiver.js 3:21-38
Module not found: Error: Can't resolve 'stream' in 'D:\projects\MKV web\node_modules\ws\lib'
Did you mean './stream'?
Requests that should resolve in the current directory need to start with './'.
Requests that start with a name are treated as module requests and resolve within module directories (node_modules).
If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
        - install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "stream": false }
 @ ./node_modules/ws/index.js 7:21-46
 @ ./src/worker/ffmpeg-core/ffmpeg-core.js 107:292-305 113:33-53
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

ERROR in ./node_modules/ws/lib/sender.js 5:12-26
Module not found: Error: Can't resolve 'net' in 'D:\projects\MKV web\node_modules\ws\lib'
 @ ./node_modules/ws/index.js 8:19-42
 @ ./src/worker/ffmpeg-core/ffmpeg-core.js 107:292-305 113:33-53
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

ERROR in ./node_modules/ws/lib/sender.js 6:12-26
Module not found: Error: Can't resolve 'tls' in 'D:\projects\MKV web\node_modules\ws\lib'
 @ ./node_modules/ws/index.js 8:19-42
 @ ./src/worker/ffmpeg-core/ffmpeg-core.js 107:292-305 113:33-53
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

ERROR in ./node_modules/ws/lib/sender.js 7:27-44
Module not found: Error: Can't resolve 'crypto' in 'D:\projects\MKV web\node_modules\ws\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
        - install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "crypto": false }
 @ ./node_modules/ws/index.js 8:19-42
 @ ./src/worker/ffmpeg-core/ffmpeg-core.js 107:292-305 113:33-53
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

ERROR in ./node_modules/ws/lib/stream.js 3:19-36
Module not found: Error: Can't resolve 'stream' in 'D:\projects\MKV web\node_modules\ws\lib'
Did you mean './stream'?
Requests that should resolve in the current directory need to start with './'.
Requests that start with a name are treated as module requests and resolve within module directories (node_modules).
If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
        - install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "stream": false }
 @ ./node_modules/ws/index.js 5:34-57
 @ ./src/worker/ffmpeg-core/ffmpeg-core.js 107:292-305 113:33-53
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

ERROR in ./node_modules/ws/lib/websocket-server.js 6:13-28
Module not found: Error: Can't resolve 'http' in 'D:\projects\MKV web\node_modules\ws\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
        - install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "http": false }
 @ ./node_modules/ws/index.js 6:19-52
 @ ./src/worker/ffmpeg-core/ffmpeg-core.js 107:292-305 113:33-53
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

ERROR in ./node_modules/ws/lib/websocket-server.js 7:14-30
Module not found: Error: Can't resolve 'https' in 'D:\projects\MKV web\node_modules\ws\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "https": require.resolve("https-browserify") }'
        - install 'https-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "https": false }
 @ ./node_modules/ws/index.js 6:19-52
 @ ./src/worker/ffmpeg-core/ffmpeg-core.js 107:292-305 113:33-53
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

ERROR in ./node_modules/ws/lib/websocket-server.js 8:12-26
Module not found: Error: Can't resolve 'net' in 'D:\projects\MKV web\node_modules\ws\lib'
 @ ./node_modules/ws/index.js 6:19-52
 @ ./src/worker/ffmpeg-core/ffmpeg-core.js 107:292-305 113:33-53
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

ERROR in ./node_modules/ws/lib/websocket-server.js 9:12-26
Module not found: Error: Can't resolve 'tls' in 'D:\projects\MKV web\node_modules\ws\lib'
 @ ./node_modules/ws/index.js 6:19-52
 @ ./src/worker/ffmpeg-core/ffmpeg-core.js 107:292-305 113:33-53
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

ERROR in ./node_modules/ws/lib/websocket-server.js 10:23-40
Module not found: Error: Can't resolve 'crypto' in 'D:\projects\MKV web\node_modules\ws\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
        - install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "crypto": false }
 @ ./node_modules/ws/index.js 6:19-52
 @ ./src/worker/ffmpeg-core/ffmpeg-core.js 107:292-305 113:33-53
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

ERROR in ./node_modules/ws/lib/websocket.js 6:14-30
Module not found: Error: Can't resolve 'https' in 'D:\projects\MKV web\node_modules\ws\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "https": require.resolve("https-browserify") }'
        - install 'https-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "https": false }
 @ ./node_modules/ws/index.js 3:18-44
 @ ./src/worker/ffmpeg-core/ffmpeg-core.js 107:292-305 113:33-53
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

ERROR in ./node_modules/ws/lib/websocket.js 7:13-28
Module not found: Error: Can't resolve 'http' in 'D:\projects\MKV web\node_modules\ws\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
        - install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "http": false }
 @ ./node_modules/ws/index.js 3:18-44
 @ ./src/worker/ffmpeg-core/ffmpeg-core.js 107:292-305 113:33-53
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

ERROR in ./node_modules/ws/lib/websocket.js 8:12-26
Module not found: Error: Can't resolve 'net' in 'D:\projects\MKV web\node_modules\ws\lib'
 @ ./node_modules/ws/index.js 3:18-44
 @ ./src/worker/ffmpeg-core/ffmpeg-core.js 107:292-305 113:33-53
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

ERROR in ./node_modules/ws/lib/websocket.js 9:12-26
Module not found: Error: Can't resolve 'tls' in 'D:\projects\MKV web\node_modules\ws\lib'
 @ ./node_modules/ws/index.js 3:18-44
 @ ./src/worker/ffmpeg-core/ffmpeg-core.js 107:292-305 113:33-53
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

ERROR in ./node_modules/ws/lib/websocket.js 10:36-53
Module not found: Error: Can't resolve 'crypto' in 'D:\projects\MKV web\node_modules\ws\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
        - install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "crypto": false }
 @ ./node_modules/ws/index.js 3:18-44
 @ ./src/worker/ffmpeg-core/ffmpeg-core.js 107:292-305 113:33-53
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

ERROR in ./node_modules/ws/lib/websocket.js 11:21-38
Module not found: Error: Can't resolve 'stream' in 'D:\projects\MKV web\node_modules\ws\lib'
Did you mean './stream'?
Requests that should resolve in the current directory need to start with './'.
Requests that start with a name are treated as module requests and resolve within module directories (node_modules).
If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
        - install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "stream": false }
 @ ./node_modules/ws/index.js 3:18-44
 @ ./src/worker/ffmpeg-core/ffmpeg-core.js 107:292-305 113:33-53
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

ERROR in ./src/worker/ffmpeg-core/ffmpeg-core.js 12:80-93
Module not found: Error: Can't resolve 'fs' in 'D:\projects\MKV web\src\worker\ffmpeg-core'
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

ERROR in ./src/worker/ffmpeg-core/ffmpeg-core.js 16:162-195
Module not found: Error: Can't resolve 'perf_hooks' in 'D:\projects\MKV web\src\worker\ffmpeg-core'
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

ERROR in ./src/worker/ffmpeg-core/ffmpeg-core.js 170:203-221
Module not found: Error: Can't resolve 'os' in 'D:\projects\MKV web\src\worker\ffmpeg-core'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "os": require.resolve("os-browserify/browser") }'
        - install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "os": false }
 @ ./src/worker/ffmpeg.ts 47:0-54 49:0-56 53:19-29 148:53-63 154:47-59
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

ERROR in ./src/worker/ffmpeg-core/ffmpeg-core.wasm 1:0
Module parse failed: Unexpected character '' (1:0)
The module seem to be a WebAssembly module, but module is not flagged as WebAssembly module for webpack.
BREAKING CHANGE: Since webpack 5 WebAssembly is not enabled by default and flagged as experimental feature.
You need to enable one of the WebAssembly experiments via 'experiments.asyncWebAssembly: true' (based on async modules) or 'experiments.syncWebAssembly: true' (like webpack 4, deprecated).
For files that transpile to WebAssembly, make sure to set the module type in the 'module.rules' section of the config (e. g. 'type: "webassembly/async"').
(Source code omitted for this binary file)
 @ ./src/worker/ffmpeg.ts 48:0-56 151:47-57
 @ ./src/worker/chunked-remuxer-worker.ts 1:0-30 3:19-25
 @ ./src/chunked-remuxer.ts
 @ ./src/mkv-web.ts 37:0-50 52:28-45
 @ ./src/index.ts 37:0-31 41:17-23

20 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.54.0 compiled with 21 errors and 5 warnings in 12189 ms

Can you please include the dist bundle in the repo?

I am curious to try this (I am on Firebox, although ideally it would also work on Chrome), but don't want to go through the hassle of compiling. If you can include a standalone .js it would be good. Cheers and thanks for the hard work.

Subtitle support

Load subtitles from MKV container and render them on top of the video element. Ideally, we should support the following common formats:

  • Subrip (.srt)
  • WebVTT (.vtt)
  • Substation Alpha (.ass)

For Substation Alpha support, we can use JavascriptSubtitlesOctopus or ASS.js

Avoid unnecessary chunk remuxing

Sometimes chunks are remuxed that have a relatively large time range in common. This is likely related to a suboptimal implementation of onTimeUpdate.

Handle ffmpeg errors

Non-zero exit code of ffmpeg in web worker is not handled. We should throw an exception when the exit code is not what we expect.

Add support for Chrome-based browsers

Chrome-based browsers don't appear to respect the presentation time of media files added to SourceBuffer, although they work fine with Firefox.

We currently pass -ss ... -t ... -i ... -movflags frag_keyframe+delay_moov+default_base_moof to ffmpeg.

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.