Comments (9)
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.
@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.
@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.
@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.
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.
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.
@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.
I've made the repo public and you can clone to this commit:
from ffmpeg.js.
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)
- Building without Docker is extremely slow
- Further Build with Docker instructions HOT 3
- HLS streaming with remote playlist HOT 3
- Are URL inputs supported? HOT 1
- create video from jpeg ipcam snapshot
- when I try to make flv to mp4, it show that flv Invalid data found when processing input HOT 2
- "Bad mount point"
- Upgrade to new FFMPEG version HOT 1
- Error when trying to extract frames from a video HOT 2
- Cannot read property 'write' of undefined HOT 2
- Are there more compact build for FFmpeg library?
- How to Remove the video track from an .mp4 file? HOT 1
- { code: 101, msg: 'The input file path must be a string' } HOT 1
- .mp4 -> .gif without full FFmpeg library HOT 1
- MP4 to PNG: output%d.png: Invalid argument, How can I edit the Makefile to enable PNG output? HOT 1
- Typescript types for FFMPEG.js? HOT 1
- Support hevc_videotoolbox in ffmpeg
- -movflags seems to not recognize itself
- can't find selected font provider and failed to find any fallback for font: (微软雅黑, 700, 0)
- Does the custom compilation functionality of this library still work? In 2024, are there still people who have successfully compiled it?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ffmpeg.js.