diff --git a/livebooks/README.md b/livebooks/README.md index c37d88e9..588a2272 100644 --- a/livebooks/README.md +++ b/livebooks/README.md @@ -4,7 +4,4 @@ This folder contains interactive livebook examples. To launch them you need to i ## Installation -It is recommended to install Livebook via command line ([see official installation guide](https://github.com/livebook-dev/livebook#escript)). - -If livebook was installed directly from the official page, one should add `$PATH` variable to the Livebook environment: -![Setting path](./assets/path_set.png "Title") \ No newline at end of file +It is recommended to install Livebook via command line ([see official installation guide](https://github.com/livebook-dev/livebook#escript)). \ No newline at end of file diff --git a/livebooks/assets/path_set.png b/livebooks/assets/path_set.png deleted file mode 100644 index a06d753e..00000000 Binary files a/livebooks/assets/path_set.png and /dev/null differ diff --git a/livebooks/audio_mixer/assets/sample.mp3 b/livebooks/audio_mixer/assets/sample.mp3 new file mode 100644 index 00000000..41277e0a Binary files /dev/null and b/livebooks/audio_mixer/assets/sample.mp3 differ diff --git a/livebooks/audio_mixer/assets/sample_music_short.mp3 b/livebooks/audio_mixer/assets/sample_music_short.mp3 deleted file mode 100644 index 16280ea7..00000000 Binary files a/livebooks/audio_mixer/assets/sample_music_short.mp3 and /dev/null differ diff --git a/livebooks/audio_mixer/audio_mixer.livemd b/livebooks/audio_mixer/audio_mixer.livemd index 121ce3c2..36fc96ec 100644 --- a/livebooks/audio_mixer/audio_mixer.livemd +++ b/livebooks/audio_mixer/audio_mixer.livemd @@ -8,22 +8,14 @@ Mix.install([ {:membrane_core, "~> 1.0"}, {:membrane_audio_mix_plugin, "~> 0.16.0"}, {:membrane_file_plugin, "~> 0.16.0"}, - {:membrane_mp3_mad_plugin, "~> 0.18.0"}, - {:membrane_ffmpeg_swresample_plugin, "~> 0.19.0"}, - {:membrane_aac_fdk_plugin, "~> 0.18.0"}, + {:membrane_mp3_mad_plugin, "~> 0.18.2"}, + {:membrane_ffmpeg_swresample_plugin, "~> 0.19.1"}, + {:membrane_aac_fdk_plugin, "~> 0.18.5"}, {:membrane_kino_plugin, github: "membraneframework-labs/membrane_kino_plugin", tag: "v0.3.1"}, {:membrane_tee_plugin, "~> 0.12.0"} ]) ``` -## Installation - -To run this demo one needs to install native dependencies: - -1. [MP3 MAD](https://github.com/membraneframework/membrane_mp3_mad_plugin/tree/v0.14.0#installation) -2. [AAC FDK](https://github.com/membraneframework/membrane_aac_fdk_plugin#installation) -3. [SWResample FFmpeg](https://github.com/membraneframework/membrane_ffmpeg_swresample_plugin#installation) - ## Description This is an example of mixing multiple short "beep" sound into background music, one by one, every second. @@ -35,7 +27,7 @@ Define all constants. ```elixir n_beeps = 30 beep_filepath = "./assets/beep.aac" -background_filepath = "./assets/sample_music_short.mp3" +background_filepath = "./assets/sample.mp3" :ok ``` @@ -75,7 +67,7 @@ background_audio_input = child(:file_source, %File.Source{location: background_filepath}) |> child(:decoder_mp3, MP3.MAD.Decoder) |> child(:converter, %Converter{ - input_stream_format: %RawAudio{channels: 2, sample_format: :s24le, sample_rate: 44_100}, + input_stream_format: %RawAudio{channels: 2, sample_format: :s24le, sample_rate: 48_000}, output_stream_format: %RawAudio{channels: 1, sample_format: :s16le, sample_rate: 44_100} }) |> get_child(:mixer) diff --git a/livebooks/playing_mp3_file/assets/sample.mp3 b/livebooks/playing_mp3_file/assets/sample.mp3 index 4d57d779..41277e0a 100644 Binary files a/livebooks/playing_mp3_file/assets/sample.mp3 and b/livebooks/playing_mp3_file/assets/sample.mp3 differ diff --git a/livebooks/playing_mp3_file/playing_mp3_file.livemd b/livebooks/playing_mp3_file/playing_mp3_file.livemd index 4017a8af..a4dae596 100644 --- a/livebooks/playing_mp3_file/playing_mp3_file.livemd +++ b/livebooks/playing_mp3_file/playing_mp3_file.livemd @@ -7,21 +7,13 @@ Logger.configure(level: :error) Mix.install([ {:membrane_core, "~> 1.0"}, {:membrane_file_plugin, "~> 0.16.0"}, - {:membrane_mp3_mad_plugin, "~> 0.18.0"}, - {:membrane_ffmpeg_swresample_plugin, "~> 0.19.0"}, - {:membrane_aac_fdk_plugin, "~> 0.18.0"}, + {:membrane_mp3_mad_plugin, "~> 0.18.2"}, + {:membrane_ffmpeg_swresample_plugin, "~> 0.19.1"}, + {:membrane_aac_fdk_plugin, "~> 0.18.5"}, {:membrane_kino_plugin, github: "membraneframework-labs/membrane_kino_plugin", tag: "v0.3.1"} ]) ``` -## Installation - -To run this demo one needs to install native dependencies: - -1. [MP3 MAD](https://github.com/membraneframework/membrane_mp3_mad_plugin/tree/v0.14.0#installation) -2. [AAC FDK](https://github.com/membraneframework/membrane_aac_fdk_plugin#installation) -3. [SWResample FFmpeg](https://github.com/membraneframework/membrane_ffmpeg_swresample_plugin#installation) - ## Description This is example of loading `MP3` audio from the file, transcoding it to the `AAC` codec, and playing it via `Membrane.Kino.Player`. @@ -50,7 +42,6 @@ alias Membrane.{ Kino } -# https://freemusicarchive.org/music/Paper_Navy/All_Grown_Up/08_Swan_Song/ audio_path = "./assets/sample.mp3" kino = Membrane.Kino.Player.new(audio: true) @@ -58,7 +49,7 @@ spec = child(:file_source, %File.Source{location: audio_path}) |> child(:decoder_mp3, MP3.MAD.Decoder) |> child(:converter, %FFmpeg.SWResample.Converter{ - input_stream_format: %RawAudio{channels: 2, sample_format: :s24le, sample_rate: 44_100}, + input_stream_format: %RawAudio{channels: 2, sample_format: :s24le, sample_rate: 48_000}, output_stream_format: %RawAudio{channels: 2, sample_format: :s16le, sample_rate: 44_100} }) |> child(:encoder_aac, AAC.FDK.Encoder) diff --git a/livebooks/rtmp/rtmp_receiver.livemd b/livebooks/rtmp/rtmp_receiver.livemd index b84ff3a0..20034b0b 100644 --- a/livebooks/rtmp/rtmp_receiver.livemd +++ b/livebooks/rtmp/rtmp_receiver.livemd @@ -7,17 +7,11 @@ Logger.configure(level: :error) Mix.install([ {:membrane_core, "~> 1.0"}, {:membrane_realtimer_plugin, "~> 0.9.0"}, - {:membrane_rtmp_plugin, "~> 0.19.0"}, + {:membrane_rtmp_plugin, "~> 0.21.0"}, {:membrane_kino_plugin, github: "membraneframework-labs/membrane_kino_plugin", tag: "v0.3.1"} ]) ``` -## Installation - -To run this demo one needs to install native dependencies: - -1. [H264 FFmpeg](https://github.com/membraneframework/membrane_h264_ffmpeg_plugin/#installation) - ## Description Defines a server that receives a media stream from the RTMP source and plays it directly in the notebook. diff --git a/livebooks/rtmp/rtmp_sender.livemd b/livebooks/rtmp/rtmp_sender.livemd index f429b7e6..b75afdaf 100644 --- a/livebooks/rtmp/rtmp_sender.livemd +++ b/livebooks/rtmp/rtmp_sender.livemd @@ -12,12 +12,6 @@ Mix.install([ ]) ``` -## Installation - -To run this demo one needs to install native dependencies: - -1. [H264 FFmpeg](https://github.com/membraneframework/membrane_h264_ffmpeg_plugin/#installation) - ## Description Defines a pipeline downloading [Big Buck Bunny](https://en.wikipedia.org/wiki/Big_Buck_Bunny) trailer video and audio from Membranes' asset samples page using the `Hackney` plugin, and sending it via `RTMP` to the other Livebook. diff --git a/livebooks/soundwave/soundwave.livemd b/livebooks/soundwave/soundwave.livemd index 6abdf336..aa8cbf2d 100644 --- a/livebooks/soundwave/soundwave.livemd +++ b/livebooks/soundwave/soundwave.livemd @@ -7,7 +7,7 @@ Logger.configure(level: :error) Mix.install([ {:membrane_core, "~> 1.0"}, {:membrane_raw_audio_parser_plugin, "~> 0.4.0"}, - {:membrane_portaudio_plugin, "~> 0.18.0"}, + {:membrane_portaudio_plugin, "~> 0.18.3"}, {:vega_lite, "~> 0.1.8"}, {:kino_vega_lite, "~> 0.1.11"} ]) @@ -19,10 +19,6 @@ This livebook example shows how to perform real-time soundwave plotting with the By following that example you will learn how to read the audio from the microphone, how is audio represented, and how to create your custom Membrane element that plots the soundwave with the use of the elixir bindings to the Vega-Lite. -## Installation - -You need to have `FFmpeg` installed. For installation details take a look [here](https://www.ffmpeg.org/). - ## Soundwave plotting sink Since there is no plugin in the `Membrane Framework`, that already provides an element capable of plotting soundwave, we need to write one on our own. diff --git a/livebooks/speech_to_text/speech_to_text.livemd b/livebooks/speech_to_text/speech_to_text.livemd index 5f0c78a1..846f7621 100644 --- a/livebooks/speech_to_text/speech_to_text.livemd +++ b/livebooks/speech_to_text/speech_to_text.livemd @@ -8,7 +8,7 @@ Mix.install( {:bumblebee, "~> 0.4.2"}, {:exla, "~> 0.6.4"}, {:membrane_core, "~> 1.0"}, - {:membrane_portaudio_plugin, "~> 0.18.0"} + {:membrane_portaudio_plugin, "~> 0.18.3"} ], config: [ nx: [default_backend: EXLA.Backend] @@ -16,10 +16,6 @@ Mix.install( ) ``` -## Prerequisites - -On Linux, you need to install PortAudio, for example with `sudo apt install portaudio19-dev`. Check [membrane_portaudio_plugin](https://github.com/membraneframework/membrane_portaudio_plugin#installation) for details. - ## Introduction This livebook example shows how to perform a real-time speech-to-text conversion with the use of the [Membrane Framework](https://github.com/membraneframework) and the [Bumblebee](https://github.com/elixir-nx/bumblebee).