Skip to content
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

Offline processing guide #686

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

WojciechBarczynski
Copy link
Member

No description provided.

@WojciechBarczynski WojciechBarczynski self-assigned this Aug 23, 2024
@WojciechBarczynski WojciechBarczynski linked an issue Aug 23, 2024 that may be closed by this pull request
@@ -54,7 +54,7 @@ Update output to render a [`View`](../api/components/View.md) component with an
type: :view,
background_color_rgba: "#4d4d4dff",
children: [
%{ type: :input_stream, input_id: :input_1 }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to use strings instead of atoms for input ids everywhere for consistency.
It's also the typing used in docs: https://hexdocs.pm/membrane_live_compositor_plugin/Membrane.LiveCompositor.html#t:input_id/0

@WojciechBarczynski WojciechBarczynski marked this pull request as ready for review August 26, 2024 09:09
@WojciechBarczynski WojciechBarczynski marked this pull request as draft August 26, 2024 10:34
@WojciechBarczynski WojciechBarczynski force-pushed the @WojciechBarczynski/offline_processing_guide branch from 6f76e4d to eca23c4 Compare August 26, 2024 10:35
@WojciechBarczynski WojciechBarczynski force-pushed the @WojciechBarczynski/offline_processing_guide branch from eca23c4 to de1e758 Compare August 26, 2024 10:37
@WojciechBarczynski WojciechBarczynski marked this pull request as ready for review August 26, 2024 14:36
Copy link
Member

@wkozyra95 wkozyra95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not review it fully, but I think this approach has a few major problems:

  • This guide is very complicated and either throws a ton of information at the user or does not explain stuff at all.
  • You need to go through the entire guide to test anything here.
  • Parts of this guide seems more like reference than guide.

I added some comments in the PR, but I don't think the core issues with this approach can be improved. I believe that format for other guides does not work here.

In general, I think that the threshold for adding a guide here should be that at least it needs to be better than providing one big example code with some comments. I don't believe this is the case here.

@@ -12,11 +12,12 @@ to file as MP4.
## Where to start?

To get started check out our [`Guides`](./category/guides) section that will walk you through common scenarios.
- [`Quick start`](./guides/quick-start.md) basic video composing and audio mixing setup.
- [`Quick Start`](./guides/quick-start.md) basic video composing and audio mixing setup.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use consistent case, either capitalize all titles or none

Comment on lines +7 to +9
This guide will explain how to use LiveCompositor in non-real-time cases.

By `offline processing`, we mean processing in which outputs produced by LiveCompositor are not synchronized with a real-time clock.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This guide will explain how to use LiveCompositor in non-real-time cases.
By `offline processing`, we mean processing in which outputs produced by LiveCompositor are not synchronized with a real-time clock.
By default, LiveCompositor is processing media in sync with the real-time clock. This guide will explain how to use LiveCompositor to process media without this synchronization. For example, how to combine multiple mp4 files into one.


## Differences overview

There are a few differences in LiveCompositor configuration for `offline` and `live` processing.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • You are saying that there are some differences and do not list anything. List bellow does not list differences, it is a list of informations/recomendations/requirements without any structure.
  • This should be a guide, you are telling someone to do sth and explain why X happened. This is not a place to explain differences (unless it relates to the guides itself)

<Tabs queryString="lang">
<TabItem value="http" label="HTTP">

1. To enable offline processing, the [`LIVE_COMPOSITOR_OFFLINE_PROCESSING_ENABLE`](../deployment/configuration.md#live_compositor_offline_processing_enable) environment variable should be set to `true`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know how it works and even for me understanding this list is to complicated

### Add MP4 output `output_1`

Here we won't focus on configuring the composition itself, as it's the same as in any other LiveCompositor use case.
For more advanced layouts, check out the [`Basic Layouts guide`](./basic-layouts.md).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for more advanced layouts check basic layouts - that does not sound right

For more advanced layouts, check out the [`Basic Layouts guide`](./basic-layouts.md).

We will configure the output to simply:
- Rescale video from `input_1` to output resolution using the [`Rescaler`](../api/components/Rescaler.md) component.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make it simpler, pass through input1 without recalling


### Schedule update output to show both inputs

We are going to schedule output update 5s after the beginning and configure it to:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We are going to schedule output update 5s after the beginning and configure it to:
Let's add a second input at the 5-second mark of the video:


We are going to schedule output update 5s after the beginning and configure it to:
- Show both inputs side-by-side using the [`Tiles`](../api/components/Tiles.md) component.
- Mix audio from both inputs, where `input_2` volume is reduced to 35% of the original volume.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

input_2 does not exists for membrane example

@WojciechBarczynski WojciechBarczynski marked this pull request as draft September 5, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Offline processing guide
2 participants