Giter Club home page Giter Club logo

ffmpeg.js's Introduction

ffmpeg.js

NPM

This library provides FFmpeg builds ported to JavaScript using Emscripten project. Builds are optimized for in-browser use: minimal size for faster loading, asm.js, performance tunings, etc. Though they work in Node as well.

Builds

Currently available builds (additional builds may be added in future):

  • ffmpeg-webm.js - WebM encoding (VP8 & Opus encoders, popular decoders).
  • ffmpeg-worker-webm.js - Web Worker version of ffmpeg-webm.js.
  • ffmpeg-mp4.js - MP4 encoding (H.264 & AAC & MP3 encoders, popular decoders).
  • ffmpeg-worker-mp4.js - Web Worker version of ffmpeg-mp4.js.

Note: only NPM releases contain abovementioned files.

Version scheme

ffmpeg.js uses the following version pattern: major.minor.9ddd, where:

  • major - FFmpeg's major version number used in the builds.
  • minor - FFmpeg's minor version.
  • ddd - ffmpeg.js own patch version. Should not be confused with FFmpeg's patch version number.

Example: 2.7.9005

Usage

See documentation on Module object for the list of options that you can pass.

Sync run

ffmpeg.js provides common module API, ffmpeg-webm.js is the default module. Add its name after the slash if you need another build, e.g. require("ffmpeg.js/ffmpeg-mp4.js").

const ffmpeg = require("ffmpeg.js");
let stdout = "";
let stderr = "";
// Print FFmpeg's version.
ffmpeg({
  arguments: ["-version"],
  print: function(data) { stdout += data + "\n"; },
  printErr: function(data) { stderr += data + "\n"; },
  onExit: function(code) {
    console.log("Process exited with code " + code);
    console.log(stdout);
    console.log(stderr);
  },
});

Use e.g. browserify in case of Browser.

Via Web Worker

ffmpeg.js also provides wrapper for main function with Web Worker interface to offload the work to a different process. Worker sends the following messages:

  • {type: "ready"} - Worker loaded and ready to accept commands.
  • {type: "run"} - Worker started the job.
  • {type: "stdout", data: "<line>"} - FFmpeg printed to stdout.
  • {type: "stderr", data: "<line>"} - FFmpeg printed to stderr.
  • {type: "exit", data: "<code>"} - FFmpeg exited.
  • {type: "done", data: "<result>"} - Job finished with some result.
  • {type: "error", data: "<error description>"} - Error occurred.
  • {type: "abort", data: "<abort reason>"} - FFmpeg terminated abnormally (e.g. out of memory, wasm error).

You can send the following messages to the worker:

  • {type: "run", ...opts} - Start new job with provided options.
const worker = new Worker("ffmpeg-worker-webm.js");
worker.onmessage = function(e) {
  const msg = e.data;
  switch (msg.type) {
  case "ready":
    worker.postMessage({type: "run", arguments: ["-version"]});
    break;
  case "stdout":
    console.log(msg.data);
    break;
  case "stderr":
    console.log(msg.data);
    break;
  case "done":
    console.log(msg.data);
    break;
  }
};

You can use worker_threads module in case of Node.

Files

Empscripten supports several types of file systems. ffmpeg.js uses MEMFS to store the input/output files in FFmpeg's working directory. You need to pass Array of Object to MEMFS option with the following keys:

  • name (String) - File name, can't contain slashes.
  • data (ArrayBuffer/ArrayBufferView/Array) - File data.

ffmpeg.js resulting object has MEMFS option with the same structure and contains files which weren't passed to the input, i.e. new files created by FFmpeg.

const ffmpeg = require("ffmpeg.js");
const fs = require("fs");
const testData = new Uint8Array(fs.readFileSync("test.webm"));
// Encode test video to VP8.
const result = ffmpeg({
  MEMFS: [{name: "test.webm", data: testData}],
  arguments: ["-i", "test.webm", "-c:v", "libvpx", "-an", "out.webm"],
});
// Write out.webm to disk.
const out = result.MEMFS[0];
fs.writeFileSync(out.name, Buffer(out.data));

You can also mount other FS by passing Array of Object to mounts option with the following keys:

  • type (String) - Name of the file system.
  • opts (Object) - Underlying file system options.
  • mountpoint (String) - Mount path, must start with a slash, must not contain other slashes and also the following paths are blacklisted: /tmp, /home, /dev, /work. Mount directory will be created automatically before mount.

See documentation of FS.mount for more details.

const ffmpeg = require("ffmpeg.js");
ffmpeg({
  // Mount /data inside application to the current directory.
  mounts: [{type: "NODEFS", opts: {root: "."}, mountpoint: "/data"}],
  arguments: ["-i", "/data/test.webm", "-c:v", "libvpx", "-an", "-y", "/data/out.webm"],
});
// out.webm was written to the current directory.

Build instructions

It's recommended to use Docker to build ffmpeg.js.

  1. Clone ffmpeg.js repository with submodules:

    git clone https://github.com/Kagami/ffmpeg.js.git --recurse-submodules
  2. Modify Makefile and/or patches if you wish to make a custom build.

  3. Build everything:

    docker run --rm -it -v /path/to/ffmpeg.js:/mnt -w /opt kagamihi/ffmpeg.js
    # cp -a /mnt/{.git,build,Makefile} . && source /root/emsdk/emsdk_env.sh && make && cp ffmpeg*.js /mnt

That's it. ffmpeg.js modules should appear in your repository clone.

Build without Docker

Ubuntu example:

sudo apt-get update
sudo apt-get install -y git python build-essential automake libtool pkg-config

cd ~
git clone https://github.com/emscripten-core/emsdk.git && cd emsdk
./emsdk install latest
./emsdk activate latest
source emsdk_env.sh

cd ~
git clone https://github.com/Kagami/ffmpeg.js.git --recurse-submodules && cd ffmpeg.js
make

Credits

Thanks to videoconverter.js for inspiration. And of course to all great projects which made this library possible: FFmpeg, Emscripten, asm.js, node.js and many others.

License

Own library code licensed under LGPL 2.1 or later.

WebM build

This build uses LGPL version of FFmpeg and thus available under LGPL 2.1 or later. See here for more details and FFmpeg's license information.

Included libraries:

See LICENSE.WEBM for the full text of software licenses used in this build.

MP4 build

This build uses GPL version of FFmpeg and thus available under GPL 2.0. It also includes patent encumbered H.264, AAC and MP3 encoders. Make sure to contact lawyer before using it in your country.

Included libraries:

See LICENSE.MP4 for the full text of software licenses used in this build.

ffmpeg.js's People

Contributors

dependabot[bot] avatar jamie0 avatar kagami avatar paulkinlan avatar thcolin avatar thijstriemstra avatar tpetry 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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  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  avatar  avatar  avatar  avatar

ffmpeg.js's Issues

Can't convert MP4 to MP3

Hi.

I'm trying to use ffmpeg-worker-mp4.js to convert a file from MP4 to MP3. I don't know if I'm doing something wrong, but i can't. The error message is.

"Unable to find a suitable output format for 'fonsi.mp3'
fonsi.mp3: Invalid argument"

Any help would be appreciated.

PD: Sorry for my bad english.

Possible to pipe image stream?

I'm trying to do something like the following:

cat *.jpg | ffmpeg -f image2pipe -i - video.mp4

Is there some way to do something similar with ffmpeg.js?

I was looking into recording with canvas.captureStream, however, I want to ensure all frames get recorded (no skipping) and ideally as fast as I can generate the frames.

GIF +audio to mp4

Not so much an issue, but an enhancement:
By adding the string 'gif' to COMMON_DEMUXERS and COMMON_DECODERS,
GIFS can be transcoded.
I also needed add the string '-s ALLOW_MEMORY_GROWTH=1' to EMCC_COMMON_ARGS,
as my transcode would fail spectacularly with messages indicating I either needed to increase
the memory allocated to beyond 64M, or allow growth.

I tested both modifications at the same time, and they work both in browser and node.

Thanks for the great project!

-filter_complex fails with "No such filter: 'overlay'"

I've been trying to get filter_complex to work and I keep getting a No such filter: 'overlay' error and I can't quite work out what it is. Other JS libraries that wrap ffmpeg (videoencoder.js etc) suggest that it is use of quotes and single quotes, however I can't find any combination that works and I was wondering if there is an encoding error in this ffmpeg library.

My args that I am sending to the run message (I am using ffmpeg in a worker)

[
   '-i', files[0].name,
   '-i', files[1].name,
   '-filter_complex', '"[1:v]scale=480:-1[scaled_overlay],[0:v][scaled_overlay]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2"',
   'output.mp4'
]

I have tried all the following:

  • "[1:v]scale=480:-1[scaled_overlay],[0:v][scaled_overlay]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2"
  • '[1:v]scale=480:-1[scaled_overlay],[0:v][scaled_overlay]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2'
  • [1:v]scale=480:-1[scaled_overlay],[0:v][scaled_overlay]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2

Wicked! Thanks + please support MP4 too

Awesome work. Think I will need it a lot soon.

But can you add MP4 codecs as well please for max compatibility. Otherwise I cannot use the sites I code with Internet Explorer.

Asynchronous stdin

With the use of Web Streams videos could be downloaded then converted to other format without too expensive memory usage. I don't know if Emscripten supports that, as seems it blocks its thread, but if it's possible would be interesting.

Is this project being maintained?

I noticed that a commit or comment from a project member hasn't occurred in the previous 9 months. Is this project being actively maintained? If not, will you please consider indicating that near the top of the readme? Thanks.

Playback issues with Opus

I'm currently reencoding files in Chrome using Opus

worker.postMessage({
  type: 'run',
  arguments: [
    '-i', inputName,
    '-c:a', 'libopus',
    '-ar', '48000',
    '-b:a', '128k',
    ouputName,
  ],
  MEMFS: [
    {
      name: inputName,
      data: new Uint8Array(arrayBuffer),
    },
  ],
});

The output by ffmpeg seems fine:

ffmpeg version n2.8.1 Copyright (c) 2000-2015 the FFmpeg developers
  built with emcc (Emscripten gcc/clang-like replacement) 1.35.2 (commit 58aebef6b4de259dca37fc6f442207f8252613e2)
  configuration: --cc=emcc --enable-cross-compile --target-os=none --arch=x86 --disable-runtime-cpudetect --disable-asm --disable-fast-unaligned --disable-pthreads --disable-w32threads --disable-os2threads --disable-debug --disable-stripping --disable-all --enable-ffmpeg --enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale --enable-avfilter --disable-network --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --enable-decoder=vp8 --enable-decoder=vp9 --enable-decoder=theora --enable-decoder=vorbis --enable-decoder=opus --enable-decoder=mpeg2video --enable-decoder=mpeg4 --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=mp3 --enable-decoder=ac3 --enable-decoder=aac --enable-decoder=ass --enable-decoder=ssa --enable-decoder=srt --enable-decoder=webvtt --enable-demuxer=matroska --enable-demuxer=ogg --enable-demuxer=avi --enable-demuxer=mov --enable-demuxer=flv --enable-demuxer=mpegvideo --enable-demuxer=concat --enable-protocol=file --enable-filter=aresample --enable-filter=scale --enable-filter=crop --disable-bzlib --disable-iconv --disable-libxcb --disable-lzma --disable-sdl --disable-securetransport --disable-xlib --disable-zlib --enable-encoder=libvpx_vp8 --enable-encoder=libopus --enable-encoder=mjpeg --enable-muxer=webm --enable-muxer=ogg --enable-muxer=null --enable-muxer=image2 --enable-filter=subtitles --enable-libass --enable-libopus --enable-libvpx --extra-cflags=-I../libvpx/dist/include --extra-ldflags=-L../libvpx/dist/lib
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavfilter     5. 40.101 /  5. 40.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
[mp3 @ 0x760ef0] Warning: not compiled with thread support, using thread emulation
Input #0, matroska,webm, from 'input.mkv':
  Metadata:
    ENCODER         : Lavf56.36.100
  Duration: 00:02:37.21, start: 0.000000, bitrate: 114 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 112 kb/s (default)
[libopus @ 0x762d80] Warning: not compiled with thread support, using thread emulation
[mp3 @ 0x761b70] Warning: not compiled with thread support, using thread emulation
Output #0, ogg, to 'input.opus':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Audio: opus (libopus), 48000 Hz, stereo, s16, 128 kb/s (default)
    Metadata:
      encoder         : Lavc56.60.100 libopus
Stream mapping:
  Stream #0:0 -> #0:0 (mp3 (native) -> opus (libopus))
Press [q] to stop, [?] for help
size=       0kB time=00:00:00.21 bitrate=   5.1kbits/s    
size=      18kB time=00:00:02.41 bitrate=  60.2kbits/s    
size=      73kB time=00:00:04.99 bitrate= 120.4kbits/s    
size=     128kB time=00:00:08.53 bitrate= 123.2kbits/s    
size=     185kB time=00:00:11.37 bitrate= 133.2kbits/s    
size=     241kB time=00:00:14.79 bitrate= 133.4kbits/s    
size=     316kB time=00:00:18.53 bitrate= 139.6kbits/s    
size=     371kB time=00:00:21.73 bitrate= 139.8kbits/s    
size=     445kB time=00:00:25.25 bitrate= 144.2kbits/s    
size=     499kB time=00:00:28.51 bitrate= 143.2kbits/s    
size=     555kB time=00:00:31.95 bitrate= 142.4kbits/s    
size=     631kB time=00:00:35.53 bitrate= 145.5kbits/s    
size=     685kB time=00:00:38.95 bitrate= 144.1kbits/s    
size=     758kB time=00:00:42.63 bitrate= 145.6kbits/s    
size=     831kB time=00:00:46.33 bitrate= 146.9kbits/s    
size=     904kB time=00:00:50.13 bitrate= 147.7kbits/s    
size=     980kB time=00:00:54.07 bitrate= 148.5kbits/s    
size=    1053kB time=00:00:58.03 bitrate= 148.7kbits/s    
size=    1107kB time=00:01:01.95 bitrate= 146.4kbits/s    
size=    1177kB time=00:01:05.75 bitrate= 146.7kbits/s    
size=    1249kB time=00:01:09.49 bitrate= 147.2kbits/s    
size=    1321kB time=00:01:13.23 bitrate= 147.8kbits/s    
size=    1393kB time=00:01:17.17 bitrate= 147.8kbits/s    
size=    1462kB time=00:01:21.11 bitrate= 147.7kbits/s    
size=    1532kB time=00:01:25.01 bitrate= 147.6kbits/s    
size=    1583kB time=00:01:28.95 bitrate= 145.7kbits/s    
size=    1655kB time=00:01:32.79 bitrate= 146.1kbits/s    
size=    1725kB time=00:01:36.79 bitrate= 146.0kbits/s    
size=    1798kB time=00:01:40.79 bitrate= 146.1kbits/s    
size=    1869kB time=00:01:44.67 bitrate= 146.3kbits/s    
size=    1940kB time=00:01:48.45 bitrate= 146.6kbits/s    
size=    2012kB time=00:01:52.41 bitrate= 146.6kbits/s    
size=    2082kB time=00:01:56.31 bitrate= 146.7kbits/s    
size=    2151kB time=00:02:00.23 bitrate= 146.6kbits/s    
size=    2222kB time=00:02:04.01 bitrate= 146.8kbits/s    
size=    2275kB time=00:02:07.95 bitrate= 145.6kbits/s    
size=    2346kB time=00:02:11.69 bitrate= 145.9kbits/s    
size=    2415kB time=00:02:15.61 bitrate= 145.9kbits/s    
size=    2492kB time=00:02:19.49 bitrate= 146.3kbits/s    
size=    2566kB time=00:02:23.47 bitrate= 146.5kbits/s    
size=    2641kB time=00:02:27.41 bitrate= 146.8kbits/s    
size=    2716kB time=00:02:31.41 bitrate= 147.0kbits/s    
size=    2793kB time=00:02:35.33 bitrate= 147.3kbits/s    
size=    2837kB time=00:02:37.21 bitrate= 147.8kbits/s    
video:0kB audio:2817kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.704760%

But Chrome refuses to play the file, and download and running ffmpeg -i produces the following

 jackwakefield@ApplinSkinners-MacBook-Pro ~/Downloads  $ ffmpeg -i output.opus
ffmpeg version 2.7.2 Copyright (c) 2000-2015 the FFmpeg developers
  built with Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.7.2_1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libfreetype --enable-libvorbis --enable-libvpx --enable-libass --enable-ffplay --enable-libfdk-aac --enable-libopus --enable-libquvi --enable-libx265 --enable-nonfree --enable-vda
  libavutil      54. 27.100 / 54. 27.100
  libavcodec     56. 41.100 / 56. 41.100
  libavformat    56. 36.100 / 56. 36.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 16.101 /  5. 16.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
  libpostproc    53.  3.100 / 53.  3.100
output.opus: Invalid data found when processing input

This is the input file: input.mkv.zip
This is the output file: output.opus.zip

EM_PKG_CONFIG_PATH override not working on ffmpeg build itself

I've been trying to build your project myself so I could tweak which encoders are included. Normally I wouldn't bother but the project I'm working on requires a very specific subset of audio encoders and as its for the browser (and already quite a large project) the less bytes the better.

For the most part the build is working fine but it looks like ffmpeg isn't playing ball with pkgconfig, although the EM_PKG_CONFIG_PATH paths specified when compiling the dependencies work correctly it cannot find the dependencies during the ffmpeg configure stage.

cd build/ffmpeg-webm && \
        git reset --hard && \
        patch -p1 < ../ffmpeg-default-font.patch && \
        patch -p1 < ../ffmpeg-disable-monotonic.patch && \
        EM_PKG_CONFIG_PATH=../freetype/dist/lib/pkgconfig:../fribidi/dist/lib/pkgconfig:../libass/dist/lib/pkgconfig:../opus/dist/lib/pkgconfig emconfigure ./configure \
                --cc=emcc --enable-cross-compile --target-os=none --arch=x86 --disable-runtime-cpudetect --disable-asm --disable-fast-unaligned --disable-pthreads --disable-w32threads --disable-os2threads --disable-debug --disable-stripping --disable-all --enable-ffmpeg --enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale --enable-avfilter --disable-network --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --enable-decoder=vp8 --enable-decoder=vp9 --enable-decoder=theora --enable-decoder=vorbis --enable-decoder=opus --enable-decoder=mpeg2video --enable-decoder=mpeg4 --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=mp3 --enable-decoder=ac3 --enable-decoder=aac --enable-decoder=ass --enable-decoder=ssa --enable-decoder=srt --enable-decoder=webvtt --enable-demuxer=matroska --enable-demuxer=ogg --enable-demuxer=avi --enable-demuxer=mov --enable-demuxer=flv --enable-demuxer=mpegps --enable-demuxer=concat --enable-protocol=file --enable-filter=aresample --enable-filter=scale --enable-filter=crop --disable-bzlib --disable-iconv --disable-libxcb --disable-lzma --disable-sdl --disable-securetransport --disable-xlib --disable-zlib \
                --enable-encoder=libvpx_vp8 --enable-encoder=libopus --enable-encoder=mjpeg \
                --enable-muxer=webm --enable-muxer=ogg --enable-muxer=null --enable-muxer=image2 \
                --enable-filter=subtitles \
                --enable-libass \
                --enable-libopus \
                --enable-libvpx \
                --extra-cflags="-I../libvpx/dist/include" \
                --extra-ldflags="-L../libvpx/dist/lib" \
                && \
        emmake make -j8 && \
        cp ffmpeg ffmpeg.bc
HEAD is now at 644179e Update Changelog
patching file libavfilter/vf_subtitles.c
Hunk #1 succeeded at 375 (offset 4 lines).
patching file libavutil/time.c
ERROR: libass not found using pkg-config

If I'm doing something wrong here a point in the right direction would be extremely helpful :)

Environment wise I'm using the bash for windows beta, so basically ubuntu.

Is it possible to convert WebRTC stream to DASH?

YouTube allows to run real-time broadcasts. See https://youtube.com/my_live_events.

There are 2 ways to run real-time broadcasts: 1. using Google+ Hangouts API and 2. using RTMP/DASH.

But according to https://developers.google.com/+/hangouts/support-faq, Google will close Hangouts API for video app developments starting from April 25, 2017.

For developers, this means we will not be able to create our own custom applications using Hangouts API that stream video (including YouTube).

I need to stream video and audio from the browser (web app) directly to YouTube Live without any intermediate server (for converting WebRTC to DASH or RTMP). Is it possible?

Currently YouTube Live Streaming API supports only RTMP and DASH, not WebRTC: https://developers.google.com/youtube/v3/live/docs/liveStreams#cdn.ingestionType

Is it possible somehow to create (segment) DASH stream from WebRTC (e.g. using ffmpeg.js) on client-side in browser and stream it to YouTube endpoint? If yes, how?

According to https://developers.google.com/youtube/v3/live/guides/encoding-with-dash, YouTube Live DASH endpoint supports H.264 and AAC codecs in ISO BMFF (MP4) container and VP8/VP9 and Vorbis/Opus codecs in WebM container. All these codecs currently are native for WebRTC and browsers and do not requires transcoding on intermediate server.

How to use it with webpack?

I'm building a web app that need to encode the video from the webcam. My issue is that webpack cannot build it when I import ffmpeg from 'ffmpeg/ffmpeg-worker-mp4.js'. And eventually, it will run out of memory. Is there any guide that I can run it in react with webpack?

On the fly transcoding

Is it possible to use ffmpeg.js for realtime (on-the-fly) transcoding and playing of media stream (e.g. online radio or online TV) in the browser (without needing to download the entire media file before it can start playing)?

Unable to find a suitable output format for '%05.png'

I want to use ffmepg.js to extract all frames from a video. But it seems that ffmpeg.js doesn't support encoding png?

Below is my code.

axios.get('Sticker.mp4', {
  responseType: 'arraybuffer'
}).then(resp => {
  console.log(resp)
  const data = resp.data as ArrayBuffer
  const arr = new Uint8Array(data)

  const res = ffmpeg({
    MEMFS: [{ name: 'input.mp4', data: arr }],
    stdin: () => {},
    arguments: [
      '-i', 'input.mp4',
      '-hide_banner',
      '%05.png',
    ]
  })

  console.log(res)
})

MP4 file requires zlib

Iโ€™m trying to convert ancient QuickTime .mov files into MP4 in Node. Iโ€™m getting this error:

ffmpeg version n3.1.2 Copyright (c) 2000-2016 the FFmpeg developers
    built with emcc (Emscripten gcc/clang-like replacement) 1.36.7 ()
    configuration: --cc=emcc --enable-cross-compile --target-os=none --arch=x86 --disable-runtime-cpudetect --disable-asm --disable-fast-unaligned --disable-pthreads --disable-w32threads --disable-os2threads --disable-debug --disable-stripping --disable-all --enable-ffmpeg --enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale --enable-avfilter --disable-network --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --enable-decoder=vp8 --enable-decoder=vp9 --enable-decoder=theora --enable-decoder=mpeg2video --enable-decoder=mpeg4 --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=png --enable-decoder=mjpeg --enable-decoder=vorbis --enable-decoder=opus --enable-decoder=mp3 --enable-decoder=ac3 --enable-decoder=aac --enable-decoder=ass --enable-decoder=ssa --enable-decoder=srt --enable-decoder=webvtt --enable-demuxer=matroska --enable-demuxer=ogg --enable-demuxer=avi --enable-demuxer=mov --enable-demuxer=flv --enable-demuxer=mpegps --enable-demuxer=image2 --enable-demuxer=mp3 --enable-demuxer=concat --enable-protocol=file --enable-filter=aresample --enable-filter=scale --enable-filter=crop --enable-filter=overlay --disable-bzlib --disable-iconv --disable-libxcb --disable-lzma --disable-sdl --disable-securetransport --disable-xlib --disable-zlib --enable-encoder=libx264 --enable-encoder=libmp3lame --enable-encoder=aac --enable-muxer=mp4 --enable-muxer=mp3 --enable-muxer=null --enable-gpl --enable-libmp3lame --enable-libx264 --extra-cflags=-I../lame/dist/include --extra-ldflags=-L../lame/dist/lib
    libavutil      55. 28.100 / 55. 28.100
    libavcodec     57. 48.101 / 57. 48.101
    libavformat    57. 41.100 / 57. 41.100
    libavfilter     6. 47.100 /  6. 47.100
    libswscale      4.  1.100 /  4.  1.100
    libswresample   2.  1.100 /  2.  1.100
  [mov,mp4,m4a,3gp,3g2,mj2 @ 0x8091e0] this file requires zlib support compiled in
  [mov,mp4,m4a,3gp,3g2,mj2 @ 0x8091e0] error reading header
  input.mov: Function not implemented

The same code successfully converts other formats, just not this input. I notice it says that apparently ffmpeg was compiled with --disable-zlib, so presumably thatโ€™s the problem. Is there a reason zlib is excluded? Could Nodeโ€™s built-in zlib work instead?

Write output to Blob

It'd be nice if there was a way to have the output written to a Blob instead of returning a Uint8Array, because browsers are able to put a Blob on disk if it gets too big for memory.

Writing to the end of a blob is straightforward:

myBlob = new Blob([myBlob, addedBytes], {type: 'video/mp4'});

Writing to the middle is a bit more complicated, but still doable:

myBlob = new Blob([myBlob.slice(offset, offset + addedBytes.length), addedBytes, myBlob.slice(offset + addedBytes.length)], {type: 'video/mp4'});

Decoding h264 Stream

I have a h264 stream ( main profile ) from in from a websocket( NAL Units ). I would to know how to use your library to convert h264 stream[ Uint8Array ] to YUV so that i can display it on a html5 canvas

Using ffmpeg.js as media codec and/or media container polyfill

Is it possible to use ffmpeg.js as a media codec and/or media container polyfill for the HTML5 <audio>/<video> tag in a web browser to transcode formats that not software/hardware supported?

Example 1: There is a test.htm page with <audio src="test.opus" /> tag, test.opus file encoded using Opus audio codec, but the web browser doesn't support Opus. Is it possible to decode test.opus to uncompressed test.wav (and change the tag to <audio src="test.wav" />)?

Example 2: There is a test.htm page with <video src="test.mp4" /> tag, test.mp4 file encoded using H.264 video codec and AC3 audio codec, but the web browser doesn't support AC3. Is it possible to decode only AC3 audio to uncompressed audio data (PCM) (that supported by browser), but not decode H.264 video (that supported by browser natively) (and view the test.mp4 with working video and audio in the browser)?

Black video in QuickTime

It seems like a new build of ffmpeg-worker-mp4.js is needed. When using current build, I get an mp4 file that plays fine in VLC, but plays with a black video in Quicktime. Doing a conversion of the same webm file in my own installation of ffmpeg plays good in Quicktime. Running ffprobe on both outputs, I mainly get a difference in encoder versions:

encoder : Lavf57.41.100
vs
encoder : Lavf57.56.101

(apart from some minor differences in the video or audio streams, which would make sense since the encoders are different)

Hence - may I suggest that new builds are published?

Build instructions and dependencies

I ran into the following error when running make

cd build/fribidi && ./bootstrap
/bin/sh: ./bootstrap: No such file or directory
make: *** [build/fribidi/configure] Error 127

Cloning https://github.com/behdad/fribidi into build/ fixed that, but it might be worth having a fetch sources script or include it as a submodule?

[Edit]
I ran into the same problem with freetype.

Fails to compile / Dockerfile

Since you already suggested using docker in the readme, I translated those instructions into a dockerfile.

FROM ubuntu:17.10

RUN apt-get update && apt-get -y install wget python git automake libtool build-essential cmake libglib2.0-dev closure-compiler git

RUN useradd -c 'Usa' -m -d /home/u -s /bin/bash u
USER u
WORKDIR /home/u

RUN wget https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz
RUN tar xzvf emsdk-portable.tar.gz
WORKDIR /home/u/emsdk-portable
RUN ./emsdk update
RUN ./emsdk install latest
RUN ./emsdk activate latest

WORKDIR /home/u
RUN git clone https://github.com/Kagami/ffmpeg.js.git
WORKDIR /home/u/ffmpeg.js
RUN git submodule init && git submodule update --recursive # sobmodules!

RUN bash -c '. ../emsdk-portable/emsdk_env.sh && make all'

I hope this can be useful to someone.

generate webm from frames

First thanks for the awesome work!

I'm trying to merge multiple frames (about 120) at 30fps into a single video but for some reason I'm not getting any feedback from the worker.

I'm sending the following arguments:

  var memfs = [];
  var args = ['-framerate', '30', '-i'];

  for (var i =0;i<images.length;i++) {
    var n = 'img-'+pad(i, 3)+'.png' //just padding the image names
    memfs.push({name: n, data:images[i]}) //pushing the images to memfs with ArrayBuffer data

    args.push('-i'); //adding those to args
    args.push(n);
  }

  args = _.concat(args, ['-c:v', 'libvpx', '-pix_fmt', 'yuv420p', 'out.webm'])

A simple --version works just fine, wondering if I'm doing something wrong here? would very much appreciate any help.

Disable some decoders

  • ffvp8, ffvp9 (libvpx_vp8, libvpx_vp9 probably should take less size since we're already including libvpx for VP8 encoding)
  • ffhevc (not that common and has big size)

Cannot enlarge memory arrays

I have some error, how to avoid it?

abort("Cannot enlarge memory arrays. Either (1) compile with  -s TOTAL_MEMORY=X  with X higher than the current value 67108864, (2) compile with  -s ALLOW_MEMORY_GROWTH=1  which adj
usts the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or if you want malloc to return NULL (0) instead of t
his abort, compile with  -s ABORTING_MALLOC=0 ")

Other output protocols than MEMFS file

Hi.

We are attempting to use ffmpeg.js, and we managed to utilise the MP4 web worker properly to fragment an MP4 for us.

Our problem is getting back the output. Our files are too large to store them in memory, and we were hoping that we can redirect the output to stdout where we could take off chunks of the output, and store them temporarily to avoid memory pressure.

However the "pipe:" output protocol seems to be unsupported by EMScripten, and I can't figure out a viable alternative.

Can you suggest any other output protocol which might work, with which we could avoid getting back the output as a huge MEMFS file? Shooting the data to some socket, or HTTP endpoint would also play, but those didn't work quite well either.

Any suggestions are appreciated.

ERROR: gnutls not found using pkg-config

I am trying to compile ffmpeg-mp4.js with --enable-gnutls to download input files from ffmpeg directly over https.

I added --enable-gnutls to configure:
EM_PKG_CONFIG_PATH=$(FFMPEG_MP4_PC_PATH) emconfigure ./configure \ $(FFMPEG_COMMON_ARGS) \ $(addprefix --enable-encoder=,$(MP4_ENCODERS)) \ $(addprefix --enable-muxer=,$(MP4_MUXERS)) \ --enable-gpl \ --enable-libmp3lame \ --enable-libx264 \ --enable-gnutls \ --extra-cflags="-I../lame/dist/include" \ --extra-ldflags="-L../lame/dist/lib" \

and added gnutls.pc to the PC_PATH:
FFMPEG_MP4_PC_PATH = ../x264/dist/lib/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig

but I still get ERROR: gnutls not found using pkg-config

when compiling.

My config.log is:
config.txt

which shows EM_PKG_CONFIG_PATH='../x264/dist/lib/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig'

which my gnutls.pc is located at:
ls -l /usr/lib/i386-linux-gnu/pkgconfig/gnutls.pc -rw-r--r-- 1 root root 865 Mar 30 22:39 /usr/lib/i386-linux-gnu/pkgconfig/gnutls.pc

Any idea why gnutls still can't be found?

String file support?

FFmpeg can work with a bunch of "string type" files i.e. concat files, subtitles etc. but this doesn't seem to be supported?

I tried hacking the method "__ffmpegjs_toU8" in pre.js to not cast string files to Uint8Array but not getting any luck.

Basically I'm trying to run the following command to add subtitles to a mp4 file, but I'm getting "Invalid data found when processing input"

arguments: ["-i", "input.mp4", "-c", "copy", "-c:s", "english_subs.srt", "output.mp4"],

I'll try hacking away so more but thought I'd ask in case there's something I'm missing.

ERROR: libmp3lame >= 3.98.3 not found

I am getting the following error. After searching through existing issues, I've tried the following to build:

git clone
git submodule init && git submodule update

I have tried doing a make distclean ; ./configure inside the lame path, make build/lame/dist/lib/libmp3lame.so gives is up to date.

From doing a make mp4 for make webm:

--snip --
emmake make -j8 && \                                                                                                                                                                                                                                     
cp ffmpeg ffmpeg.bc                                                                                                                                                                                                                                      
Checking out files: 100% (5957/5957), done.                                                                                                                                                                                                              
HEAD is now at 4275b27 Update for 3.1.2                                                                                                                                                                                                                  
patching file libavutil/time.c                                                                                                                                                                                                                           
ERROR: libmp3lame >= 3.98.3 not found                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                         
If you think configure made a mistake, make sure you are using the latest                                                                                                                                                                                
version from Git.  If the latest version fails, report the problem to the                                                                                                                                                                                
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.                                                                                                                                                                                  
Include the log file "config.log" produced by configure as this will help                                                                                                                                                                                
solve the problem.                                                                                                                                                                                                                                       
ERROR    root: Configure step failed with non-zero return code 1! Command line: ['./configure', '--cc=emcc', '--enable-cross-compile', '--target-os=none', '--arch=x86', '--disable-runtime-cpudetect', '--disable-asm', '--disable-fast-unaligned', '--d
isable-pthreads', '--disable-w32threads', '--disable-os2threads', '--disable-debug', '--disable-stripping', '--disable-all', '--enable-ffmpeg', '--enable-avcodec', '--enable-avformat', '--enable-avutil', '--enable-swresample', '--enable-swscale', '-
-enable-avfilter', '--disable-network', '--disable-d3d11va', '--disable-dxva2', '--disable-vaapi', '--disable-vda', '--disable-vdpau', '--enable-decoder=vp8', '--enable-decoder=vp9', '--enable-decoder=theora', '--enable-decoder=mpeg2video', '--enabl
e-decoder=mpeg4', '--enable-decoder=h264', '--enable-decoder=hevc', '--enable-decoder=png', '--enable-decoder=mjpeg', '--enable-decoder=vorbis', '--enable-decoder=opus', '--enable-decoder=mp3', '--enable-decoder=ac3', '--enable-decoder=aac', '--enab
le-decoder=ass', '--enable-decoder=ssa', '--enable-decoder=srt', '--enable-decoder=webvtt', '--enable-demuxer=matroska', '--enable-demuxer=ogg', '--enable-demuxer=avi', '--enable-demuxer=mov', '--enable-demuxer=flv', '--enable-demuxer=mpegps', '--en
able-demuxer=image2', '--enable-demuxer=mp3', '--enable-demuxer=concat', '--enable-protocol=file', '--enable-filter=aresample', '--enable-filter=scale', '--enable-filter=crop', '--enable-filter=overlay', '--disable-bzlib', '--disable-iconv', '--disa
ble-libxcb', '--disable-lzma', '--disable-sdl', '--disable-securetransport', '--disable-xlib', '--disable-zlib', '--enable-encoder=libx264', '--enable-encoder=libmp3lame', '--enable-encoder=aac', '--enable-muxer=mp4', '--enable-muxer=mp3', '--enable
-muxer=null', '--enable-gpl', '--enable-libmp3lame', '--enable-libx264', '--extra-cflags=-I../lame/dist/include', '--extra-ldflags=-L../lame/dist/lib']                                                                                                  
Makefile:286: recipe for target 'build/ffmpeg-mp4/ffmpeg.bc' failed                                                                                                                                                                                      
make: *** [build/ffmpeg-mp4/ffmpeg.bc] Error 1

Compilation of fribidi fails because "C compiler can not create executables"

I tried to compile this library from source in a docker container but unfortunately it fails:

[..]
checking for /home/ffmpeg/emsdk-portable/emscripten/1.37.34/emcc.py-gcc... python
checking whether the C compiler works... no
configure: error: in `/home/ffmpeg/ffmpeg.js/build/fribidi':
configure: error: C compiler cannot create executables
See `config.log' for more details

I changed "CC" to "gcc" for fribidi and got it to compile - but it seems like GCC only outputs ".a" files instead of the required ".so" ones.
I then changed the Makefile to include the ".a" files instead of the ".so" files and got the ffmpeg.js libraries - but NodeJS fails to load the module with FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

Does anyone have a solution for this problem?

config.log:

ffmpeg@76e9fe3c1c7f:~/ffmpeg.js$ cat build/fribidi/config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU FriBidi configure 0.19.7, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ /home/ffmpeg/ffmpeg.js/build/fribidi/configure --enable-maintainer-mode --enable-compile-warnings CFLAGS=-O3 NM=llvm-nm --prefix=/home/ffmpeg/ffmpeg.js/build/fribidi/dist --disable-dependency-tracking --disable-debug --without-glib CC=python /home/ffmpeg/emsdk-portable/emscripten/1.37.34/emcc.py PKG_CONFIG_PATH= PKG_CONFIG_LIBDIR=/home/ffmpeg/emsdk-portable/emscripten/1.37.34/system/local/lib/pkgconfig:/home/ffmpeg/emsdk-portable/emscripten/1.37.34/system/lib/pkgconfig --no-create --no-recursion

## --------- ##
## Platform. ##
## --------- ##

hostname = 76e9fe3c1c7f
uname -m = x86_64
uname -r = 4.13.0-31-generic
uname -s = Linux
uname -v = #34~16.04.1-Ubuntu SMP Fri Jan 19 17:11:01 UTC 2018

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = x86_64
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /home/ffmpeg/emsdk-portable/emscripten/1.37.34/system/bin
PATH: /home/ffmpeg/emsdk-portable
PATH: /home/ffmpeg/emsdk-portable/clang/e1.37.34_64bit
PATH: /home/ffmpeg/emsdk-portable/node/8.9.1_64bit/bin
PATH: /home/ffmpeg/emsdk-portable/emscripten/1.37.34
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2512: checking for a BSD-compatible install
configure:2580: result: /usr/bin/install -c
configure:2591: checking whether build environment is sane
configure:2646: result: yes
configure:2797: checking for a thread-safe mkdir -p
configure:2836: result: /usr/bin/mkdir -p
configure:2843: checking for gawk
configure:2873: result: no
configure:2843: checking for mawk
configure:2859: found /usr/bin/mawk
configure:2870: result: mawk
configure:2881: checking whether make sets $(MAKE)
configure:2903: result: yes
configure:2932: checking whether make supports nested variables
configure:2949: result: yes
configure:3077: checking whether make supports nested variables
configure:3094: result: yes
configure:3118: checking for style of include used by make
configure:3146: result: GNU
configure:3177: checking for /home/ffmpeg/emsdk-portable/emscripten/1.37.34/emcc.py-gcc
configure:3204: result: python
configure:3473: checking for C compiler version
configure:3482: python --version >&5
Python 2.7.14+
configure:3493: $? = 0
configure:3482: python -v >&5
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/lib/python2.7/site.pyc matches /usr/lib/python2.7/site.py
import site # precompiled from /usr/lib/python2.7/site.pyc
# /usr/lib/python2.7/os.pyc matches /usr/lib/python2.7/os.py
import os # precompiled from /usr/lib/python2.7/os.pyc
import errno # builtin
import posix # builtin
# /usr/lib/python2.7/posixpath.pyc matches /usr/lib/python2.7/posixpath.py
... rest of stderr output deleted ...
configure:3493: $? = 0
configure:3482: python -V >&5
Python 2.7.14+
configure:3493: $? = 0
configure:3482: python -qversion >&5
Unknown option: -q
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
configure:3493: $? = 2
configure:3513: checking whether the C compiler works
configure:3535: python -O3   conftest.c  >&5
  File "conftest.c", line 1
    /* confdefs.h */
    ^
SyntaxError: invalid syntax
configure:3539: $? = 1
configure:3577: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU FriBidi"
| #define PACKAGE_TARNAME "fribidi"
| #define PACKAGE_VERSION "0.19.7"
| #define PACKAGE_STRING "GNU FriBidi 0.19.7"
| #define PACKAGE_BUGREPORT "http://bugs.freedesktop.org/enter_bug.cgi?product=fribidi"
| #define PACKAGE_URL "http://fribidi.org/"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3582: error: in `/home/ffmpeg/ffmpeg.js/build/fribidi':
configure:3584: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CC_set=set
ac_cv_env_CC_value=python
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value=-O3
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_GLIB_CFLAGS_set=
ac_cv_env_GLIB_CFLAGS_value=
ac_cv_env_GLIB_LIBS_set=
ac_cv_env_GLIB_LIBS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LT_SYS_LIBRARY_PATH_set=
ac_cv_env_LT_SYS_LIBRARY_PATH_value=
ac_cv_env_PKG_CONFIG_LIBDIR_set=set
ac_cv_env_PKG_CONFIG_LIBDIR_value=/home/ffmpeg/emsdk-portable/emscripten/1.37.34/system/local/lib/pkgconfig:/home/ffmpeg/emsdk-portable/emscripten/1.37.34/system/lib/pkgconfig
ac_cv_env_PKG_CONFIG_PATH_set=set
ac_cv_env_PKG_CONFIG_PATH_value=
ac_cv_env_PKG_CONFIG_set=
ac_cv_env_PKG_CONFIG_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=/home/ffmpeg/emsdk-portable/emscripten/1.37.34/emcc.py
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=/home/ffmpeg/emsdk-portable/emscripten/1.37.34/emcc.py
ac_cv_env_target_alias_set=set
ac_cv_env_target_alias_value=/home/ffmpeg/emsdk-portable/emscripten/1.37.34/emcc.py
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/usr/bin/mkdir
ac_cv_prog_AWK=mawk
ac_cv_prog_CC=python
ac_cv_prog_make_make_set=yes
am_cv_make_support_nested_variables=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /home/ffmpeg/ffmpeg.js/build/fribidi/missing aclocal-1.15'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE='#'
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='0'
AM_V='$(V)'
AR='python /home/ffmpeg/emsdk-portable/emscripten/1.37.34/emar.py'
AUTOCONF='${SHELL} /home/ffmpeg/ffmpeg.js/build/fribidi/missing autoconf'
AUTOHEADER='${SHELL} /home/ffmpeg/ffmpeg.js/build/fribidi/missing autoheader'
AUTOMAKE='${SHELL} /home/ffmpeg/ffmpeg.js/build/fribidi/missing automake-1.15'
AWK='mawk'
CC='python'
CCDEPMODE=''
CFLAGS='-O3'
CPP=''
CPPFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR='.deps'
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
FGREP=''
FRIBIDI_BINARY_AGE=''
FRIBIDI_CHARSETS=''
FRIBIDI_CHARSETS_FALSE=''
FRIBIDI_CHARSETS_TRUE=''
FRIBIDI_INTERFACE_AGE=''
FRIBIDI_INTERFACE_VERSION=''
FRIBIDI_MAJOR_VERSION=''
FRIBIDI_MICRO_VERSION=''
FRIBIDI_MINOR_VERSION=''
FRIBIDI_NO_DEPRECATED=''
FRIBIDI_USE_GLIB=''
FRIBIDI_USE_GLIB_FALSE=''
FRIBIDI_USE_GLIB_TRUE=''
FRIBIDI_VERSION=''
GLIB_CFLAGS=''
GLIB_LIBS=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD='python /home/ffmpeg/emsdk-portable/emscripten/1.37.34/emcc.py'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
LT_CURRENT_MINUS_AGE=''
LT_SYS_LIBRARY_PATH=''
LT_VERSION_INFO=''
MAKEINFO='${SHELL} /home/ffmpeg/ffmpeg.js/build/fribidi/missing makeinfo'
MANIFEST_TOOL=''
MISC_CFLAGS=''
MISC_LIBS=''
MISC_PACKAGES=''
MKDIR_P='/usr/bin/mkdir -p'
NM='llvm-nm'
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OS_WIN32_FALSE=''
OS_WIN32_TRUE=''
OTOOL64=''
OTOOL=''
PACKAGE='fribidi'
PACKAGE_BUGREPORT='http://bugs.freedesktop.org/enter_bug.cgi?product=fribidi'
PACKAGE_NAME='GNU FriBidi'
PACKAGE_STRING='GNU FriBidi 0.19.7'
PACKAGE_TARNAME='fribidi'
PACKAGE_URL='http://fribidi.org/'
PACKAGE_VERSION='0.19.7'
PATH_SEPARATOR=':'
PKG_CONFIG=''
PKG_CONFIG_LIBDIR='/home/ffmpeg/emsdk-portable/emscripten/1.37.34/system/local/lib/pkgconfig:/home/ffmpeg/emsdk-portable/emscripten/1.37.34/system/lib/pkgconfig'
PKG_CONFIG_PATH=''
PLATFORM_WIN32_FALSE=''
PLATFORM_WIN32_TRUE=''
RANLIB='/home/ffmpeg/emsdk-portable/emscripten/1.37.34/emranlib'
SED=''
SET_MAKE=''
SHELL='/bin/bash'
SIZEOF_INT=''
STRIP=''
VERSION='0.19.7'
ac_ct_AR=''
ac_ct_CC=''
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include='include'
am__isrc=''
am__leading_dot='.'
am__nodep=''
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build='/home/ffmpeg/emsdk-portable/emscripten/1.37.34/emcc.py'
build_alias='/home/ffmpeg/emsdk-portable/emscripten/1.37.34/emcc.py'
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='/home/ffmpeg/emsdk-portable/emscripten/1.37.34/emcc.py'
host_alias='/home/ffmpeg/emsdk-portable/emscripten/1.37.34/emcc.py'
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /home/ffmpeg/ffmpeg.js/build/fribidi/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/home/ffmpeg/ffmpeg.js/build/fribidi/dist'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias='/home/ffmpeg/emsdk-portable/emscripten/1.37.34/emcc.py'

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "GNU FriBidi"
#define PACKAGE_TARNAME "fribidi"
#define PACKAGE_VERSION "0.19.7"
#define PACKAGE_STRING "GNU FriBidi 0.19.7"
#define PACKAGE_BUGREPORT "http://bugs.freedesktop.org/enter_bug.cgi?product=fribidi"
#define PACKAGE_URL "http://fribidi.org/"

configure: exit 77

web worker no output

Hello,

I have to convert a bunch (right now 120 frames =4s of video) of image files (jpeg : 1024*576) to a video (mp4). This library seems the perfect match for me as I prefer to do everything on client side, and despite the lack of examples, thanks to some issues posted by people before me, I could figure out a bit how the lib works.

However, my first concern is that while rendering the first frame I reached immediately the error "Cannot enlarge memory arrays". Thanks to this issue (#9), I tried to set 128 - same problem (I can handle 2 frame and then have the issue). I set 256 and seems it works for the ~120 frames. However, I am just wondering if the memory is dependant from the number of the frame. Indeed, I wish to manage more than 4s of video (let's set a target of 5 minutes for example) and wondering if it will be possible or not at all to handle around ~10k frames with the same amount of memory (256) as I am really afraid to make all the work using this lib and finally figure out that 5minutes is impossible to convert.

The second issue which is linked to this issue title is that I don't understand how to get the result of the files.

My code:

		var stdout = "";
		var stderr = "";
		var worker = new Worker("ffmpeg-worker-mp4.js");
		worker.onmessage = function(e) {
		  var msg = e.data;
		  switch (msg.type) {
		  case "ready":
			worker.postMessage({
				type: "run",   
				MEMFS: imagesToRender, 
				TOTAL_MEMORY: 256 * 1024 * 1024,
				arguments: ["-i", "img_%d.jpg", "output.mp4"]
			});
			break;
		  case "stdout":
			document.getElementById('ffmpeg').innerHTML += "<div>" + msg.data +"</div>";
			break;
		  case "stderr":
		  	document.getElementById('ffmpeg').innerHTML += "<div>" + msg.data +"</div>";
			break;
		  case "exit":
			console.log("Process exited with code " + msg.data);
			console.log(stdout);
			worker.terminate();
			break;
		  }
		};

The output is the following (what is strange is that is printed throught stderr and not stdout):

ffmpeg version n3.1.2 Copyright (c) 2000-2016 the FFmpeg developers
built with emcc (Emscripten gcc/clang-like replacement) 1.36.7 ()
configuration: --cc=emcc --enable-cross-compile --target-os=none --arch=x86 --disable-runtime-cpudetect --disable-asm --disable-fast-unaligned --disable-pthreads --disable-w32threads --disable-os2threads --disable-debug --disable-stripping --disable-all --enable-ffmpeg --enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale --enable-avfilter --disable-network --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --enable-decoder=vp8 --enable-decoder=vp9 --enable-decoder=theora --enable-decoder=mpeg2video --enable-decoder=mpeg4 --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=png --enable-decoder=mjpeg --enable-decoder=vorbis --enable-decoder=opus --enable-decoder=mp3 --enable-decoder=ac3 --enable-decoder=aac --enable-decoder=ass --enable-decoder=ssa --enable-decoder=srt --enable-decoder=webvtt --enable-demuxer=matroska --enable-demuxer=ogg --enable-demuxer=avi --enable-demuxer=mov --enable-demuxer=flv --enable-demuxer=mpegps --enable-demuxer=image2 --enable-demuxer=mp3 --enable-demuxer=concat --enable-protocol=file --enable-filter=aresample --enable-filter=scale --enable-filter=crop --enable-filter=overlay --disable-bzlib --disable-iconv --disable-libxcb --disable-lzma --disable-sdl --disable-securetransport --disable-xlib --disable-zlib --enable-encoder=libx264 --enable-encoder=libmp3lame --enable-encoder=aac --enable-muxer=mp4 --enable-muxer=mp3 --enable-muxer=null --enable-gpl --enable-libmp3lame --enable-libx264 --extra-cflags=-I../lame/dist/include --extra-ldflags=-L../lame/dist/lib
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
[mjpeg @ 0x80a580] Warning: not compiled with thread support, using thread emulation
Input #0, image2, from 'img_%d.jpg':
Duration: 00:00:04.72, start: 0.000000, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 1024x576 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
No pixel format specified, yuvj444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[mjpeg @ 0x80ab00] Warning: not compiled with thread support, using thread emulation
[libx264 @ 0x80c840] Warning: not compiled with thread support, using thread emulation
[libx264 @ 0x80c840] using SAR=1/1
[libx264 @ 0x80c840] using cpu capabilities: none!
[libx264 @ 0x80c840] profile High 4:4:4 Predictive, level 3.1, 4:4:4 8-bit
[libx264 @ 0x80c840] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mp4 @ 0x80b6e0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, mp4, to 'output.mp4':
Metadata:
encoder : Lavf57.41.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuvj444p(pc), 1024x576 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:
encoder : Lavc57.48.101 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 17 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 38 fps= 37 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 43 fps= 11 q=29.0 size= 92kB time=-00:00:00.03 bitrate=N/A speed=N/A
frame= 44 fps=9.6 q=29.0 size= 93kB time=00:00:00.00 bitrate=9802871.8kbits/s speed=1.7e-05x
frame= 46 fps=8.5 q=29.0 size= 115kB time=00:00:00.08 bitrate=11751.7kbits/s speed=0.0148x
frame= 47 fps=7.1 q=29.0 size= 117kB time=00:00:00.12 bitrate=8004.9kbits/s speed=0.018x
frame= 48 fps=6.4 q=29.0 size= 117kB time=00:00:00.16 bitrate=6008.3kbits/s speed=0.0214x
frame= 50 fps=6.0 q=29.0 size= 135kB time=00:00:00.24 bitrate=4613.3kbits/s speed=0.0287x
frame= 51 fps=5.3 q=29.0 size= 137kB time=00:00:00.28 bitrate=4008.6kbits/s speed=0.0293x
frame= 52 fps=5.1 q=29.0 size= 137kB time=00:00:00.32 bitrate=3510.0kbits/s speed=0.0313x
frame= 54 fps=4.9 q=29.0 size= 155kB time=00:00:00.40 bitrate=3172.7kbits/s speed=0.0361x
frame= 55 fps=4.6 q=29.0 size= 156kB time=00:00:00.44 bitrate=2910.3kbits/s speed=0.0364x
frame= 56 fps=4.4 q=29.0 size= 156kB time=00:00:00.48 bitrate=2669.1kbits/s speed=0.0377x
frame= 58 fps=4.3 q=29.0 size= 175kB time=00:00:00.56 bitrate=2564.6kbits/s speed=0.0418x
frame= 59 fps=4.1 q=29.0 size= 178kB time=00:00:00.60 bitrate=2429.7kbits/s speed=0.0415x
frame= 60 fps=3.9 q=29.0 size= 179kB time=00:00:00.64 bitrate=2296.2kbits/s speed=0.042x
frame= 61 fps=3.9 q=29.0 size= 179kB time=00:00:00.68 bitrate=2161.5kbits/s speed=0.043x
frame= 63 fps=3.7 q=29.0 size= 199kB time=00:00:00.76 bitrate=2145.6kbits/s speed=0.0443x
frame= 64 fps=3.6 q=29.0 size= 201kB time=00:00:00.80 bitrate=2057.2kbits/s speed=0.0448x
frame= 65 fps=3.5 q=29.0 size= 202kB time=00:00:00.84 bitrate=1971.9kbits/s speed=0.0455x
frame= 66 fps=3.5 q=29.0 size= 226kB time=00:00:00.88 bitrate=2106.2kbits/s speed=0.0463x
frame= 67 fps=3.3 q=29.0 size= 230kB time=00:00:00.92 bitrate=2048.9kbits/s speed=0.0457x
frame= 68 fps=3.2 q=29.0 size= 232kB time=00:00:00.96 bitrate=1976.9kbits/s speed=0.0458x
frame= 69 fps=3.2 q=29.0 size= 233kB time=00:00:01.00 bitrate=1911.4kbits/s speed=0.0465x
frame= 70 fps=3.2 q=29.0 size= 256kB time=00:00:01.04 bitrate=2016.1kbits/s speed=0.047x
frame= 71 fps=3.1 q=29.0 size= 260kB time=00:00:01.08 bitrate=1975.6kbits/s speed=0.0466x
frame= 72 fps=3.0 q=29.0 size= 261kB time=00:00:01.12 bitrate=1905.5kbits/s speed=0.0467x
frame= 74 fps=3.0 q=29.0 size= 300kB time=00:00:01.20 bitrate=2047.9kbits/s speed=0.048x
frame= 75 fps=2.9 q=29.0 size= 305kB time=00:00:01.24 bitrate=2014.5kbits/s speed=0.0474x
frame= 76 fps=2.8 q=29.0 size= 307kB time=00:00:01.28 bitrate=1966.8kbits/s speed=0.0473x
frame= 77 fps=2.8 q=29.0 size= 310kB time=00:00:01.32 bitrate=1921.0kbits/s speed=0.0477x
frame= 78 fps=2.8 q=29.0 size= 351kB time=00:00:01.36 bitrate=2111.2kbits/s speed=0.0481x
frame= 79 fps=2.7 q=29.0 size= 355kB time=00:00:01.40 bitrate=2079.5kbits/s speed=0.0475x
frame= 80 fps=2.6 q=29.0 size= 358kB time=00:00:01.44 bitrate=2035.8kbits/s speed=0.0475x
frame= 81 fps=2.6 q=29.0 size= 361kB time=00:00:01.48 bitrate=1996.8kbits/s speed=0.0479x
frame= 82 fps=2.6 q=29.0 size= 415kB time=00:00:01.52 bitrate=2234.2kbits/s speed=0.0481x
frame= 83 fps=2.5 q=29.0 size= 420kB time=00:00:01.56 bitrate=2206.9kbits/s speed=0.0476x
frame= 84 fps=2.5 q=29.0 size= 423kB time=00:00:01.60 bitrate=2166.8kbits/s speed=0.0476x
frame= 85 fps=2.5 q=29.0 size= 423kB time=00:00:01.64 bitrate=2114.3kbits/s speed=0.0477x
frame= 87 fps=2.4 q=29.0 size= 489kB time=00:00:01.72 bitrate=2330.9kbits/s speed=0.0479x
frame= 88 fps=2.4 q=29.0 size= 492kB time=00:00:01.76 bitrate=2290.6kbits/s speed=0.0479x
frame= 89 fps=2.4 q=29.0 size= 494kB time=00:00:01.80 bitrate=2248.3kbits/s speed=0.048x
frame= 90 fps=2.4 q=29.0 size= 497kB time=00:00:01.84 bitrate=2212.9kbits/s speed=0.0483x
frame= 92 fps=2.4 q=29.0 size= 498kB time=00:00:01.92 bitrate=2122.6kbits/s speed=0.0493x
frame= 94 fps=2.4 q=29.0 size= 501kB time=00:00:02.00 bitrate=2050.7kbits/s speed=0.0504x
frame= 96 fps=2.4 q=29.0 size= 501kB time=00:00:02.08 bitrate=1973.3kbits/s speed=0.0513x
frame= 98 fps=2.4 q=29.0 size= 504kB time=00:00:02.16 bitrate=1911.8kbits/s speed=0.0525x
frame= 100 fps=2.4 q=29.0 size= 505kB time=00:00:02.24 bitrate=1845.3kbits/s speed=0.0533x
frame= 102 fps=2.4 q=29.0 size= 507kB time=00:00:02.32 bitrate=1791.5kbits/s speed=0.0544x
frame= 103 fps=2.4 q=29.0 size= 508kB time=00:00:02.36 bitrate=1762.8kbits/s speed=0.0546x
frame= 104 fps=2.4 q=29.0 size= 508kB time=00:00:02.40 bitrate=1733.8kbits/s speed=0.0549x
frame= 106 fps=2.4 q=29.0 size= 511kB time=00:00:02.48 bitrate=1687.5kbits/s speed=0.0557x
frame= 107 fps=2.4 q=29.0 size= 511kB time=00:00:02.52 bitrate=1662.3kbits/s speed=0.056x
frame= 109 fps=2.4 q=29.0 size= 512kB time=00:00:02.60 bitrate=1612.0kbits/s speed=0.0566x
frame= 111 fps=2.4 q=29.0 size= 514kB time=00:00:02.68 bitrate=1570.4kbits/s speed=0.0571x
frame= 113 fps=2.4 q=29.0 size= 514kB time=00:00:02.76 bitrate=1525.3kbits/s speed=0.0577x
frame= 115 fps=2.4 q=29.0 size= 515kB time=00:00:02.84 bitrate=1486.6kbits/s speed=0.0585x
frame= 117 fps=2.4 q=29.0 size= 516kB time=00:00:02.92 bitrate=1446.3kbits/s speed=0.0593x
frame= 118 fps=2.4 q=29.0 size= 517kB time=00:00:02.96 bitrate=1429.7kbits/s speed=0.0593x
frame= 118 fps=1.9 q=29.0 Lsize= 533kB time=00:00:04.60 bitrate= 948.8kbits/s speed=0.0745x
video:531kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.413379%
[libx264 @ 0x80c840] frame I:1 Avg QP:22.83 size: 83035
[libx264 @ 0x80c840] frame P:30 Avg QP:22.12 size: 12666
[libx264 @ 0x80c840] frame B:87 Avg QP:28.55 size: 915
[libx264 @ 0x80c840] consecutive B-frames: 0.8% 1.7% 2.5% 94.9%
[libx264 @ 0x80c840] mb I I16..4: 0.7% 87.9% 11.4%
[libx264 @ 0x80c840] mb P I16..4: 0.1% 1.6% 0.6% P16..4: 11.8% 17.1% 12.6% 0.0% 0.0% skip:56.2%
[libx264 @ 0x80c840] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 20.5% 2.3% 0.2% direct: 0.2% skip:76.8% L0:38.9% L1:56.6% BI: 4.5%
[libx264 @ 0x80c840] 8x8 transform intra:80.4% inter:70.1%
[libx264 @ 0x80c840] coded y,u,v intra: 99.3% 37.2% 32.2% inter: 7.4% 0.5% 0.4%
[libx264 @ 0x80c840] i16 v,h,dc,p: 23% 62% 5% 11%
[libx264 @ 0x80c840] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 9% 47% 11% 4% 4% 3% 7% 4% 12%
[libx264 @ 0x80c840] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 39% 9% 5% 6% 4% 9% 4% 12%
[libx264 @ 0x80c840] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x80c840] ref P L0: 79.5% 15.2% 3.6% 1.7%
[libx264 @ 0x80c840] ref B L0: 89.5% 10.0% 0.6%
[libx264 @ 0x80c840] ref B L1: 91.2% 8.8%
[libx264 @ 0x80c840] kb/s:919.75

and after the conversion, the software execute the exit code 0 (should be ok) but without any data in msg.data (it's empty). I got nothing from stdout. I also try with different args like arguments: ["-i", "img_%d.jpg", "-an", "output.mp4"] but same issue.

Thanks for your help.

WebAssembly build

What about compiling FFMPEG to WebAssembly?

There are experimental native WebAssembly implementations for Google Chrome, Mozilla Firefox, Microsoft Edge and Apple Safari.

Libraries have .dylib extension instead of .so on Mac

I've tried building the library with a freshly cloned repository and submodules, but make fails with the errors

WARNING: Option --enable-demuxer=mpeg did not match anything
CC  libavfilter/vf_subtitles.o
CC  libavcodec/libopusenc.o
CC  libavcodec/libopus.o
CC  libavcodec/libvpxenc.o
CC  libavcodec/mpeg12data.o
CC  libavcodec/mpeg12dec.o
CC  libavcodec/mpeg4audio.o
CC  libavcodec/mpeg4video.o
libavcodec/libvpxenc.c:107:6: error: use of undeclared identifier 'VP8E_UPD_ENTROPY'
    [VP8E_UPD_ENTROPY]           = "VP8E_UPD_ENTROPY",
     ^
libavcodec/libvpxenc.c:108:6: error: use of undeclared identifier 'VP8E_UPD_REFERENCE'
    [VP8E_UPD_REFERENCE]         = "VP8E_UPD_REFERENCE",
     ^
libavcodec/libvpxenc.c:109:6: error: use of undeclared identifier 'VP8E_USE_REFERENCE'; did you mean 'VP8_SET_REFERENCE'?
    [VP8E_USE_REFERENCE]         = "VP8E_USE_REFERENCE",
     ^~~~~~~~~~~~~~~~~~
     VP8_SET_REFERENCE
../libvpx/dist/include/vpx/./vp8.h:45:3: note: 'VP8_SET_REFERENCE' declared here
  VP8_SET_REFERENCE           = 1,    /**< pass in an external frame into decoder to be used as reference frame */
  ^
CC  libavcodec/mpeg4video_parser.o
3 errors generated.
ERROR:root:compiler frontend failed to generate LLVM bitcode, halting
make[1]: *** [libavcodec/libvpxenc.o] Error 1

Cannot combine video & audio

Using the ffmpeg-worker-mp4.js

mp4 and mp3 can be encoded separately. But together with this command the audio on the mp4 is silent.

/*arguments: [
                "-i",
                "/data/input.webm", //blob webm
                "-i",
                `/data/sound${AUDIO_EXP}`, //blob webm/opus
                "-map",
                "0:v",
                "-map",
                "1:a",
                "-c:v",
                "libx264",
                "-c:a",
                "libmp3lame",
                "-t",
                "3",
                "output.mp4",
              ],

Oddly, if I extract audio from the 'output.mp4' to an mp3 it's there!

Note: Instead of two inputs, I've tried with a video/audio blob from 'MediaRecorder' API with same issue.

But! The video has sound in a <video> tag. Only no sound in VLC, finder, quicktime...

Maybe there are some arguments missing to 'lock it down' from the picky media players?

Thanks!

Invalid data found when processing input (WAV)

I don't think this is related with #4 .

When I run -i test.wav, I get test.wav: Invalid data found when processing input. I tested first with ffmpeg-worker-mp4.js, because my goal is to be able to do -i test.wav -acodec libmp3lame output.mp3, but the same error occurs with ffmpeg-worker-webm.js.

This is the build info for ffmpeg-worker.mp4.js

ffmpeg version n3.1.2 Copyright (c) 2000-2016 the FFmpeg developers
  built with emcc (Emscripten gcc/clang-like replacement) 1.36.7 ()
  configuration: --cc=emcc --enable-cross-compile --target-os=none --arch=x86 --disable-runtime-cpudetect --disable-asm --disable-fast-unaligned --disable-pthreads --disable-w32threads --disable-os2threads --disable-debug --disable-stripping --disable-all --enable-ffmpeg --enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale --enable-avfilter --disable-network --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --enable-decoder=vp8 --enable-decoder=vp9 --enable-decoder=theora --enable-decoder=mpeg2video --enable-decoder=mpeg4 --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=png --enable-decoder=mjpeg --enable-decoder=vorbis --enable-decoder=opus --enable-decoder=mp3 --enable-decoder=ac3 --enable-decoder=aac --enable-decoder=ass --enable-decoder=ssa --enable-decoder=srt --enable-decoder=webvtt --enable-demuxer=matroska --enable-demuxer=ogg --enable-demuxer=avi --enable-demuxer=mov --enable-demuxer=flv --enable-demuxer=mpegps --enable-demuxer=image2 --enable-demuxer=mp3 --enable-demuxer=concat --enable-protocol=file --enable-filter=aresample --enable-filter=scale --enable-filter=crop --enable-filter=overlay --disable-bzlib --disable-iconv --disable-libxcb --disable-lzma --disable-sdl --disable-securetransport --disable-xlib --disable-zlib --enable-encoder=libx264 --enable-encoder=libmp3lame --enable-encoder=aac --enable-muxer=mp4 --enable-muxer=mp3 --enable-muxer=null --enable-gpl --enable-libmp3lame --enable-libx264 --extra-cflags=-I../lame/dist/include --extra-ldflags=-L../lame/dist/lib
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavfilter     6. 47.100 /  6. 47.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100

The data is a valid ArrayBuffer that I get when passing an AudioBuffer to audiobuffer-to-wav. The AudioBuffer is the result of OfflineAudioContext.startRendering. The data is a valid wav file as if I download it, it plays fine in iTunes and VLC, so I don't know how the data could be invalid.

Any idea why this bug occurs?

Edit

Note that it doesn't work either if I directly get an array buffer of one of the channels of the AudioBuffer: AudioBuffer.getChannelData(0), so the error doesn't come from the audiobuffer-to-wav lib.

Web demo like videoconveter.js

Hi there,
Thanks for this I just discovered this because I was having trouble with videoconverter.js. Using videoconverter.js I was able to succesfully convert webm to gif, and mp4 (no audio).

However I had one more need, that was to convert webm to mp4 WITH audio. And videoconverter.js could not do this as it needs an update - bgrins/videoconverter.js#49 (comment)

I came across your ffmpeg.js from this - bgrins/videoconverter.js#30 (comment)

I was wondering if you had a demo of how I can use this my open source website?
Does your version support:

  • webm to gif
  • webm to mp4 without audio
  • webm to mp4 with audio

I cannot find the builds like seen here - https://github.com/bgrins/videoconverter.js/tree/master/build - from here i impoted ffmpeg-all-codecs.js to my website and use it from a worker. Do you have same for our version of ffmpeg.js?

Thanks for your incredible effort!

Add aac encoder

FFmpeg's internal AAC encoder was recently improved, it may be good idea to include it to the MP4 build with the next FFmpeg's release.

Also, WAV encoder/muxer was requested, it shouldn't increase build size too much so we may include it too.

Invalid data found when processing input (MP3)

I'm having issues with a certain MP3 file reporting the following error with both ffmpeg-worker-mp4.js and ffmpeg-worker-webm.js. I've also ran it against the test.webm file included in the test directory which works fine.

ffmpeg version n2.8.1 Copyright (c) 2000-2015 the FFmpeg developers
  built with emcc (Emscripten gcc/clang-like replacement) 1.35.2 (commit 58aebef6b4de259dca37fc6f442207f8252613e2)
  configuration: --cc=emcc --enable-cross-compile --target-os=none --arch=x86 --disable-runtime-cpudetect --disable-asm --disable-fast-unaligned --disable-pthreads --disable-w32threads --disable-os2threads --disable-debug --disable-stripping --disable-all --enable-ffmpeg --enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale --enable-avfilter --disable-network --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --enable-decoder=vp8 --enable-decoder=vp9 --enable-decoder=theora --enable-decoder=vorbis --enable-decoder=opus --enable-decoder=mpeg2video --enable-decoder=mpeg4 --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=mp3 --enable-decoder=ac3 --enable-decoder=aac --enable-decoder=ass --enable-decoder=ssa --enable-decoder=srt --enable-decoder=webvtt --enable-demuxer=matroska --enable-demuxer=ogg --enable-demuxer=avi --enable-demuxer=mov --enable-demuxer=flv --enable-demuxer=mpegvideo --enable-demuxer=concat --enable-protocol=file --enable-filter=aresample --enable-filter=scale --enable-filter=crop --disable-bzlib --disable-iconv --disable-libxcb --disable-lzma --disable-sdl --disable-securetransport --disable-xlib --disable-zlib --enable-encoder=libx264 --enable-encoder=libmp3lame --enable-muxer=mp4 --enable-muxer=mp3 --enable-muxer=null --enable-gpl --enable-libmp3lame --enable-libx264 --extra-cflags=-I../lame/dist/include --extra-ldflags=-L../lame/dist/lib
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavfilter     5. 40.101 /  5. 40.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
test.mp3: Invalid data found when processing input

Running ffmpeg -i on the file locally outputs the following

ffmpeg version 2.7.2 Copyright (c) 2000-2015 the FFmpeg developers
  built with Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.7.2_1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libfreetype --enable-libvorbis --enable-libvpx --enable-libass --enable-ffplay --enable-libfdk-aac --enable-libopus --enable-libquvi --enable-libx265 --enable-nonfree --enable-vda
  libavutil      54. 27.100 / 54. 27.100
  libavcodec     56. 41.100 / 56. 41.100
  libavformat    56. 36.100 / 56. 36.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 16.101 /  5. 16.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
  libpostproc    53.  3.100 / 53.  3.100
[mp3 @ 0x7ff518822e00] Skipping 0 bytes of junk at 81591.
Input #0, mp3, from 'podcast.mp3':
  Metadata:
    TSS             : Logic 10.1.1
    comment         : Adam Buxton talks to Louis Theroux about holiday buffet etiquette, then checks in briefly with BaaadDad (Adam's father Nigel) to get his facts straight.
    description     : Adam Buxton talks to Louis Theroux about holiday buffet etiquette, then checks in briefly with BaaadDad (Adam's father Nigel) to get his facts straight.
    artist          : Adam Buxton
    title           : EP.1 - 'HOLIDAY BUFFET' WITH LOUIS THEROUX
    date            : 20150915
    purl            : http://soundcloud.com/adam-buxton/the-adam-buxton-podcast-ep1-holiday-buffet-with-louis-theroux
    encoder         : Lavf56.36.100
  Duration: 00:32:46.68, start: 0.011995, bitrate: 263 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 263 kb/s
    Metadata:
      encoder         : Lavf
    Stream #0:1: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 500x500 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
    Metadata:
      title           : "Album cover"
      comment         : Other

Worker and MEMFS

Is is possible to pass MEMFS into a worker instance? If not, then how do you pass input data?

Wiki and guides

I am the new beginner to use ffmpeg.js for about one week. It is really wonderful work!

However, It is not very easy for beginners to handle and I have met a lot of pitfalls when I convert video to images using that.

I think a detailed wiki is needed or we can add more examples to the README. Thanks for consideration!

Compilation fails on Mac OSX

I am getting this error when compiling on Mac OSX.

3 warnings generated.
45 warnings generated.
CC ffmpeg_filter.o
AR libavfilter/libavfilter.a
AR libavformat/libavformat.a
fatal error: /Library/Developer/CommandLineTools/usr/bin/ar: fatal error in /Library/Developer/CommandLineTools/usr/bin/ranlib
make[1]: *** [libavfilter/libavfilter.a] Error 1
make[1]: *** Waiting for unfinished jobs....
fatal error: /Library/Developer/CommandLineTools/usr/bin/ar: fatal error in /Library/Developer/CommandLineTools/usr/bin/ranlib
make[1]: *** [libavformat/libavformat.a] Error 1

I've tried reinstalling the commandline developer tools. I'm not sure how to go about solving this. Any thoughts?

Unrecognized option 'rtsp_transport'

Is the argument 'rtsp_transport' not supported here? The same arguments works on standard ffmpeg but not in ffmpeg.js.
https://ffmpeg.org/ffmpeg-protocols.html#rtsp

Here are what i am used and it will show Unrecognized option 'rtsp_transport' on printError.

arguments: ["-rtsp_transport", "tcp", "-i", "rtsp://ownaddress/live.sdp", '-f', 'mpeg1video', '-b:v', '800k', '-r', '30', '-']

ffmpeg version n3.1.2

Video to images not working

Hello! Fascinating work on this project.

For my use case, I am attempting to convert a video to a sequence of images using this command:

ffmpeg -i movie.mp4 -vf fps=25 -q:v 1 -f image2 $filename%03d.jpg

which runs fine on the command line. Unfortunately, when I run it in the browser, I get the error Requested output format 'image2' is not a suitable output format. I checked the Makefile and it includes image2 (https://github.com/Kagami/ffmpeg.js/blob/master/Makefile#L10), so I am at a loss. Maybe there is a missing compiler flag or similar so I will keep investigating. I thought you may be able to shed some light on the issue.

Here is my code (using ffmpeg-mp4.js#3.1.9001):

var res = ffmpeg({
    MEMFS: blobs.map((data, i) => ({name: 'movie.mp4', data})),
    stdin: function() {},
     arguments: ["-i", "movie.mp4", "-vf", "fps=25", "-q:v", "1", "-f", "image2", "$filename%03d.jpg"],
});

PNG files to MP4

Hello!

I am trying to figure out how to create a video from PNGs. If I use the same console arguments it doesnt work with the ffmpeg-mp4.js. Could you please clarify me about how to include the PNG feature in the JS compilation? Do you have some workaround(convert to another supported image file)? Thanks.

I add the PNG data using the pngjs this way:

var blobs = [];
for(...){
var png = new Png({width:series.images[i].getCols(), height:series.images[i].getRows()});
png.data = rainbow;
var buff = Png.sync.write(png);
blobs.push({ name: "rainbow"+zeroPad(i,3)+".png", data: buff});
}

And I call the ffmpeg.js this way:

var result = ffmpeg({
  MEMFS: blobs,
  arguments: ["-i", "rainbow%03d.png", "-c:v", "libx264", "-pix_fmt", "yuv420p", "outputhsvh264_420.mp4"],
  stdin: function() {},
});

Here is the output differences between the js and the console version:

ffmpeg version n3.1.2 Copyright (c) 2000-2016 the FFmpeg developers
  built with emcc (Emscripten gcc/clang-like replacement) 1.36.0 (commit 07b87426f898d6e9c677db291d9088c839197291)
  configuration: --cc=emcc --enable-cross-compile --target-os=none --arch=x86 --disable-runtime-cpudetect --disable-asm --disable-fast-unaligned --disable-pthreads --disable-w32threads --disable-os2threads --disable-debug --disable-stripping --disable-all --enable-ffmpeg --enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale --enable-avfilter --disable-network --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --enable-decoder=vp8 --enable-decoder=vp9 --enable-decoder=theora --enable-decoder=mpeg2video --enable-decoder=mpeg4 --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=png --enable-decoder=mjpeg --enable-decoder=vorbis --enable-decoder=opus --enable-decoder=mp3 --enable-decoder=ac3 --enable-decoder=aac --enable-decoder=ass --enable-decoder=ssa --enable-decoder=srt --enable-decoder=webvtt --enable-demuxer=matroska --enable-demuxer=ogg --enable-demuxer=avi --enable-demuxer=mov --enable-demuxer=flv --enable-demuxer=mpegps --enable-demuxer=image2 --enable-demuxer=mp3 --enable-demuxer=concat --enable-protocol=file --enable-filter=aresample --enable-filter=scale --enable-filter=crop --disable-bzlib --disable-iconv --disable-libxcb --disable-lzma --disable-sdl --disable-securetransport --disable-xlib --disable-zlib --enable-encoder=libx264 --enable-encoder=libmp3lame --enable-encoder=aac --enable-muxer=mp4 --enable-muxer=mp3 --enable-muxer=null --enable-gpl --enable-libmp3lame --enable-libx264 --extra-cflags=-I../lame/dist/include --extra-ldflags=-L../lame/dist/lib
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavfilter     6. 47.100 /  6. 47.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
[image2 @ 0x809250] Could not find codec parameters for stream 0 (Video: png, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, image2, from 'rainbow%03d.png':
  Duration: 00:00:19.56, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, none, 25 fps, 25 tbr, 25 tbn, 25 tbc
No decoder for stream #0:0, filtering impossible
Error opening filters!
Tolsta-i5-osx:out tolstenko$ time ffmpeg -i rainbow%03d.png -codec:v libx264 -pix_fmt yuv420p -b:v 5000k outputhsvh264_420.mp4
ffmpeg version N-81085-gdb8e8c9 Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 7.3.0 (clang-703.0.29)
  configuration: --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libfreetype --enable-libvorbis --enable-libvpx --enable-libass --enable-ffplay --enable-libfdk-aac --enable-libopus --enable-libx265 --disable-lzma --enable-nonfree --enable-vda
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 50.100 / 57. 50.100
  libavformat    57. 44.100 / 57. 44.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 47.100 /  6. 47.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, image2, from 'rainbow%03d.png':
  Duration: 00:00:19.56, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgba(pc), 512x512, 25 fps, 25 tbr, 25 tbn, 25 tbc
[libx264 @ 0x7fca0a811200] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x7fca0a811200] profile High, level 3.0
[libx264 @ 0x7fca0a811200] 264 - core 148 r2668 fd2c324 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=5000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mp4 @ 0x7fca0a810000] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, mp4, to 'outputhsvh264_420.mp4':
  Metadata:
    encoder         : Lavf57.44.100
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 512x512, q=-1--1, 5000 kb/s, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.50.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/5000000 buffer size: 0 vbv_delay: -1
Stream mapping:
  Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame=  489 fps=111 q=-1.0 Lsize=   12062kB time=00:00:19.44 bitrate=5082.8kbits/s speed= 4.4x    
video:12056kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.050887%
[libx264 @ 0x7fca0a811200] frame I:2     Avg QP:10.07  size: 69428
[libx264 @ 0x7fca0a811200] frame P:296   Avg QP:14.67  size: 33398
[libx264 @ 0x7fca0a811200] frame B:191   Avg QP:16.59  size: 12145
[libx264 @ 0x7fca0a811200] consecutive B-frames: 21.9% 78.1%  0.0%  0.0%
[libx264 @ 0x7fca0a811200] mb I  I16..4: 12.3% 49.7% 38.0%
[libx264 @ 0x7fca0a811200] mb P  I16..4:  0.4%  6.8%  2.1%  P16..4: 26.7% 25.8% 24.4%  0.0%  0.0%    skip:13.8%
[libx264 @ 0x7fca0a811200] mb B  I16..4:  0.1%  0.2%  0.1%  B16..8: 19.3%  5.9%  4.4%  direct:26.4%  skip:43.6%  L0:22.4% L1:39.7% BI:37.9%
[libx264 @ 0x7fca0a811200] final ratefactor: 14.10
[libx264 @ 0x7fca0a811200] 8x8 transform intra:71.2% inter:42.8%
[libx264 @ 0x7fca0a811200] coded y,uvDC,uvAC intra: 89.4% 74.7% 73.7% inter: 42.8% 44.3% 39.2%
[libx264 @ 0x7fca0a811200] i16 v,h,dc,p: 41% 21% 35%  2%
[libx264 @ 0x7fca0a811200] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  5% 11% 42%  5%  8%  5% 11%  4%  9%
[libx264 @ 0x7fca0a811200] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 15% 15%  8% 12%  8% 14%  7% 12%
[libx264 @ 0x7fca0a811200] i8c dc,h,v,p: 70% 14%  7%  9%
[libx264 @ 0x7fca0a811200] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7fca0a811200] ref P L0: 67.4% 11.2% 13.1%  8.3%
[libx264 @ 0x7fca0a811200] ref B L0: 93.3%  6.7%
[libx264 @ 0x7fca0a811200] kb/s:5048.76

real    0m12.635s
user    0m15.591s
sys 0m0.305s

Could you please share a working ffmpeg.js compiled with all supported codecs? I know it is bigger, but many of us devs just want to try out the functionalities and check your solution. When it will be need to improve, we will compile tuning as you brilliantly do.

Thanks again for you efforts.

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.