Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output format avfoundation is not available #492

Closed
lobor opened this issue Dec 31, 2015 · 8 comments
Closed

Output format avfoundation is not available #492

lobor opened this issue Dec 31, 2015 · 8 comments
Labels
Milestone

Comments

@lobor
Copy link

lobor commented Dec 31, 2015

Hi,
I try to get a live stream of my cam with node-fluent-ffmpeg.

With this code i have this error

var command = ffmpeg()
        .addOption('-f', 'avfoundation')
        .addOption('-video_device_index', 2)
        .addOption('-i', '"default"')
        .pipe(res, {end:true});
events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: Output format avfoundation is not available
    at /Applications/MAMP/htdocs/detect_cam/node_modules/fluent-ffmpeg/lib/capabilities.js:585:21
    at fn (/Applications/MAMP/htdocs/detect_cam/node_modules/fluent-ffmpeg/node_modules/async/lib/async.js:741:34)
    at /Applications/MAMP/htdocs/detect_cam/node_modules/fluent-ffmpeg/node_modules/async/lib/async.js:1208:16
    at /Applications/MAMP/htdocs/detect_cam/node_modules/fluent-ffmpeg/node_modules/async/lib/async.js:166:37
    at /Applications/MAMP/htdocs/detect_cam/node_modules/fluent-ffmpeg/node_modules/async/lib/async.js:701:43
    at /Applications/MAMP/htdocs/detect_cam/node_modules/fluent-ffmpeg/node_modules/async/lib/async.js:167:37
    at /Applications/MAMP/htdocs/detect_cam/node_modules/fluent-ffmpeg/node_modules/async/lib/async.js:1204:30
    at /Applications/MAMP/htdocs/detect_cam/node_modules/fluent-ffmpeg/lib/capabilities.js:545:7
    at handleExit (/Applications/MAMP/htdocs/detect_cam/node_modules/fluent-ffmpeg/lib/processor.js:155:11)
    at ChildProcess.<anonymous> (/Applications/MAMP/htdocs/detect_cam/node_modules/fluent-ffmpeg/lib/processor.js:169:11)

I am on mac

Thanks

@njoyard
Copy link
Member

njoyard commented Jan 3, 2016

Your ffmpeg version does not support avfoundation format, that's all there is to it.

@Maksims
Copy link

Maksims commented Jan 8, 2016

Did same, got same error.
But running ffmpeg from command line using same arguments - works.

@njoyard
Copy link
Member

njoyard commented Jan 14, 2016

That's pretty weird. Can you post the output of ffmpeg -formats please?

Edit: oh I think I get it, you can use not only format names but also device driver names with -f before an input, but fluent-ffmpeg only checks formats. In this case that's a bug. Can you also post the output of ffmpeg -devices here please?

@Maksims
Copy link

Maksims commented Jan 14, 2016

I'm afraid my raspberry had too much reinstalls since, and doing different things now, so wont be able to provide feedback on that one :(

@njoyard
Copy link
Member

njoyard commented Jan 14, 2016

No problem, I'll test that with a different device type, should get the same results. Thanks for answering :)

@njoyard njoyard added WIP and removed Needs info labels Feb 21, 2016
@njoyard njoyard added this to the 2.1.0 milestone Mar 16, 2016
@njoyard njoyard modified the milestones: 2.2.0, 2.1.0 May 1, 2016
@pOxaes
Copy link

pOxaes commented Mar 6, 2017

Hi, I am having exactly the same issue.

I don't see this issue resolved (nor link to an other issue) so I'll add what I am facing.

Running ffmpeg from command line using same arguments works well, but not with fluent-ffmpeg.

command line:
ffmpeg -f avfoundation -r 30 -s 640x480 -i "default" -vframes 1 output.jpg

Node:

ffmpeg()
                .input('default')
                .inputFormat('avfoundation')
                .inputOptions('-r 30 -s 640x480')
                .outputOptions('-vframes 1')
                .output('output.jpg')
                .run()

avfoundation is in ffmpeg -formats:
D avfoundation AVFoundation input device

Here ffmpeg -devices

ffmpeg version 3.0 Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 7.0.2 (clang-700.1.81)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.0 --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-vda
  libavutil      55. 17.103 / 55. 17.103
  libavcodec     57. 24.102 / 57. 24.102
  libavformat    57. 25.100 / 57. 25.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 31.100 /  6. 31.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Devices:
 D. = Demuxing supported
 .E = Muxing supported
 --
 D  avfoundation    AVFoundation input device
 D  lavfi           Libavfilter virtual input device
 D  qtkit           QTKit input device

Thanks!

@pOxaes
Copy link

pOxaes commented Mar 6, 2017

A quick update because it is always solved once you have reported the issue... I just cleaned my node modules and reinstalled it... and it works well.

It's still weird, I'll come back to you if I reproduce it!

@arambekverdyan
Copy link

Hi @pOxaes
I've the same problem with avfoundation:
Error: Output format avfoundation is not available

Ffmpeg installed on my OS X is support avfoundation but it can't muxe. And there are some check in fluent-ffmpeg package in compatibilities.js file (Its check for is the format supported and can it muxe) otherwise its throws error.

And now i can't compile my ffmpeg with avfoundation mux support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants