-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2243b03
commit 2177cca
Showing
4 changed files
with
151 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
============== | ||
FFMPEG arecord | ||
============== | ||
|
||
Configuration Options | ||
===================== | ||
+------------------+--------------------+------------------------+ | ||
|Variable |Default Value |Description | | ||
+==================+====================+========================+ | ||
|``arecord_path`` |``/usr/bin/arecord``|Full path to ``arecord``| | ||
+------------------+--------------------+------------------------+ | ||
|``arecord_format``|``S16_LE`` |Audio format | | ||
+------------------+--------------------+------------------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
=============== | ||
FFMPEG on MacOS | ||
=============== | ||
|
||
FFMPEG can run on MacOS with AVFoundation software provided in the operating | ||
system. | ||
|
||
Installation | ||
============ | ||
Homebrew | ||
-------- | ||
Installing FFMPEG via `homebrew <https://brew.sh>`_ is the easiest way if you | ||
have administrator access. | ||
#. Install Homebrew :: | ||
|
||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | ||
|
||
.. note:: You may need to reboot after installation finishes. | ||
|
||
#. Install FFMPEG :: | ||
|
||
brew install ffmpeg | ||
|
||
|
||
Changes to `controller.conf` | ||
============================ | ||
|
||
.. code-block:: python | ||
[camera] | ||
type = ffmpeg | ||
camera_device = "YourCameraDeviceOrNumber" | ||
mic_device = "YourMicDeviceOrNumber" | ||
[ffmpeg] | ||
ffmpeg_location = /usr/local/bin/ffmpeg | ||
audio_input_format = avfoundation | ||
video_input_format = avfoundation | ||
Your device id's can be gotten from running :: | ||
|
||
ffmpeg -f avfoundation -list_devices true -i "" | ||
|
||
|
||
You'll get an output similar to | ||
|
||
.. code-block:: bash | ||
[AVFoundation input device @ 0x7ff8e171e580] AVFoundation video devices: | ||
[AVFoundation input device @ 0x7ff8e171e580] [0] FaceTime HD Camera (Built-in) | ||
[AVFoundation input device @ 0x7ff8e171e580] [1] Capture screen 0 | ||
[AVFoundation input device @ 0x7ff8e171e580] [2] Capture screen 1 | ||
[AVFoundation input device @ 0x7ff8e171e580] AVFoundation audio devices: | ||
[AVFoundation input device @ 0x7ff8e171e580] [0] Built-in Microphone | ||
[AVFoundation input device @ 0x7ff8e171e580] [1] Built-in Input | ||
In my case I want to use the FaceTime HD Camera and the Built-in Microphone so | ||
I can choose the following: | ||
|
||
* video | ||
* ``"0"`` | ||
* ``"FaceTime"`` | ||
* ``"FaceTime HD Camera (Built-in)"`` | ||
* ``"default"`` | ||
* audio | ||
* ``":0"`` | ||
* ``":Built-in Microphone"`` | ||
* ``":default"`` | ||
* The colon (``:``) before every item is very important because that's how | ||
AVFoundation differentiates between a camera and a microphone. If you | ||
don't get any sound or have errors relating to audio in your console, | ||
check that you have a colon before the device in your conf file. | ||
|
||
Note that I can't use the first word of the device name because there's another | ||
device that shares the same name (``Built-in``). | ||
|
||
The name ``default`` means that it will pick the first item in the list ``"0"``. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
====== | ||
FFMPEG | ||
====== | ||
|
||
Configuration Options | ||
===================== | ||
|
||
+------------------------+-----------------------+-----------------------------+ | ||
|Variable |Default Value |Description | | ||
+========================+=======================+=============================+ | ||
|``ffmpeg_location`` |``/usr/bin/ffmpeg`` |Full path to the location of | | ||
| | |FFMPEG. | | ||
+------------------------+-----------------------+-----------------------------+ | ||
|``v4l2-ctl_location`` |``/usr/bin/v4l2-ctl`` |Full path to the location of | | ||
| | |``v4l2-ctl`` | | ||
+------------------------+-----------------------+-----------------------------+ | ||
|``audio_codec`` |``mp2`` |Audio codec FFMPEG should | | ||
| | |use. Only ``mp2`` is | | ||
| | |supported but ``twolame`` | | ||
| | |will work when compiled into | | ||
| | |FFMPEG. | | ||
+------------------------+-----------------------+-----------------------------+ | ||
|``audio_channels`` |``1`` |Audio channels, 1 for mono, | | ||
| | |2 for stereo. | | ||
+------------------------+-----------------------+-----------------------------+ | ||
|``audio_bitrate`` |``32`` |Bitrate for the audio stream | | ||
| | |in kilobits | | ||
+------------------------+-----------------------+-----------------------------+ | ||
|``audio_sample_rate`` |``44100`` |sample rate for the audio in | | ||
| | |hertz | | ||
+------------------------+-----------------------+-----------------------------+ | ||
|``video_codec`` |``mpeg1video`` |Video codec FFMPEG should | | ||
| | |use. Currently only | | ||
| | |``mpeg1video`` is supported. | | ||
+------------------------+-----------------------+-----------------------------+ | ||
|``video_bitrate`` |``350`` |Bitrate for the video stream | | ||
| | |in kilobits | | ||
+------------------------+-----------------------+-----------------------------+ | ||
|``audio_input_format`` |``alsa`` | | | ||
+------------------------+-----------------------+-----------------------------+ | ||
|``audio_input_options`` | |Leave this blank if | | ||
| | |``audio_input_format`` is | | ||
| | |``alsa`` | | ||
+------------------------+-----------------------+-----------------------------+ | ||
|``audio_output_options``|``-nostats`` | | | ||
+------------------------+-----------------------+-----------------------------+ | ||
|``video_output_format`` |``v4l2`` | | | ||
+------------------------+-----------------------+-----------------------------+ | ||
|``video_output_options``|``-nostats -threads 2``| | | ||
+------------------------+-----------------------+-----------------------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters