Skip to content

Commit 081daf6

Browse files
Merge pull request #14 from membraneframework/update_readme
Update README.md
2 parents 478510f + 82d2b11 commit 081daf6

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

README.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ It is part of [Membrane Multimedia Framework](https://membraneframework.org).
1010

1111
## Installation
1212

13+
First, you need to install FFmpeg on your system:
14+
15+
### macOS
16+
17+
```shell
18+
brew install ffmpeg
19+
```
20+
21+
### Ubuntu
22+
23+
```shell
24+
sudo apt-get install ffmpeg
25+
```
26+
1327
The package can be installed by adding `membrane_camera_capture_plugin` to your list of dependencies in `mix.exs`:
1428

1529
```elixir
@@ -41,11 +55,11 @@ defmodule Example do
4155

4256
@impl true
4357
def handle_init(_ctx, _options) do
44-
structure =
45-
child(:source, Membrane.CameraCapture)
46-
|> child(:converter, %Membrane.FFmpeg.SWScale.PixelFormatConverter{format: :I420})
47-
|> child(:encoder, Membrane.H264.FFmpeg.Encoder)
48-
|> child(:sink, %Membrane.File.Sink{location: "output.h264"})
58+
structure =
59+
child(:source, Membrane.CameraCapture)
60+
|> child(:converter, %Membrane.FFmpeg.SWScale.PixelFormatConverter{format: :I420})
61+
|> child(:encoder, Membrane.H264.FFmpeg.Encoder)
62+
|> child(:sink, %Membrane.File.Sink{location: "output.h264"})
4963

5064
{[spec: structure], %{}}
5165
end
@@ -70,6 +84,10 @@ $ mix test --include manual
7084

7185
If run successfully, you should be able to see video recorded by your camera.
7286

87+
_You might be asked to grant access to your camera, as some operating systems require that_
88+
89+
_In case of the absence of a physical camera, it is necessary to use a virtual camera (e.g. OBS, [see how to set up the virtual camera in OBS](https://obsproject.com/kb/virtual-camera-guide))_
90+
7391
## Copyright and License
7492

7593
Copyright 2022, [Software Mansion](https://swmansion.com/?utm_source=git&utm_medium=readme&utm_campaign=membrane_camera_capture_plugin)

0 commit comments

Comments
 (0)