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

Please add browser build of ffmpeg.js #172

Open
zackees opened this issue Jan 8, 2022 · 8 comments
Open

Please add browser build of ffmpeg.js #172

zackees opened this issue Jan 8, 2022 · 8 comments

Comments

@zackees
Copy link

zackees commented Jan 8, 2022

Right now the internet is stuck on ffmpeg wasm because of the shared array buffer issue. The solution apparently is a single threaded version of ffmpeg.js

Right now you have a node version. This request is to have a build for the browser version. This would open up a whole bunch of excited tooling to really accelerate video and audio editing in the browser.

@thiagorb
Copy link

thiagorb commented Jan 9, 2022

@zackees this package already works on the browser, but it is also a single threaded build. You can use the Web Worker version and run multiple instances in parallel to process multiple files, but a single file can only be processed in a single thread.

@zackees
Copy link
Author

zackees commented Jan 10, 2022

Here's an example that I created:

https://www.zaxtunes.com/client_transcoder/

Now everyone trying to find the same thing can just use my code instead.

Cheers,
Z

@brunoluiz
Copy link

@zackees Aren't you using https://github.com/bgrins/videoconverter.js instead tho? At least this is what is in the header of the ffmpeg-asm.js you pointed out in the H1 of your website.

/*
Most files in FFmpeg are under the GNU Lesser General Public License version 2.1
or later (LGPL v2.1+). Read the file COPYING.LGPLv2.1 for details. Some other
files have MIT/X11/BSD-style licenses. In combination the LGPL v2.1+ applies to
FFmpeg.
The source code used to build this file can be obtained at https://github.com/bgrins/videoconverter.js,
and in zip form at https://github.com/bgrins/videoconverter.js/archive/master.zip
*/

@zackees
Copy link
Author

zackees commented Jan 17, 2022

https://github.com/bgrins/videoconverter.js doesn't know how to seperate responsibilities, the gui code is intrained with the ffmpeg stuff. My example is entirely separate.

@siebediels
Copy link

@zackees Is this example still available somewhere? I'm also struggling to use ffmpeg.js in the browser. The NPM build seems to be using some process.stdin() methods which aren't available in browser (#137). I would like to use it in a normal webpack app, e.g.


import ffmpeg from 'ffmpeg.js'; // Import node_module

const result = ffmpeg({
  MEMFS: [{ name: 'test.mkv', data: new Uint8Array() }], // Uint8Array is of course filled with actual data
  arguments: ['-i', 'test.mkv', '-c:v', 'rawvideo', '-an', 'out.webm'],
});

@zackees
Copy link
Author

zackees commented May 3, 2022

I was able to find a working version in another code repo somewhere but it was SOOOOOOOOOOO SLOWWWW it wasn't worth it.

@eulphean
Copy link

eulphean commented Jun 23, 2022

@siebediels - did you ever find a solution to this? @zackees, I can't access https://www.zaxtunes.com/client_transcoder/ \ anymore. Are you using ffmpeg.js or ffmpeg.wasm? I believe the only solution right now for this issue is to use this library instread https://github.com/ffmpegwasm/ffmpeg.wasm

@zackees
Copy link
Author

zackees commented Jun 23, 2022

I've made the repo public and you can clone to this commit:

zackees/zaxtunes.com@e3d438e

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

No branches or pull requests

5 participants