How to start live streaming on Mac using FFMPEG?
Asked Answered
Y

1

7

I am working on a MAC OS X Lion 10.7.5.

How to properly install FFMPEG?

What I did:

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools

and even (I think this should work, but it doesn't)

brew install ffmpeg

Nothing works...I can't list the inputs, I can't start the streaming from the USB camera, I can't do anything.

ffmpeg -f video4linux2 -s 320x240 -i video="USB cam":audio="USB mic" -f oss -acodec libvorbis -vcodec libvpx -f webm http://localhost:1234/streaming

The errors I get look like this:

unknown input format 'video4linux'

and the same happens for alsa, openal, vfwcap etc.

So did anyone try live streaming with FFMPEG from MAC? How to install FFMPEG so that is supports video4linux2 or v4l2 or any input format at all? How to list the devices (USB webcams or integrated webcams)?

Yuri answered 3/10, 2013 at 7:31 Comment(0)
D
12

You can gain access to the webcam in Mac OS with avfoundation.

To list the available input devices use:

ffmpeg -f avfoundation -list_devices true -i ""

An example that records the first device in the list to a file:

ffmpeg -f avfoundation -i "0" out.mpg
Damon answered 3/8, 2014 at 0:1 Comment(5)
I'm on Mac OSX 10.9.5, ffmpeg version 2.4.2 (installed through homebrew) and this worked like a charm.Preter
Neither of these commands work for ffmpeg 2.5.3 on OS X 10.10. Any ideas?Floaty
Jared: It may depend on how you install ffmpeg. There are a huge number of optional libraries. I've been using the following Homebrew install: brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-toolsDamon
Did you ever find the solution Jared?Doner
@RichardMilewski brew doesn't seem to let you specify optional package libraries with options like that. I get: Error: invalid option: --with-fdk-aacDespatch

© 2022 - 2024 — McMap. All rights reserved.