From ad065e94025fec6896eca4d4d62d9900cc2105e0 Mon Sep 17 00:00:00 2001 From: Billal GHILAS Date: Mon, 26 Jan 2026 23:00:20 +0100 Subject: [PATCH 1/4] Release v0.3.0 --- README.md | 28 ++++++++++++++++++++++------ lib/shinkai/application.ex | 7 +++++++ mix.exs | 2 +- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 23261b8..aa29f7c 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,15 @@ Live streams can be published to the server using: | Protocol | Variants | Video Codecs | Audio Codecs | |----------|----------|--------------|--------------| -| RTSP client/cameras | TCP/UDP | H264, H265, AV1 | MPEG-4(AAC), G711(PCMA/PCMU) |\ -| RTMP client/publish | - | H264, H265, AV1 | MPEG-4(AAC), G711(PCMA/PCMU) | +| RTSP client/cameras/publish | TCP/UDP | H264, H265, AV1 | MPEG-4(AAC), G711(PCMA/PCMU), Opus | +| RTMP client/publish | - | H264, H265, AV1 | MPEG-4(AAC), G711(PCMA/PCMU), Opus | Live streams can be read from the server with: | Protocol | Variants | Video Codecs | Audio Codecs | |----------|----------|--------------|--------------| | HLS | fMP4/mpeg-ts/Low Latency | H264, H265, AV1 | MPEG-4(AAC) | +| RTMP | - | H264, H265, AV1 | MPEG-4(AAC), G711(PCMA/PCMU), Opus | ## Usage and configuration @@ -29,12 +30,12 @@ Check the [configuration documentation](https://hexdocs.pm/shinkai/Shinkai.html) [HLS](https://developer.apple.com/streaming/) (HTTP Live Streaming) is an http based protocol widely supported on many devices. It works by splitting the media stream into small chunks and serving them over HTTP. You can access the generated HLS by hitting the web page at: -``` +```bash http://localhost:8888/hls/ ``` or get the manifest file link and feed it to your player: -``` +```bash ffplay http://localhost:8888/hls//master.m3u8 ``` @@ -42,12 +43,27 @@ ffplay http://localhost:8888/hls//master.m3u8 [RTMP](https://en.wikipedia.org/wiki/Real-Time_Messaging_Protocol) (Real-Time Messaging Protocol) is a protocol for streaming audio, video, and data over the internet. It is widely used for live streaming applications. To publish a stream to the server using RTMP, you can use `ffmpeg`: -``` +```bash ffmpeg -re -i input.mp4 -c copy -f flv rtmp://localhost:1935/live/test ``` The stream will be available under the name `live-test` for playback. +To play any source using rtmp, you can use the source name as follows: +```bash +rtmp://localhost:1935/ +``` + +### RTSP +[RTSP](https://en.wikipedia.org/wiki/Real_Time_Streaming_Protocol) (Real-Time Streaming Protocol) is a network control protocol designed for use in entertainment and communications systems to control streaming media servers. + +To publish a stream to the server using RTSP, you can use `ffmpeg`: +```bash +ffmpeg -re -i input.mp4 -c copy -f rtsp rtsp://localhost:8554/live/test +``` + +The stream will be available under the name `live-test` for playback. + ## Installation The package can be installed by adding `shinkai` to your list of dependencies in `mix.exs`: @@ -55,7 +71,7 @@ The package can be installed by adding `shinkai` to your list of dependencies in ```elixir def deps do [ - {:shinkai, "~> 0.2.0"} + {:shinkai, "~> 0.3.0"} ] end ``` diff --git a/lib/shinkai/application.ex b/lib/shinkai/application.ex index 0d4b0cf..6c6d5da 100644 --- a/lib/shinkai/application.ex +++ b/lib/shinkai/application.ex @@ -3,6 +3,8 @@ defmodule Shinkai.Application do use Application + require Logger + alias Shinkai.Sources def start(_type, _args) do @@ -40,6 +42,11 @@ defmodule Shinkai.Application do children end + # Macro.camelize(to_string(:live)) is there to create :live macro + # because burrito releases fails when an rtmp stream is published with + # :live atom not existing. + Logger.info("Shinkai #{Macro.camelize(to_string(:live))} Media Server v#{Application.spec(:shinkai, :vsn)}") + opts = [strategy: :one_for_one, name: Shinkai.Supervisor] Supervisor.start_link(children, opts) end diff --git a/mix.exs b/mix.exs index 2c96bc4..657540f 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule Shinkai.MixProject do use Mix.Project - @version "0.2.0" + @version "0.3.0" @github_url "https://github.com/elixir-streaming/shinkai" def project do From 273385118f2015ccf63bb70ea76f04f148dcba2b Mon Sep 17 00:00:00 2001 From: Billal GHILAS Date: Tue, 27 Jan 2026 16:59:03 +0100 Subject: [PATCH 2/4] Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aa29f7c..5fcb05d 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ rtmp://localhost:1935/ ``` ### RTSP -[RTSP](https://en.wikipedia.org/wiki/Real_Time_Streaming_Protocol) (Real-Time Streaming Protocol) is a network control protocol designed for use in entertainment and communications systems to control streaming media servers. +[RTSP](https://en.wikipedia.org/wiki/Real_Time_Streaming_Protocol) (Real-Time Streaming Protocol) is an application-level network protocol designed for multiplexing and packetizing multimedia transport streams (such as interactive media, video and audio) over a suitable transport protocol. To publish a stream to the server using RTSP, you can use `ffmpeg`: ```bash From acb7e653cf166be46fba9af1021d0493591a48ce Mon Sep 17 00:00:00 2001 From: Billal GHILAS Date: Tue, 27 Jan 2026 18:57:28 +0100 Subject: [PATCH 3/4] Update release github actions --- .github/workflows/release.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c80baba..af1eea0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,16 +32,10 @@ jobs: - name: Create Checksum run: | - chmod +x ./burrito_out/* - shasum -a 256 ./burrito_out/* > shinkai_checksums.txt - - - name: Create GitHub Release - id: create_release - uses: actions/create-release@v1 - with: - tag_name: ${{ github.ref_name }} - release_name: Release ${{ github.ref_name }} - draft: true + cd ./burrito_out + chmod +x ./* + shasum -a 256 ./* > shinkai_checksums.txt + cd .. - name: Publish archives and packages uses: softprops/action-gh-release@v1 @@ -50,4 +44,3 @@ jobs: generate_release_notes: true files: | ./burrito_out/* - ./shinkai_checksums.txt From e4fbeb946c832a5790e9c1c31543222c7458f10e Mon Sep 17 00:00:00 2001 From: Billal GHILAS Date: Tue, 27 Jan 2026 20:04:39 +0100 Subject: [PATCH 4/4] mix format --- lib/shinkai/application.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/shinkai/application.ex b/lib/shinkai/application.ex index 6c6d5da..9112a9f 100644 --- a/lib/shinkai/application.ex +++ b/lib/shinkai/application.ex @@ -45,7 +45,9 @@ defmodule Shinkai.Application do # Macro.camelize(to_string(:live)) is there to create :live macro # because burrito releases fails when an rtmp stream is published with # :live atom not existing. - Logger.info("Shinkai #{Macro.camelize(to_string(:live))} Media Server v#{Application.spec(:shinkai, :vsn)}") + Logger.info( + "Shinkai #{Macro.camelize(to_string(:live))} Media Server v#{Application.spec(:shinkai, :vsn)}" + ) opts = [strategy: :one_for_one, name: Shinkai.Supervisor] Supervisor.start_link(children, opts)