Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -50,4 +44,3 @@ jobs:
generate_release_notes: true
files: |
./burrito_out/*
./shinkai_checksums.txt
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -29,33 +30,48 @@ 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/<stream_name>
```

or get the manifest file link and feed it to your player:
```
```bash
ffplay http://localhost:8888/hls/<stream_name>/master.m3u8
```

### RTMP
[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/<stream_name>
```

### RTSP
[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
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`:

```elixir
def deps do
[
{:shinkai, "~> 0.2.0"}
{:shinkai, "~> 0.3.0"}
]
end
```
9 changes: 9 additions & 0 deletions lib/shinkai/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ defmodule Shinkai.Application do

use Application

require Logger

alias Shinkai.Sources

def start(_type, _args) do
Expand Down Expand Up @@ -40,6 +42,13 @@ 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
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading