-
Notifications
You must be signed in to change notification settings - Fork 0
Recording converter fixes #3
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
Conversation
| @@ -0,0 +1,95 @@ | |||
| defmodule ExWebRTC.Recorder.Converter.Pipeline do | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A short doc explaining what this pipeline does would be appreciated
| @moduledoc false | ||
| use Membrane.Source | ||
|
|
||
| def_options( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
including membrane_core in .formatter.exs should help here
| * `:reorder_buffer_size` - Size of the buffer used for reordering late packets. `#{@default_reorder_buffer_size}` by default. | ||
| Increasing this value may help with "Decoded late RTP packet" warnings, | ||
| but keep in mind that larger values slow the conversion process considerably. | ||
| * `:reencode_ctx` - If passed, Converter will reencode the video using FFmpeg. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add info when this is helpful
lib/ex_webrtc_recorder/converter.ex
Outdated
|
|
||
| :audio -> | ||
| %{nil: convert_audio_track(id, output_path, packets |> Map.values() |> hd())} | ||
| %{nil: get_audio_track_context(packets |> Map.values() |> hd())} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not super clean 😅
| ) do | ||
| stream_map = | ||
| Enum.reduce(manifest, %{}, fn {id, track}, stream_map -> | ||
| Enum.reduce(manifest, %{}, fn {_id, track}, stream_map -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of comments explaining step by step what we are doing here would be cool, e.g.:
- Read tracks
- convert tracks to webm files
- mux webm files into a single file
lib/ex_webrtc_recorder/converter.ex
Outdated
| {:ok, _sup, pid} = Pipeline.start_link(video_stream, audio_stream, output_file) | ||
| Process.monitor(pid) | ||
|
|
||
| # FIXME: Possible RC here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we elaborate?
|
@mickel8 Any issue with bumping |
Uh oh!
There was an error while loading. Please reload this page.