Coder Social home page Coder Social logo

ffmpeg-webworker's Introduction

Gopher GIF

Limistah [ Aleem, Isiaka - (AI) ]

Software Engineer meddling with Web Technologies, CLI/Networking tools, and Cloud Infrastructures.

A bit more about me

Programming Languages

DevOps

jaeger

Web

Gin-Gonic Logo

ffmpeg-webworker's People

Contributors

dependabot[bot] avatar limistah 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

Watchers

 avatar

ffmpeg-webworker's Issues

Error opening filters

Hi,

I'm trying to add a watermark on videos (image or text), I was able to accomplish this on server side, but not browser.

This is part of log when a video is uploaded
Received command: -i video-1595763301422.webm -vf "drawtext=text='watermark'" sliced-output.mp4. Processing with 33554432 bits.

But its unable to apply a filter :

 [AVFilterGraph @ 0x113ad70] No such filter: '"drawtext' 
 Error opening filters! 

This seems to happen : The error with drawtext happens when your ffmpeg is compiled without libfreetype.

Is it possible to solve it?

Conversion error webm to mp4

Hi limistah,

Good work there! Thank you.

I tried to convert a webm file into mp4 using "-vcodec h264 -acodec aac -strict -2 output.mp4". It works in videoconverter.js but whereas doesn't work here.
This is the output I got.


FFMPEG is ready

File Received

Received command: -i video-1585897663328.webm -vcodec h264 -acodec aac -strict -2 output.mp4. Processing with 33554432 bits.

ffmpeg version 2.2.1 Copyright (c) 2000-2014 the FFmpeg developers

built on Jun 9 2014 20:24:32 with emcc (Emscripten GCC-like replacement) 1.12.0 (commit 6960d2296299e96d43e694806f5d35799ef8d39c)

configuration: --cc=emcc --prefix=/Users/bgrinstead/Sites/videoconverter.js/build/ffmpeg/../dist --extra-cflags='-I/Users/bgrinstead/Sites/videoconverter.js/build/ffmpeg/../dist/include -v' --enable-cross-compile --target-os=none --arch=x86_32 --cpu=generic --disable-ffplay --disable-ffprobe --disable-ffserver --disable-asm --disable-doc --disable-devices --disable-pthreads --disable-w32threads --disable-network --disable-hwaccels --disable-parsers --disable-bsfs --disable-debug --disable-protocols --disable-indevs --disable-outdevs --enable-protocol=file --enable-libvpx --enable-gpl --extra-libs='/Users/bgrinstead/Sites/videoconverter.js/build/ffmpeg/../dist/lib/libx264.a /Users/bgrinstead/Sites/videoconverter.js/build/ffmpeg/../dist/lib/libvpx.a'

libavutil 52. 66.100 / 52. 66.100

libavcodec 55. 52.102 / 55. 52.102

libavformat 55. 33.100 / 55. 33.100

libavdevice 55. 10.100 / 55. 10.100

libavfilter 4. 2.100 / 4. 2.100

libswscale 2. 5.102 / 2. 5.102

libswresample 0. 18.100 / 0. 18.100

libpostproc 52. 3.100 / 52. 3.100

[h264 @ 0xed8d60] Warning: not compiled with thread support, using thread emulation

Guessed Channel Layout for Input Stream #0.0 : mono

Input #0, matroska,webm, from 'video-1585897663328.webm':

Metadata:

 encoder         : Chrome 

Duration: N/A, start: 0.000000, bitrate: N/A

 Stream #0:0(eng): Audio: opus, 48000 Hz, mono (default) 

 Stream #0:1(eng): Video: h264 (Constrained Baseline), yuv420p, 640x480, SAR 1:1 DAR 4:3, 30.33 fps, 30 tbr, 1k tbn, 60 tbc (default) 

[abuffer @ 0x12327c0] Unable to parse option value "(null)" as sample format

 Last message repeated 1 times
Last message repeated 1 times 

[abuffer @ 0x12327c0] Error setting option sample_fmt to value (null).

[graph 1 input from stream 0:0 @ 0x1232760] Error applying options to the filter.

Error opening filters!

Finished processing (took 2407ms)

Command Completed, check the console

The output file was of size 0 bytes. Please help!
Thank you

more descriptive documentation

Can you provide a step by step guide on how to set this up? First, I want to root of my html server and ran:

$ npm install --prefix . ffmpeg-webworker

This got me node_modules with you package.

I then tried loading the module in a simple html file via:

<script type="module" src="/js/ffmpeg-webworker.js"></script>

With the contents being of this js file being:

import { FFMPEGWebworkerClient } from "/node_modules/ffmpeg-webworker/dist/es/index.js";

const webworkerClient = new FFMPEGWebworkerClient();

// The above is same as
// import webworkerClient from "ffmpeg-webworker";

webworkerClient.on("ready", () => {
console.log("FFMPEG has been loaded, and can receive commands");
});

First error I got was:

GET http://127.0.0.1:8080/node_modules/ffmpeg-webworker/dist/es/FFMPEGWebWorkerClient net::ERR_ABORTED 404 (Not Found)
index.js:2 GET http://127.0.0.1:8080/node_modules/ffmpeg-webworker/dist/es/FFMPEGWebWorker net::ERR_ABORTED 404 (Not Found)

So I edited /node_modules/ffmpeg-webworker/src/index.js from:

import WebworkerClient from "./FFMPEGWebWorkerClient";
import Webworker from "./FFMPEGWebWorker";

to:

import WebworkerClient from "./FFMPEGWebWorkerClient.js";
import Webworker from "./FFMPEGWebWorker.js";

Now I'm getting this error:

Uncaught TypeError: Failed to resolve module specifier "webworker-file". Relative references must start with either "/", "./", or "../".

At this point I'm out of ideas.

libx264 optional codec support?

This is a really great and easy to use lib to work with ffmpeg and workers - thank you!

Is there plan to allow users to specify or manually add which codec's they'd like to support? For example, libx264 isn't bundled with this, how would I go about adding it so it can be used with your lib?

Memory Allocation

Great module, hope I can get it to work.

I'm sending it quite a large file to convert to webM and getting this error:

Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 33554432, (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.

Other people have had this issue
Kagami/ffmpeg.js#9

And the solution is to

Try to pass TOTAL_MEMORY: 128 * 1024 * 1024 (128MB) option. There is 64MB by default which might be not enough for some files.

Any idea how I do this with your version?

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.