Skip to content

Commit

Permalink
Specify directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
smimram committed Nov 15, 2023
1 parent 54b2a4c commit e2776ee
Show file tree
Hide file tree
Showing 31 changed files with 159 additions and 159 deletions.
6 changes: 3 additions & 3 deletions doc/content/beets.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ We rely on `request.dynamic` to call `beet random`
(with `-f '$path'` option so beets only returns the matching track's path)
every time the source must prepare a new track:

```{.liquidsoap include="content/liq/beets-source.liq" from=1 to=-1}
```{.liquidsoap include="beets-source.liq" from=1 to=-1}
```

Expand All @@ -101,7 +101,7 @@ import:

Then we only need to add `amplify` to our source creation function. In the example below we also add `blank.eat`, to automatically cut silence at the beginning or end of tracks.

```{.liquidsoap include="content/liq/beets-amplify.liq" from=1}
```{.liquidsoap include="beets-amplify.liq" from=1}
```

Expand All @@ -117,7 +117,7 @@ In that case,
the list of paths returned by `beet random -f '$path'` fits directly
what's needed by protocol resolution:

```{.liquidsoap include="content/liq/beets-protocol.liq" from=1}
```{.liquidsoap include="beets-protocol.liq" from=1}
```

Expand Down
4 changes: 2 additions & 2 deletions doc/content/blank.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ listeners get some silence again. To avoid that problem we made the
(i.e. declare it as unavailable), which perfectly suits the typical setup used
for live shows:

```{.liquidsoap include="content/liq/blank-sorry.liq"}
```{.liquidsoap include="blank-sorry.liq"}
```

Expand All @@ -33,6 +33,6 @@ more about liquidsoap's notion of [source](sources.html).
Finally, if you need to do some custom action when there's too much blank, we
have `blank.detect`:

```{.liquidsoap include="content/liq/blank-detect.liq" from=1 to=-1}
```{.liquidsoap include="blank-detect.liq" from=1 to=-1}
```
2 changes: 1 addition & 1 deletion doc/content/complete_case.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Once you've managed to describe what you want in such a modular way, you're half

Now here is how to write that in [Liquidsoap](index.html).

```{.liquidsoap include="content/liq/complete-case.liq"}
```{.liquidsoap include="complete-case.liq"}
```

Expand Down
28 changes: 14 additions & 14 deletions doc/content/cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ When building your stream, you'll often need to make it unfallible. Usually, you

[Liquidsoap](index.html) can achieve basic streaming tasks like transcoding with ease. You input any number of "source" streams using `input.http`, and then transcode them to any number of formats / bitrates / etc. The only limitation is your hardware: encoding and decoding are both heavy on CPU. If you want to get the best use of CPUs (multicore, memory footprint etc.) when encoding media with Liquidsoap, we recommend using the `%ffmpeg` encoders.

```{.liquidsoap include="content/liq/transcoding.liq"}
```{.liquidsoap include="transcoding.liq"}
```

Expand All @@ -64,15 +64,15 @@ to encode the file as quickly as possible.
Finally, we use the `on_stop` handler to shutdown
liquidsoap when streaming is finished.

```{.liquidsoap include="content/liq/re-encode.liq"}
```{.liquidsoap include="re-encode.liq"}
```

## RTMP server

With our [FFmpeg support](ffmpeg.html), it is possible to create a simple RTMP server with no re-encoding:

```{.liquidsoap include="content/liq/rtmp.liq"}
```{.liquidsoap include="rtmp.liq"}
```

Expand All @@ -83,23 +83,23 @@ the SRT transport protocol:

Sender:

```{.liquidsoap include="content/liq/srt-sender.liq" from=1}
```{.liquidsoap include="srt-sender.liq" from=1}
```

Receiver:

```{.liquidsoap include="content/liq/srt-receiver.liq" to=-1}
```{.liquidsoap include="srt-receiver.liq" to=-1}
```

## Scheduling

```{.liquidsoap include="content/liq/fallback.liq" to=-1}
```{.liquidsoap include="fallback.liq" to=-1}
```

```{.liquidsoap include="content/liq/scheduling.liq" from=1 to=-1}
```{.liquidsoap include="scheduling.liq" from=1 to=-1}
```

Expand All @@ -114,7 +114,7 @@ stored to avoid reindexing at each run). The resulting object can then
be queried with the `find` method in order to return all files matching the given
conditions and thus generate a playlist:

```{.liquidsoap include="content/liq/medialib.liq"}
```{.liquidsoap include="medialib.liq"}
```

Expand Down Expand Up @@ -160,7 +160,7 @@ It can be useful to have a special playlist that is played at least every 20 min
You may think of a promotional playlist for instance.
Here is the recipe:

```{.liquidsoap include="content/liq/regular.liq" from=1 to=-1}
```{.liquidsoap include="regular.liq" from=1 to=-1}
```

Expand Down Expand Up @@ -277,7 +277,7 @@ to add an extra `5s` of silence when transitioning out of a live `input.harbor`

This can be done with the `append` operator:

```{.liquidsoap include="content/liq/append-silence.liq" to=-1}
```{.liquidsoap include="append-silence.liq" to=-1}
```

Expand All @@ -287,14 +287,14 @@ It is sometimes useful (or even legally necessary) to keep a backup of an audio
stream. Storing all the stream in one file can be very impractical. In order to
save a file per hour in wav format, the following script can be used:

```{.liquidsoap include="content/liq/dump-hourly.liq" from=1}
```{.liquidsoap include="dump-hourly.liq" from=1}
```

In the following variant we write a new mp3 file each time new metadata is
coming from `s`:

```{.liquidsoap include="content/liq/dump-hourly2.liq" from=1}
```{.liquidsoap include="dump-hourly2.liq" from=1}
```

Expand Down Expand Up @@ -332,7 +332,7 @@ Crossfade-based transitions are more complex and involve buffering source data i

We provide a default operator named `cross.smart` which may be suitable for most usage. But you can also create your own customized crossfade transitions. This is in particular true if you are expecting crossfade transitions between tracks of your `music` source but not between a `music` track and e.g. some jingles. Here's how to do it in this case:

```{.liquidsoap include="content/liq/cross.smart.liq" from=1 to=-1}
```{.liquidsoap include="cross.smart.liq" from=1 to=-1}
```

Expand All @@ -356,7 +356,7 @@ Could not set buffer size to 'frame.size' (1920 samples), got 2048.

The solution is then to set liquidsoap's internal frame size to this value, which is most likely specific to your hardware. Let's try this script:

```{.liquidsoap include="content/liq/frame-size.liq"}
```{.liquidsoap include="frame-size.liq"}
```

Expand Down
2 changes: 1 addition & 1 deletion doc/content/crossfade.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ You can find its documentation in the [language reference](reference.html).

Liquidsoap also includes a ready-to-use operator defined using `cross`, it is called `crossfade` and is defined in the pervasive helper script `utils.liq`. Its code is:

```{.liquidsoap include="content/liq/crossfade.liq"}
```{.liquidsoap include="crossfade.liq"}
```

Expand Down
2 changes: 1 addition & 1 deletion doc/content/dynamic_sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ a dynamic restreaming platform.

Here's the code:

```{.liquidsoap include="content/liq/dynamic-source.liq"}
```{.liquidsoap include="dynamic-source.liq"}
```

Expand Down
6 changes: 3 additions & 3 deletions doc/content/external_decoders.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ The flac decoder uses the `flac` command line. It is enabled if the binary can b

Its code is the following:

```{.liquidsoap include="content/liq/decoder-flac.liq"}
```{.liquidsoap include="decoder-flac.liq"}
```

Additionally, a metadata resolver is registered when the `metaflac` command can be found in the `$PATH`:

```{.liquidsoap include="content/liq/decoder-metaflac.liq"}
```{.liquidsoap include="decoder-metaflac.liq"}
```

Expand All @@ -98,6 +98,6 @@ registered using `decoder.oblivious.add`.

Its code is the following:

```{.liquidsoap include="content/liq/decoder-faad.liq"}
```{.liquidsoap include="decoder-faad.liq"}
```
2 changes: 1 addition & 1 deletion doc/content/external_encoders.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ Videos can also be encoded by programs able to read files in avi format from
standard input. To use it, the flag `video=true` of `%external` should be
used. For instance, a compressed avi file can be generated with `ffmpeg` using

```{.liquidsoap include="content/liq/external-output.file.liq" from=1}
```{.liquidsoap include="external-output.file.liq" from=1}
```
2 changes: 1 addition & 1 deletion doc/content/external_streams.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ run the external program.
A wrapper, `input.mplayer`, is defined to use mplayer as the external decoder.
Its code is:

```{.liquidsoap include="content/liq/input.mplayer.liq"}
```{.liquidsoap include="input.mplayer.liq"}
```
10 changes: 5 additions & 5 deletions doc/content/ffmpeg_cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Here are some examples of what is possible to do with the ffmpeg support in liqu

With ffmpeg support, Liquidsoap can relay encoded streams without re-encoding them, making it possible to re-send a stream to multiple destinations. Here's an example:

```{.liquidsoap include="content/liq/ffmpeg-relay.liq"}
```{.liquidsoap include="ffmpeg-relay.liq"}
```

Expand All @@ -25,7 +25,7 @@ In the script below, you need to match the encoded format of the stream with a b
The `output.harbor` will then relay the data from the file if no one is connected and start/stop the underlying
input when there are listeners:

```{.liquidsoap include="content/liq/ffmpeg-relay-ondemand.liq"}
```{.liquidsoap include="ffmpeg-relay-ondemand.liq"}
```

Expand All @@ -34,15 +34,15 @@ input when there are listeners:
Liquidsoap can also encode in one place and share the encoded with data with multiple outputs, making it possible to
minimize CPU resources. Here's an example adapted from the previous one:

```{.liquidsoap include="content/liq/ffmpeg-shared-encoding.liq"}
```{.liquidsoap include="ffmpeg-shared-encoding.liq"}
```

Shared encoding is even more useful when dealing with video encoding, which is very costly. Here's a fun example
sharing audio and video encoding and sending to different destinations, both via Icecast and to YouTube/Facebook
via the rtmp protocol:

```{.liquidsoap include="content/liq/ffmpeg-shared-encoding-rtmp.liq"}
```{.liquidsoap include="ffmpeg-shared-encoding-rtmp.liq"}
```

Expand All @@ -63,7 +63,7 @@ to adapt the binary data and, it's possible some new filters will need to be wri

Here's a use case that has been tested: live switch between a playlist of mp4 files and a rtmp flv input:

```{.liquidsoap include="content/liq/live-switch.liq"}
```{.liquidsoap include="live-switch.liq"}
```

Expand Down
10 changes: 5 additions & 5 deletions doc/content/ffmpeg_filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Conversely, tracks can be created from them using `ffmpeg.filter.audio.output` a

Filters are configured within the closure of a function. Here's an example:

```{.liquidsoap include="content/liq/ffmpeg-filter-flanger-highpass.liq"}
```{.liquidsoap include="ffmpeg-filter-flanger-highpass.liq"}
```

Expand All @@ -53,7 +53,7 @@ to filters, applies a flanger effect and then a high pass effect, creates an aud

Here's another example for video:

```{.liquidsoap include="content/liq/ffmpeg-filter-hflip.liq"}
```{.liquidsoap include="ffmpeg-filter-hflip.liq"}
```

Expand All @@ -70,7 +70,7 @@ if they are simply copied.

Here's an example with the previous filter:

```{.liquidsoap include="content/liq/ffmpeg-filter-hflip2.liq"}
```{.liquidsoap include="ffmpeg-filter-hflip2.liq"}
```

Expand All @@ -84,7 +84,7 @@ supported in liquidsoap.

In order to do so, you have to use a slightly different API:

```{.liquidsoap include="content/liq/ffmpeg-filter-dynamic-volume.liq" to=-1}
```{.liquidsoap include="ffmpeg-filter-dynamic-volume.liq" to=-1}
```

Expand Down Expand Up @@ -159,6 +159,6 @@ This filter receives an array of possible `audio` inputs as well as an array of

Put together, this can be used as such:

```{.liquidsoap include="content/liq/ffmpeg-filter-parallel-flanger-highpass.liq"}
```{.liquidsoap include="ffmpeg-filter-parallel-flanger-highpass.liq"}
```
4 changes: 2 additions & 2 deletions doc/content/harbor.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ source clients should set their connection port to `n+1`.
The `auth` function is a function, that takes a record `{user, password, address}` and returns a boolean representing whether the user
should be granted access or not. Typical example can be:

```{.liquidsoap include="content/liq/harbor-auth.liq"}
```{.liquidsoap include="harbor-auth.liq"}
```

Expand All @@ -85,6 +85,6 @@ The source client may use any of the recognized audio input codec. Hence, when u

A sample code can be:

```{.liquidsoap include="content/liq/harbor-usage.liq" to=-1}
```{.liquidsoap include="harbor-usage.liq" to=-1}
```
10 changes: 5 additions & 5 deletions doc/content/harbor_http.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ memory. Make sure to only use it if you know that the response should be small e

For convenience, a HTTP response builder is provided via `http.response`. Here's an example:

```{.liquidsoap include="content/liq/harbor.http.response.liq" from=1}
```{.liquidsoap include="harbor.http.response.liq" from=1}
```

Expand Down Expand Up @@ -97,7 +97,7 @@ parameter.

It is also possible to directly interact with the underlying socket using the `simple` API:

```{.liquidsoap include="content/liq/harbor-simple.liq"}
```{.liquidsoap include="harbor-simple.liq"}
```

Expand All @@ -112,7 +112,7 @@ Some source clients using the harbor may also request pages that
are served by an icecast server, for instance listeners statistics.
In this case, you can register the following handler:

```{.liquidsoap include="content/liq/harbor-redirect.liq"}
```{.liquidsoap include="harbor-redirect.liq"}
```

Expand All @@ -121,7 +121,7 @@ In this case, you can register the following handler:
You can use harbor to register HTTP services to
fecth/set the metadata of a source.

```{.liquidsoap inlucde="content/liq/harbor-metadata.liq" from=1}
```{.liquidsoap inlucde="harbor-metadata.liq" from=1}
```

Expand All @@ -146,7 +146,7 @@ Content-Type: application/json; charset=utf-8
Using `insert_metadata`, you can register a GET handler that
updates the metadata of a given source. For instance:

```{.liquidsoap include="content/liq/harbor-insert-metadata.liq" from=1}
```{.liquidsoap include="harbor-insert-metadata.liq" from=1}
```

Expand Down
2 changes: 1 addition & 1 deletion doc/content/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ application.

Some common settings have shortcut for convenience. These are all shortcuts to their respective `settings` values:

```{.liquidsoap include="content/liq/settings.liq"}
```{.liquidsoap include="settings.liq"}
```

Expand Down
Loading

0 comments on commit e2776ee

Please sign in to comment.