Giter Club home page Giter Club logo

Comments (9)

zackees avatar zackees commented on August 21, 2024 2

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

from ffmpeg.js.

siebediels avatar siebediels commented on August 21, 2024 2

@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'],
});

from ffmpeg.js.

thiagorb avatar thiagorb commented on August 21, 2024

@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.

from ffmpeg.js.

brunoluiz avatar brunoluiz commented on August 21, 2024

@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
*/

from ffmpeg.js.

zackees avatar zackees commented on August 21, 2024

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.

from ffmpeg.js.

zackees avatar zackees commented on August 21, 2024

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

from ffmpeg.js.

eulphean avatar eulphean commented on August 21, 2024

@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

from ffmpeg.js.

zackees avatar zackees commented on August 21, 2024

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

zackees/zaxtunes.com@e3d438e

from ffmpeg.js.

DerStimmler avatar DerStimmler commented on August 21, 2024

I'm using vite with the plugin "vite-plugin-require".

import { defineConfig } from 'vite';
import vitePluginRequire from "vite-plugin-require";

export default defineConfig({
    plugins: [
        vitePluginRequire.default()
    ]
});

That way I can use require in the browser as shown in the readme.

const ffmpeg = require("ffmpeg.js/ffmpeg-mp4.js");

Works fine but I haven't tried the web worker yet.

from ffmpeg.js.

Related Issues (20)

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.