Questions tagged [ffmpeg.js]

A library which provides FFmpeg builds ported to JavaScript using Emscripten project

16 questions
3
votes
1 answer

Kagami/ffmpeg.js webm to images got Unable to find a suitable output format for '%04d.jpg' error

Here is versions: node v12.9.1, npm 6.10.2, ffmpeg.js@4.2.9003 repo: https://github.com/Kagami/ffmpeg.js decode.js code like this: const fs = require('fs'); const ffmpeg = require('ffmpeg.js'); const testData = new…
Red
  • 53
  • 4
2
votes
2 answers

FFmpeg custom build support for converting .ts to .mp4 files

ffmpeg.js uses a custom build of FFmpeg to keep its size low. I am trying to convert a .ts into a .mp4 which has always been an easy task on my desktop (especially since they are even using the same codecs, aac and h.264), but on the custom build,…
2
votes
1 answer

FFmpeg.js Extract images (jpeg/png) from MP4 file

I'm trying to extract images/frames from a mp4 on client side with the help of ffmpeg.js. Equivalent Ffmpeg command: ffmpeg -i Sample.mp4 -r 1 output%d.png However i could try to create webm file from jpeg files but i couldn't do the reverse and…
Anuragh27crony
  • 2,957
  • 1
  • 19
  • 29
1
vote
0 answers

Convert a HLS Stream in MP4 with Javascript

I need the client to download a live streaming .flv/.m3u8 from an external cdn and for the client to convert it to mp4. Everything needs to be done with javascript, do you have any ideas? I specify that it has to be done client side. I use this code…
EmbeEmbe
  • 31
  • 4
1
vote
0 answers

ffmpeg.js to create mp4 from Canavas frames and transcode it

I am looking to use ffmpeg or ffmpeg.wasm inside a Vue serverless SPA which at the moment uses GIF.js. The app creates HTMLCanvasElement dynamically and adds them as frames to the GIF object which is then made available for download and in the case…
Curious
  • 383
  • 3
  • 13
1
vote
0 answers

Merge multiple videos to a split-screen video with FFMPEG

I am new to ffmpeg, and I need some help: I am writing an App that merges multiple videos to a single split-screen video. The user can set the size and position of each video. I implemented the merging by using a video.js stream merger. This works…
finnk
  • 123
  • 1
  • 1
  • 12
1
vote
1 answer

ffmpeg.js filter command without quotes

I want to use a filter in an ffmpeg version compiled for Javascript (ffmpeg.js). But the parser doesn't seem to handle quotes, so I need to write the full command without quotes. How can I write the following command without quotes? ffmpeg -i…
user2212461
  • 3,105
  • 8
  • 49
  • 87
0
votes
0 answers

Download an HLS stream with javascript

I'm trying to download an m3u8 live streaming on the browser using JavaScript (all client-side). I found this code from another question posted by @huhngut on Stack Overflow: Hls.js record file. I wanted to ask how I could merge the audio and video…
EmbeEmbe
  • 31
  • 4
0
votes
0 answers

ffmpeg-worker-mp4: Requested output format 'h264' is not a suitable output format

I'd like to grab the video stream of a selected mp4 to decode it later: async onFileSelected(event: Event) { const file: File = (event as any).target.files[0]; console.log(file); const sourceBuffer = await file.arrayBuffer(); …
Dániel Barta
  • 1,034
  • 7
  • 13
0
votes
0 answers

FFMPEG creating mp3 with "Junk" at the end

I have a web application which converts WebM files to mp3 using FFMPEG.js in the Client-Side. Once the mp3 conversion finishes, users are prompted to download their file. Lately, I realized that a lot of mp3 files which I tried to converted have a…
user15499983
0
votes
1 answer

Chrome ffmpeg.js can not make a video more than 33 seconds

I am encoding and exporting a video in mp4 and webm format. I am using ffmpeg.js. It works fine but i can not make a video longer than 33 seconds. let ffmpegArguments:string[] = []; ffmpegArguments.push("-framerate", (1.0/frameTime).toFixed(0), …
sb32134
  • 426
  • 8
  • 19
0
votes
1 answer

Save Blob with multible file streams?

I have two Uint8Arrays. The first contains the video and the second the audio data. For now, I save both of them using blob. I poorly was unable to find any explanation on how to save them in one file. Can somebody provide a code…
Huhngut
  • 402
  • 6
  • 13
0
votes
1 answer

ffmpeg.js build is missing defined format

I'm attempting to encode files using pcm_f32le with the f32le format. I've defined both the encoder and format within the makefile present in the cloned ffmpeg.js repository: WEBM_MUXERS = webm ogg null data f32le WEBM_ENCODERS = libvpx_vp8 libopus…
tripleblep
  • 530
  • 7
  • 17
0
votes
0 answers

Encode PNG images to MP4

I'm using FFMPEG.js to convert PNG images into MP4 in the Browser with this code: const { createWorker } = FFmpeg; const worker = createWorker({ corePath: 'ffmpeg-core.min.js', progress: (p) => console.log(p), logger:…
quarks
  • 33,478
  • 73
  • 290
  • 513
0
votes
0 answers

Encode array of JPEG images to MPEG1

I have this web worker code that I need to be able to use to convert an array of JPEG images into MPEG1 importScripts('ffmpeg-core.min.js') onmessage = function(e) { var images = e.data[0] console.log('Got frames: ' + images.length) var…
quarks
  • 33,478
  • 73
  • 290
  • 513
1
2