Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to start live streaming on Mac using FFMPEG?

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)?

like image 627
Alexandra Chis Avatar asked Oct 03 '13 07:10

Alexandra Chis


People also ask

How do I livestream with FFmpeg?

To start live streaming with FFmpeg, you have to download and install the software on your computer. You can choose the right installation method for your operating system from the three options above in this FFmpeg tutorial. At this point, you can also create a streaming channel on your video hosting platform.

Does Wowza use FFmpeg?

Use FFmpeg as a live encoder with Wowza Streaming Engine. FFmpeg, the command-line tool that converts multimedia files between formats, can also be used as a live encoder with Wowza Streaming Engine™ media server software. Note: FFmpeg is updated frequently.


1 Answers

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
like image 138
Richard Milewski Avatar answered Nov 02 '22 23:11

Richard Milewski