mirror of
https://github.com/bluenviron/mediamtx
synced 2025-02-22 22:56:52 +00:00
rename repository and executable (#1641)
This commit is contained in:
parent
f5fd89d3b4
commit
053f2ec282
2
.github/ISSUE_TEMPLATE/bug.md
vendored
2
.github/ISSUE_TEMPLATE/bug.md
vendored
@ -61,7 +61,7 @@ yes / no
|
||||
## Did you attach a network dump?
|
||||
|
||||
<!--
|
||||
If the bug arises when using rtsp-simple-server with an external hardware or software, the most helpful content you can provide is a dump of the data exchanged between the server and the target (network dump), that can be generated in this way:
|
||||
If the bug arises when using MediaMTX with an external hardware or software, the most helpful content you can provide is a dump of the data exchanged between the server and the target (network dump), that can be generated in this way:
|
||||
1) Download wireshark (https://www.wireshark.org/)
|
||||
2) Start capturing on the interface used for exchanging RTSP (if the server and the target software are both installed on your pc, the interface is probably "loopback", otherwise it's the one of your network card)
|
||||
3) Start the server and replicate the issue
|
||||
|
2
.github/ISSUE_TEMPLATE/config.yml
vendored
2
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -2,5 +2,5 @@ blank_issues_enabled: false
|
||||
|
||||
contact_links:
|
||||
- name: Question
|
||||
url: https://github.com/aler9/rtsp-simple-server/discussions/new
|
||||
url: https://github.com/aler9/mediamtx/discussions/new
|
||||
about: Ask the community for help
|
||||
|
92
README.md
92
README.md
@ -43,12 +43,12 @@ Features:
|
||||
* Natively compatible with the Raspberry Pi Camera
|
||||
* Compatible with Linux, Windows and macOS, does not require any dependency or interpreter, it's a single executable
|
||||
|
||||
[](https://github.com/aler9/rtsp-simple-server/actions?query=workflow:test)
|
||||
[](https://github.com/aler9/rtsp-simple-server/actions?query=workflow:lint)
|
||||
[](https://app.codecov.io/gh/aler9/rtsp-simple-server/branch/main)
|
||||
[](https://github.com/aler9/rtsp-simple-server/releases)
|
||||
[](https://github.com/aler9/mediamtx/actions?query=workflow:test)
|
||||
[](https://github.com/aler9/mediamtx/actions?query=workflow:lint)
|
||||
[](https://app.codecov.io/gh/aler9/mediamtx/branch/main)
|
||||
[](https://github.com/aler9/mediamtx/releases)
|
||||
[](https://hub.docker.com/r/aler9/rtsp-simple-server)
|
||||
[](https://aler9.github.io/rtsp-simple-server)
|
||||
[](https://aler9.github.io/mediamtx)
|
||||
|
||||
## Important announcement
|
||||
|
||||
@ -56,7 +56,7 @@ _rtsp-simple-server_ is being rebranded as _MediaMTX_. The reason is pretty obvi
|
||||
|
||||
Furthermore, my main open source projects are being transferred to the [bluenviron organization](https://github.com/bluenviron), in order to allow the community to maintain and evolve the code regardless of my personal availability.
|
||||
|
||||
In the next months, the repository name and the docker image name will be changed accordingly.
|
||||
In the next months, the repository name and the Docker image name will be changed accordingly.
|
||||
|
||||
## Table of contents
|
||||
|
||||
@ -118,12 +118,12 @@ In the next months, the repository name and the docker image name will be change
|
||||
|
||||
### Standard
|
||||
|
||||
1. Download and extract a precompiled binary from the [release page](https://github.com/aler9/rtsp-simple-server/releases).
|
||||
1. Download and extract a precompiled binary from the [release page](https://github.com/aler9/mediamtx/releases).
|
||||
|
||||
2. Start the server:
|
||||
|
||||
```
|
||||
./rtsp-simple-server
|
||||
./mediamtx
|
||||
```
|
||||
|
||||
### Docker
|
||||
@ -140,7 +140,7 @@ The `--network=host` flag is mandatory since Docker can change the source port o
|
||||
docker run --rm -it -e MTX_PROTOCOLS=tcp -p 8554:8554 -p 1935:1935 -p 8888:8888 -p 8889:8889 aler9/rtsp-simple-server
|
||||
```
|
||||
|
||||
Please keep in mind that the Docker image doesn't include _FFmpeg_. if you need to use _FFmpeg_ for an external command or anything else, you need to build a Docker image that contains both _rtsp-simple-server_ and _FFmpeg_, by following instructions [here](https://github.com/aler9/rtsp-simple-server/discussions/278#discussioncomment-549104).
|
||||
Please keep in mind that the Docker image doesn't include _FFmpeg_. if you need to use _FFmpeg_ for an external command or anything else, you need to build a Docker image that contains both _rtsp-simple-server_ and _FFmpeg_, by following instructions [here](https://github.com/aler9/mediamtx/discussions/278#discussioncomment-549104).
|
||||
|
||||
### OpenWRT
|
||||
|
||||
@ -157,15 +157,15 @@ Please keep in mind that the Docker image doesn't include _FFmpeg_. if you need
|
||||
3. Download the server Makefile and set the server version inside the file:
|
||||
|
||||
```
|
||||
mkdir package/rtsp-simple-server
|
||||
wget -O package/rtsp-simple-server/Makefile https://raw.githubusercontent.com/aler9/rtsp-simple-server/main/openwrt.mk
|
||||
sed -i "s/v0.0.0/$(git ls-remote --tags --sort=v:refname https://github.com/aler9/rtsp-simple-server | tail -n1 | sed 's/.*\///; s/\^{}//')/" package/rtsp-simple-server/Makefile
|
||||
mkdir package/mediamtx
|
||||
wget -O package/mediamtx/Makefile https://raw.githubusercontent.com/aler9/mediamtx/main/openwrt.mk
|
||||
sed -i "s/v0.0.0/$(git ls-remote --tags --sort=v:refname https://github.com/aler9/mediamtx | tail -n1 | sed 's/.*\///; s/\^{}//')/" package/mediamtx/Makefile
|
||||
```
|
||||
|
||||
4. Compile the server:
|
||||
|
||||
```
|
||||
make package/rtsp-simple-server/compile -j$(nproc)
|
||||
make package/mediamtx/compile -j$(nproc)
|
||||
```
|
||||
|
||||
5. Transfer the .ipk file from `bin/packages/*/base` to the OpenWRT system and install it with:
|
||||
@ -230,7 +230,7 @@ There are 3 ways to change the configuration:
|
||||
2. By overriding configuration parameters with environment variables, in the format `MTX_PARAMNAME`, where `PARAMNAME` is the uppercase name of a parameter. For instance, the `rtspAddress` parameter can be overridden in the following way:
|
||||
|
||||
```
|
||||
MTX_RTSPADDRESS="127.0.0.1:8554" ./rtsp-simple-server
|
||||
MTX_RTSPADDRESS="127.0.0.1:8554" ./mediamtx
|
||||
```
|
||||
|
||||
Parameters that have array as value can be overriden by setting a comma-separated list. For example:
|
||||
@ -241,7 +241,7 @@ There are 3 ways to change the configuration:
|
||||
Parameters in maps can be overridden by using underscores, in the following way:
|
||||
|
||||
```
|
||||
MTX_PATHS_TEST_SOURCE=rtsp://myurl ./rtsp-simple-server
|
||||
MTX_PATHS_TEST_SOURCE=rtsp://myurl ./mediamtx
|
||||
```
|
||||
|
||||
This method is particularly useful when using Docker; any configuration parameter can be changed by passing environment variables with the `-e` flag:
|
||||
@ -349,12 +349,12 @@ The encryption procedure is the following:
|
||||
After performing the encryption, put the base64-encoded result into the configuration file, and launch the server with the `MTX_CONFKEY` variable:
|
||||
|
||||
```
|
||||
MTX_CONFKEY=mykey ./rtsp-simple-server
|
||||
MTX_CONFKEY=mykey ./mediamtx
|
||||
```
|
||||
|
||||
### Proxy mode
|
||||
|
||||
_rtsp-simple-server_ is also a proxy, that is usually deployed in one of these scenarios:
|
||||
_MediaMTX_ is also a proxy, that is usually deployed in one of these scenarios:
|
||||
|
||||
* when there are multiple users that are reading a stream and the bandwidth is limited; the proxy is used to receive the stream once. Users can then connect to the proxy instead of the original source.
|
||||
* when there's a NAT / firewall between a stream and the users; the proxy is installed on the NAT and makes the stream available to the outside world.
|
||||
@ -390,7 +390,7 @@ paths:
|
||||
|
||||
### Remuxing, re-encoding, compression
|
||||
|
||||
To change the format, codec or compression of a stream, use _FFmpeg_ or _GStreamer_ together with _rtsp-simple-server_. For instance, to re-encode an existing stream, that is available in the `/original` path, and publish the resulting stream in the `/compressed` path, edit `mediamtx.yml` and replace everything inside section `paths` with the following content:
|
||||
To change the format, codec or compression of a stream, use _FFmpeg_ or _GStreamer_ together with _MediaMTX_. For instance, to re-encode an existing stream, that is available in the `/original` path, and publish the resulting stream in the `/compressed` path, edit `mediamtx.yml` and replace everything inside section `paths` with the following content:
|
||||
|
||||
```yml
|
||||
paths:
|
||||
@ -430,23 +430,23 @@ The command inserted into `runOnDemand` will start only when a client requests t
|
||||
|
||||
#### Linux
|
||||
|
||||
Systemd is the service manager used by Ubuntu, Debian and many other Linux distributions, and allows to launch _rtsp-simple-server_ on boot.
|
||||
Systemd is the service manager used by Ubuntu, Debian and many other Linux distributions, and allows to launch _MediaMTX_ on boot.
|
||||
|
||||
Download a release bundle from the [release page](https://github.com/aler9/rtsp-simple-server/releases), unzip it, and move the executable and configuration in the system:
|
||||
Download a release bundle from the [release page](https://github.com/aler9/mediamtx/releases), unzip it, and move the executable and configuration in the system:
|
||||
|
||||
```
|
||||
sudo mv rtsp-simple-server /usr/local/bin/
|
||||
sudo mv mediamtx /usr/local/bin/
|
||||
sudo mv mediamtx.yml /usr/local/etc/
|
||||
```
|
||||
|
||||
Create the service:
|
||||
|
||||
```
|
||||
sudo tee /etc/systemd/system/rtsp-simple-server.service >/dev/null << EOF
|
||||
sudo tee /etc/systemd/system/mediamtx.service >/dev/null << EOF
|
||||
[Unit]
|
||||
Wants=network.target
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/rtsp-simple-server /usr/local/etc/mediamtx.yml
|
||||
ExecStart=/usr/local/bin/mediamtx /usr/local/etc/mediamtx.yml
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
@ -456,22 +456,22 @@ Enable and start the service:
|
||||
|
||||
```
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable rtsp-simple-server
|
||||
sudo systemctl start rtsp-simple-server
|
||||
sudo systemctl enable mediamtx
|
||||
sudo systemctl start mediamtx
|
||||
```
|
||||
|
||||
#### Windows
|
||||
|
||||
Download the [WinSW v2 executable](https://github.com/winsw/winsw/releases/download/v2.11.0/WinSW-x64.exe) and place it into the same folder of `rtsp-simple-server.exe`.
|
||||
Download the [WinSW v2 executable](https://github.com/winsw/winsw/releases/download/v2.11.0/WinSW-x64.exe) and place it into the same folder of `mediamtx.exe`.
|
||||
|
||||
In the same folder, create a file named `WinSW-x64.xml` with this content:
|
||||
|
||||
```xml
|
||||
<service>
|
||||
<id>rtsp-simple-server</id>
|
||||
<name>rtsp-simple-server</name>
|
||||
<id>mediamtx</id>
|
||||
<name>mediamtx</name>
|
||||
<description></description>
|
||||
<executable>%BASE%/rtsp-simple-server.exe</executable>
|
||||
<executable>%BASE%/mediamtx.exe</executable>
|
||||
</service>
|
||||
```
|
||||
|
||||
@ -497,7 +497,7 @@ The API listens on `apiAddress`, that by default is `127.0.0.1:9997`; for instan
|
||||
curl http://127.0.0.1:9997/v1/paths/list
|
||||
```
|
||||
|
||||
Full documentation of the API is available on the [dedicated site](https://aler9.github.io/rtsp-simple-server/).
|
||||
Full documentation of the API is available on the [dedicated site](https://aler9.github.io/mediamtx/).
|
||||
|
||||
### Metrics
|
||||
|
||||
@ -569,7 +569,7 @@ Install Go ≥ 1.20, download the repository, open a terminal in it and run:
|
||||
go build .
|
||||
```
|
||||
|
||||
The command will produce the `rtsp-simple-server` binary.
|
||||
The command will produce the `mediamtx` binary.
|
||||
|
||||
#### Raspberry Pi
|
||||
|
||||
@ -590,7 +590,7 @@ cd ../../../
|
||||
go build -tags rpicamera .
|
||||
```
|
||||
|
||||
The command will produce the `rtsp-simple-server` binary.
|
||||
The command will produce the `mediamtx` binary.
|
||||
|
||||
#### Compile for all supported platforms
|
||||
|
||||
@ -634,7 +634,7 @@ After starting the server, the webcam can be reached on `rtsp://localhost:8554/c
|
||||
|
||||
### From a Raspberry Pi Camera
|
||||
|
||||
_rtsp-simple-server_ natively support the Raspberry Pi Camera, enabling high-quality and low-latency video streaming from the camera to any user. There are a couple of requisites:
|
||||
_MediaMTX_ natively support the Raspberry Pi Camera, enabling high-quality and low-latency video streaming from the camera to any user. There are a couple of requisites:
|
||||
|
||||
1. The server must run on a Raspberry Pi, with Raspberry Pi OS bullseye or newer as operative system. Both 32 bit and 64 bit operative systems are supported.
|
||||
|
||||
@ -681,7 +681,7 @@ paths:
|
||||
rpiCameraHeight: 1080
|
||||
```
|
||||
|
||||
All available parameters are listed in the [sample configuration file](https://github.com/aler9/rtsp-simple-server/blob/master/mediamtx.yml#L230).
|
||||
All available parameters are listed in the [sample configuration file](/mediamtx.yml).
|
||||
|
||||
### From OBS Studio
|
||||
|
||||
@ -899,7 +899,7 @@ If the client is _GStreamer_, disable the certificate validation:
|
||||
gst-launch-1.0 rtspsrc tls-validation-flags=0 location=rtsps://ip:8322/...
|
||||
```
|
||||
|
||||
At the moment _VLC_ doesn't support reading encrypted RTSP streams. A workaround consists in launching an instance of _rtsp-simple-server_ on the same machine in which _VLC_ is running, using it for reading the encrypted stream with the proxy mode, and reading the proxied stream with _VLC_.
|
||||
At the moment _VLC_ doesn't support reading encrypted RTSP streams. A workaround consists in launching an instance of _MediaMTX_ on the same machine in which _VLC_ is running, using it for reading the encrypted stream with the proxy mode, and reading the proxied stream with _VLC_.
|
||||
|
||||
### Redirect to another server
|
||||
|
||||
@ -1037,7 +1037,7 @@ ffmpeg -i rtsp://original-source -pix_fmt yuv420p -c:v libx264 -preset ultrafast
|
||||
The simples way to embed a HLS stream into a web page consists in using an iframe tag:
|
||||
|
||||
```html
|
||||
<iframe src="http://rtsp-simple-server-ip:8888/mystream" scrolling="no"></iframe>
|
||||
<iframe src="http://mediamtx-ip:8888/mystream" scrolling="no"></iframe>
|
||||
```
|
||||
|
||||
For more advanced options, you can create and serve a custom web page by starting from the [source code of the default page](internal/core/hls_index.html).
|
||||
@ -1046,13 +1046,7 @@ For more advanced options, you can create and serve a custom web page by startin
|
||||
|
||||
Low-Latency HLS is a [recently standardized](https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis) variant of the protocol that allows to greatly reduce playback latency. It works by splitting segments into parts, that are served before the segment is complete.
|
||||
|
||||
LL-HLS is disabled by default. To enable it, set the `hlsVariant` parameter in the configuration file:
|
||||
|
||||
```yml
|
||||
hlsVariant: lowLatency
|
||||
```
|
||||
|
||||
Every stream published to the server can be read with LL-HLS by visiting:
|
||||
LL-HLS is enabled by default. Every stream published to the server can be read with LL-HLS by visiting:
|
||||
|
||||
```
|
||||
https://localhost:8888/mystream
|
||||
@ -1088,9 +1082,7 @@ in HLS, latency is introduced since a client must wait for the server to generat
|
||||
|
||||
To decrease the latency, you can:
|
||||
|
||||
* enable the Low-Latency variant of the HLS protocol, as explained in the previous section;
|
||||
|
||||
* if Low-latency is enabled, try decreasing the `hlsPartDuration` parameter;
|
||||
* try decreasing the `hlsPartDuration` parameter;
|
||||
|
||||
* try decreasing the `hlsSegmentDuration` parameter;
|
||||
|
||||
@ -1133,7 +1125,7 @@ The NAT / container must then be configured in order to route all incoming UDP p
|
||||
docker run --rm -it \
|
||||
-p 8189:8189/udp
|
||||
....
|
||||
rtsp-simple-server
|
||||
aler9/rtsp-simple-server
|
||||
```
|
||||
|
||||
If the UDP protocol is blocked by a firewall, all WebRTC/ICE connections can be forced to pass through a single TCP server port:
|
||||
@ -1151,7 +1143,7 @@ The NAT / container must then be configured in order to redirect all incoming T
|
||||
docker run --rm -it \
|
||||
-p 8189:8189
|
||||
....
|
||||
rtsp-simple-server
|
||||
aler9/rtsp-simple-server
|
||||
```
|
||||
|
||||
Finally, if none of these methods work, you can force all WebRTC/ICE connections to pass through a TURN server, like [coturn](https://github.com/coturn/coturn), that must be configured externally. The server address and credentials must be set in the configuration file:
|
||||
@ -1168,14 +1160,14 @@ If the server uses a secret-based authentication (for instance, coturn with the
|
||||
webrtcICEServers: [turn:AUTH_SECRET:secret:host:port]
|
||||
```
|
||||
|
||||
where `secret` is the secret of the TURN server. _rtsp-simple-server_ will generate a set of credentials by using the secret, and credentials will be sent to clients before the WebRTC/ICE connection is established.
|
||||
where `secret` is the secret of the TURN server. _MediaMTX_ will generate a set of credentials by using the secret, and credentials will be sent to clients before the WebRTC/ICE connection is established.
|
||||
|
||||
### Embedding
|
||||
|
||||
The simples way to embed a WebRTC stream into a web page consists in using an iframe tag:
|
||||
|
||||
```html
|
||||
<iframe src="http://rtsp-simple-server-ip:8889/mystream" scrolling="no"></iframe>
|
||||
<iframe src="http://mediamtx-ip:8889/mystream" scrolling="no"></iframe>
|
||||
```
|
||||
|
||||
For more advanced options, you can create and serve a custom web page by starting from the [source code of the default page](internal/core/webrtc_index.html).
|
||||
|
@ -2,8 +2,8 @@ openapi: 3.0.0
|
||||
|
||||
info:
|
||||
version: 1.0.0
|
||||
title: rtsp-simple-server API
|
||||
description: API of rtsp-simple-server, a server and proxy that supports various protocols.
|
||||
title: mediamtx API
|
||||
description: API of mediamtx, a server and proxy that supports various protocols.
|
||||
license:
|
||||
name: MIT
|
||||
url: https://opensource.org/licenses/MIT
|
||||
|
@ -11,7 +11,7 @@ COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . ./
|
||||
RUN go build -o /rtsp-simple-server .
|
||||
RUN go build -o /mediamtx .
|
||||
|
||||
COPY bench/proxy/start.sh /
|
||||
RUN chmod +x /start.sh
|
||||
|
@ -15,7 +15,7 @@ CONF="${CONF}paths:\n"
|
||||
CONF="${CONF} all:\n"
|
||||
echo -e "$CONF" > /source.conf
|
||||
|
||||
RTSP_RTMPDISABLE=yes /rtsp-simple-server /source.conf &
|
||||
RTSP_RTMPDISABLE=yes /mediamtx /source.conf &
|
||||
|
||||
sleep 1
|
||||
|
||||
@ -38,7 +38,7 @@ for i in $(seq 1 $PROXY_COUNT); do
|
||||
done
|
||||
echo -e "$CONF" > /proxy.conf
|
||||
|
||||
RTSP_RTMPDISABLE=yes /rtsp-simple-server /proxy.conf &
|
||||
RTSP_RTMPDISABLE=yes /mediamtx /proxy.conf &
|
||||
|
||||
sleep 5
|
||||
|
||||
|
@ -11,7 +11,7 @@ COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . ./
|
||||
RUN go build -o /rtsp-simple-server .
|
||||
RUN go build -o /mediamtx .
|
||||
|
||||
COPY bench/publish/start.sh /
|
||||
RUN chmod +x /start.sh
|
||||
|
@ -12,7 +12,7 @@ CONF="${CONF}paths:\n"
|
||||
CONF="${CONF} all:\n"
|
||||
echo -e "$CONF" > /source.conf
|
||||
|
||||
/rtsp-simple-server /source.conf &
|
||||
/mediamtx /source.conf &
|
||||
|
||||
sleep 1
|
||||
|
||||
|
@ -11,7 +11,7 @@ COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . ./
|
||||
RUN go build -o /rtsp-simple-server .
|
||||
RUN go build -o /mediamtx .
|
||||
|
||||
COPY bench/read/start.sh /
|
||||
RUN chmod +x /start.sh
|
||||
|
@ -12,7 +12,7 @@ CONF="${CONF}paths:\n"
|
||||
CONF="${CONF} all:\n"
|
||||
echo -e "$CONF" > /source.conf
|
||||
|
||||
/rtsp-simple-server /source.conf &
|
||||
/mediamtx /source.conf &
|
||||
|
||||
sleep 1
|
||||
|
||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
||||
module github.com/aler9/rtsp-simple-server
|
||||
module github.com/aler9/mediamtx
|
||||
|
||||
go 1.20
|
||||
|
||||
|
@ -17,7 +17,7 @@ import (
|
||||
"golang.org/x/crypto/nacl/secretbox"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
)
|
||||
|
||||
func decrypt(key string, byts []byte) ([]byte, error) {
|
||||
@ -311,7 +311,7 @@ func (conf *Conf) CheckAndFillMissing() error {
|
||||
conf.LogDestinations = LogDestinations{logger.DestinationStdout: {}}
|
||||
}
|
||||
if conf.LogFile == "" {
|
||||
conf.LogFile = "rtsp-simple-server.log"
|
||||
conf.LogFile = "mediamtx.log"
|
||||
}
|
||||
if conf.ReadTimeout == 0 {
|
||||
conf.ReadTimeout = 10 * StringDuration(time.Second)
|
||||
|
@ -12,7 +12,7 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"golang.org/x/crypto/nacl/secretbox"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
)
|
||||
|
||||
func writeTempFile(byts []byte) (string, error) {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
)
|
||||
|
||||
// LogDestinations is the logDestionations parameter.
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
)
|
||||
|
||||
// LogLevel is the logLevel parameter.
|
||||
|
@ -11,8 +11,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/conf"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
)
|
||||
|
||||
func interfaceIsEmpty(i interface{}) bool {
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"github.com/pion/rtp"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp"
|
||||
"github.com/aler9/mediamtx/internal/rtmp"
|
||||
)
|
||||
|
||||
var testFormatH264 = &formats.H264{
|
||||
|
@ -12,17 +12,17 @@ import (
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/confwatcher"
|
||||
"github.com/aler9/rtsp-simple-server/internal/externalcmd"
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rlimit"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rpicamera"
|
||||
"github.com/aler9/mediamtx/internal/conf"
|
||||
"github.com/aler9/mediamtx/internal/confwatcher"
|
||||
"github.com/aler9/mediamtx/internal/externalcmd"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/rlimit"
|
||||
"github.com/aler9/mediamtx/internal/rpicamera"
|
||||
)
|
||||
|
||||
var version = "v0.0.0"
|
||||
|
||||
// Core is an instance of rtsp-simple-server.
|
||||
// Core is an instance of mediamtx.
|
||||
type Core struct {
|
||||
ctx context.Context
|
||||
ctxCancel func()
|
||||
|
@ -22,9 +22,9 @@ import (
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/mpeg4audio"
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/formatprocessor"
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/conf"
|
||||
"github.com/aler9/mediamtx/internal/formatprocessor"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
"github.com/bluenviron/gohlslib"
|
||||
)
|
||||
|
||||
@ -557,7 +557,7 @@ func (m *hlsMuxer) handleRequest(req *hlsMuxerRequest) func() *gohlslib.MuxerFil
|
||||
return &gohlslib.MuxerFileResponse{
|
||||
Status: http.StatusUnauthorized,
|
||||
Header: map[string]string{
|
||||
"WWW-Authenticate": `Basic realm="rtsp-simple-server"`,
|
||||
"WWW-Authenticate": `Basic realm="mediamtx"`,
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -567,7 +567,7 @@ func (m *hlsMuxer) handleRequest(req *hlsMuxerRequest) func() *gohlslib.MuxerFil
|
||||
return &gohlslib.MuxerFileResponse{
|
||||
Status: http.StatusUnauthorized,
|
||||
Header: map[string]string{
|
||||
"WWW-Authenticate": `Basic realm="rtsp-simple-server"`,
|
||||
"WWW-Authenticate": `Basic realm="mediamtx"`,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -15,8 +15,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/conf"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
)
|
||||
|
||||
type nilWriter struct{}
|
||||
|
@ -9,9 +9,9 @@ import (
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/formatprocessor"
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/conf"
|
||||
"github.com/aler9/mediamtx/internal/formatprocessor"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
)
|
||||
|
||||
type hlsSourceParent interface {
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
)
|
||||
|
||||
type httpLoggerWriter struct {
|
||||
@ -51,7 +51,7 @@ func httpLoggerMiddleware(p httpLoggerParent) func(*gin.Context) {
|
||||
logw := &httpLoggerWriter{ResponseWriter: ctx.Writer}
|
||||
ctx.Writer = logw
|
||||
|
||||
ctx.Writer.Header().Set("Server", "rtsp-simple-server")
|
||||
ctx.Writer.Header().Set("Server", "mediamtx")
|
||||
|
||||
ctx.Next()
|
||||
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
)
|
||||
|
||||
func metric(key string, value int64) string {
|
||||
|
@ -14,7 +14,7 @@ import (
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp"
|
||||
"github.com/aler9/mediamtx/internal/rtmp"
|
||||
)
|
||||
|
||||
func TestMetrics(t *testing.T) {
|
||||
|
@ -14,9 +14,9 @@ import (
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/externalcmd"
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/conf"
|
||||
"github.com/aler9/mediamtx/internal/externalcmd"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
)
|
||||
|
||||
func newEmptyTimer() *time.Timer {
|
||||
|
@ -5,9 +5,9 @@ import (
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/externalcmd"
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/conf"
|
||||
"github.com/aler9/mediamtx/internal/externalcmd"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
)
|
||||
|
||||
func pathConfCanBeUpdated(oldPathConf *conf.PathConf, newPathConf *conf.PathConf) bool {
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
// start pprof
|
||||
_ "net/http/pprof"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
)
|
||||
|
||||
type pprofParent interface {
|
||||
|
@ -7,10 +7,10 @@ import (
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/formatprocessor"
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rpicamera"
|
||||
"github.com/aler9/mediamtx/internal/conf"
|
||||
"github.com/aler9/mediamtx/internal/formatprocessor"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/rpicamera"
|
||||
)
|
||||
|
||||
func paramsFromConf(cnf *conf.PathConf) rpicamera.Params {
|
||||
|
@ -18,13 +18,13 @@ import (
|
||||
"github.com/google/uuid"
|
||||
"github.com/notedit/rtmp/format/flv/flvio"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/externalcmd"
|
||||
"github.com/aler9/rtsp-simple-server/internal/formatprocessor"
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/h264conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/message"
|
||||
"github.com/aler9/mediamtx/internal/conf"
|
||||
"github.com/aler9/mediamtx/internal/externalcmd"
|
||||
"github.com/aler9/mediamtx/internal/formatprocessor"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/rtmp"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/h264conf"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/message"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -8,9 +8,9 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/externalcmd"
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/conf"
|
||||
"github.com/aler9/mediamtx/internal/externalcmd"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
)
|
||||
|
||||
type rtmpServerAPIConnsListItem struct {
|
||||
|
@ -13,8 +13,8 @@ import (
|
||||
"github.com/notedit/rtmp/format/flv/flvio"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/message"
|
||||
"github.com/aler9/mediamtx/internal/rtmp"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/message"
|
||||
)
|
||||
|
||||
func TestRTMPServerRunOnConnect(t *testing.T) {
|
||||
|
@ -16,11 +16,11 @@ import (
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/h264"
|
||||
"github.com/notedit/rtmp/format/flv/flvio"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/formatprocessor"
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/message"
|
||||
"github.com/aler9/mediamtx/internal/conf"
|
||||
"github.com/aler9/mediamtx/internal/formatprocessor"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/rtmp"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/message"
|
||||
)
|
||||
|
||||
type rtmpSourceParent interface {
|
||||
|
@ -14,8 +14,8 @@ import (
|
||||
"github.com/pion/rtp"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/message"
|
||||
"github.com/aler9/mediamtx/internal/rtmp"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/message"
|
||||
)
|
||||
|
||||
func TestRTMPSource(t *testing.T) {
|
||||
|
@ -13,9 +13,9 @@ import (
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
"github.com/google/uuid"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/externalcmd"
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/conf"
|
||||
"github.com/aler9/mediamtx/internal/externalcmd"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -13,9 +13,9 @@ import (
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/headers"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/liberrors"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/externalcmd"
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/conf"
|
||||
"github.com/aler9/mediamtx/internal/externalcmd"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
)
|
||||
|
||||
type rtspServerAPIConnsListItem struct {
|
||||
|
@ -15,10 +15,10 @@ import (
|
||||
"github.com/google/uuid"
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/externalcmd"
|
||||
"github.com/aler9/rtsp-simple-server/internal/formatprocessor"
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/conf"
|
||||
"github.com/aler9/mediamtx/internal/externalcmd"
|
||||
"github.com/aler9/mediamtx/internal/formatprocessor"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -14,9 +14,9 @@ import (
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/formatprocessor"
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/conf"
|
||||
"github.com/aler9/mediamtx/internal/formatprocessor"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
)
|
||||
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/conf"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/formatprocessor"
|
||||
"github.com/aler9/mediamtx/internal/formatprocessor"
|
||||
)
|
||||
|
||||
type stream struct {
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/formatprocessor"
|
||||
"github.com/aler9/mediamtx/internal/formatprocessor"
|
||||
)
|
||||
|
||||
type streamFormat struct {
|
||||
|
@ -14,9 +14,9 @@ import (
|
||||
"github.com/bluenviron/mediacommon/pkg/formats/mpegts"
|
||||
"golang.org/x/net/ipv4"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/formatprocessor"
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/conf"
|
||||
"github.com/aler9/mediamtx/internal/formatprocessor"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -25,10 +25,10 @@ import (
|
||||
"github.com/pion/interceptor"
|
||||
"github.com/pion/webrtc/v3"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/formatprocessor"
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/rtsp-simple-server/internal/websocket"
|
||||
"github.com/aler9/mediamtx/internal/conf"
|
||||
"github.com/aler9/mediamtx/internal/formatprocessor"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/websocket"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -17,9 +17,9 @@ import (
|
||||
"github.com/pion/ice/v2"
|
||||
"github.com/pion/webrtc/v3"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/aler9/rtsp-simple-server/internal/websocket"
|
||||
"github.com/aler9/mediamtx/internal/conf"
|
||||
"github.com/aler9/mediamtx/internal/logger"
|
||||
"github.com/aler9/mediamtx/internal/websocket"
|
||||
)
|
||||
|
||||
//go:embed webrtc_index.html
|
||||
@ -372,12 +372,12 @@ func (s *webRTCServer) onRequest(ctx *gin.Context) {
|
||||
if err != nil {
|
||||
if terr, ok := err.(pathErrAuthCritical); ok {
|
||||
s.log(logger.Info, "authentication error: %s", terr.message)
|
||||
ctx.Writer.Header().Set("WWW-Authenticate", `Basic realm="rtsp-simple-server"`)
|
||||
ctx.Writer.Header().Set("WWW-Authenticate", `Basic realm="mediamtx"`)
|
||||
ctx.Writer.WriteHeader(http.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Writer.Header().Set("WWW-Authenticate", `Basic realm="rtsp-simple-server"`)
|
||||
ctx.Writer.Header().Set("WWW-Authenticate", `Basic realm="mediamtx"`)
|
||||
ctx.Writer.WriteHeader(http.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ import (
|
||||
|
||||
func buildImage(image string) error {
|
||||
ecmd := exec.Command("docker", "build", filepath.Join("images", image),
|
||||
"-t", "rtsp-simple-server-test-"+image)
|
||||
"-t", "mediamtx-test-"+image)
|
||||
ecmd.Stdout = nil
|
||||
ecmd.Stderr = os.Stderr
|
||||
return ecmd.Run()
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/core"
|
||||
"github.com/aler9/mediamtx/internal/core"
|
||||
)
|
||||
|
||||
var serverCert = []byte(`-----BEGIN CERTIFICATE-----
|
||||
@ -102,15 +102,15 @@ func newContainer(image string, name string, args []string) (*container, error)
|
||||
name: name,
|
||||
}
|
||||
|
||||
exec.Command("docker", "kill", "rtsp-simple-server-test-"+name).Run()
|
||||
exec.Command("docker", "wait", "rtsp-simple-server-test-"+name).Run()
|
||||
exec.Command("docker", "kill", "mediamtx-test-"+name).Run()
|
||||
exec.Command("docker", "wait", "mediamtx-test-"+name).Run()
|
||||
|
||||
// --network=host is needed to test multicast
|
||||
cmd := []string{
|
||||
"docker", "run",
|
||||
"--network=host",
|
||||
"--name=rtsp-simple-server-test-" + name,
|
||||
"rtsp-simple-server-test-" + image,
|
||||
"--name=mediamtx-test-" + name,
|
||||
"mediamtx-test-" + image,
|
||||
}
|
||||
cmd = append(cmd, args...)
|
||||
ecmd := exec.Command(cmd[0], cmd[1:]...)
|
||||
@ -128,14 +128,14 @@ func newContainer(image string, name string, args []string) (*container, error)
|
||||
}
|
||||
|
||||
func (c *container) close() {
|
||||
exec.Command("docker", "kill", "rtsp-simple-server-test-"+c.name).Run()
|
||||
exec.Command("docker", "wait", "rtsp-simple-server-test-"+c.name).Run()
|
||||
exec.Command("docker", "rm", "rtsp-simple-server-test-"+c.name).Run()
|
||||
exec.Command("docker", "kill", "mediamtx-test-"+c.name).Run()
|
||||
exec.Command("docker", "wait", "mediamtx-test-"+c.name).Run()
|
||||
exec.Command("docker", "rm", "mediamtx-test-"+c.name).Run()
|
||||
}
|
||||
|
||||
func (c *container) wait() int {
|
||||
exec.Command("docker", "wait", "rtsp-simple-server-test-"+c.name).Run()
|
||||
out, _ := exec.Command("docker", "inspect", "rtsp-simple-server-test-"+c.name,
|
||||
exec.Command("docker", "wait", "mediamtx-test-"+c.name).Run()
|
||||
out, _ := exec.Command("docker", "inspect", "mediamtx-test-"+c.name,
|
||||
"-f", "{{.State.ExitCode}}").Output()
|
||||
code, _ := strconv.ParseInt(string(out[:len(out)-1]), 10, 64)
|
||||
return int(code)
|
||||
|
@ -68,7 +68,7 @@ func New(level Level, destinations map[Destination]struct{}, filePath string) (*
|
||||
|
||||
if _, ok := destinations[DestinationSyslog]; ok {
|
||||
var err error
|
||||
lh.syslog, err = newSyslog("rtsp-simple-server")
|
||||
lh.syslog, err = newSyslog("mediamtx")
|
||||
if err != nil {
|
||||
lh.Close()
|
||||
return nil, err
|
||||
|
@ -15,10 +15,10 @@ import (
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/mpeg4audio"
|
||||
"github.com/notedit/rtmp/format/flv/flvio"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/bytecounter"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/h264conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/handshake"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/message"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/bytecounter"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/h264conf"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/handshake"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/message"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -13,10 +13,10 @@ import (
|
||||
"github.com/notedit/rtmp/format/flv/flvio"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/bytecounter"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/h264conf"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/handshake"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/message"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/bytecounter"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/h264conf"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/handshake"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/message"
|
||||
)
|
||||
|
||||
func TestInitializeClient(t *testing.T) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
package message
|
||||
|
||||
import (
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/rawmessage"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/rawmessage"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -3,8 +3,8 @@ package message //nolint:dupl
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/rawmessage"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/rawmessage"
|
||||
)
|
||||
|
||||
// MsgAcknowledge is an acknowledgement message.
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
|
||||
"github.com/notedit/rtmp/format/flv/flvio"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/rawmessage"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/rawmessage"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
|
||||
"github.com/notedit/rtmp/format/flv/flvio"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/rawmessage"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/rawmessage"
|
||||
)
|
||||
|
||||
// MsgCommandAMF0 is a AMF0 command message.
|
||||
|
@ -3,8 +3,8 @@ package message
|
||||
import (
|
||||
"github.com/notedit/rtmp/format/flv/flvio"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/rawmessage"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/rawmessage"
|
||||
)
|
||||
|
||||
// MsgDataAMF0 is a AMF0 data message.
|
||||
|
@ -3,8 +3,8 @@ package message //nolint:dupl
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/rawmessage"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/rawmessage"
|
||||
)
|
||||
|
||||
// MsgSetChunkSize is a set chunk size message.
|
||||
|
@ -3,8 +3,8 @@ package message //nolint:dupl
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/rawmessage"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/rawmessage"
|
||||
)
|
||||
|
||||
// MsgSetPeerBandwidth is a set peer bandwidth message.
|
||||
|
@ -3,8 +3,8 @@ package message //nolint:dupl
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/rawmessage"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/rawmessage"
|
||||
)
|
||||
|
||||
// MsgSetWindowAckSize is a set window acknowledgement message.
|
||||
|
@ -3,8 +3,8 @@ package message //nolint:dupl
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/rawmessage"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/rawmessage"
|
||||
)
|
||||
|
||||
// MsgUserControlPingRequest is a user control message.
|
||||
|
@ -3,8 +3,8 @@ package message //nolint:dupl
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/rawmessage"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/rawmessage"
|
||||
)
|
||||
|
||||
// MsgUserControlPingResponse is a user control message.
|
||||
|
@ -3,8 +3,8 @@ package message //nolint:dupl
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/rawmessage"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/rawmessage"
|
||||
)
|
||||
|
||||
// MsgUserControlSetBufferLength is a user control message.
|
||||
|
@ -3,8 +3,8 @@ package message //nolint:dupl
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/rawmessage"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/rawmessage"
|
||||
)
|
||||
|
||||
// MsgUserControlStreamBegin is a user control message.
|
||||
|
@ -3,8 +3,8 @@ package message //nolint:dupl
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/rawmessage"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/rawmessage"
|
||||
)
|
||||
|
||||
// MsgUserControlStreamDry is a user control message.
|
||||
|
@ -3,8 +3,8 @@ package message //nolint:dupl
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/rawmessage"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/rawmessage"
|
||||
)
|
||||
|
||||
// MsgUserControlStreamEOF is a user control message.
|
||||
|
@ -3,8 +3,8 @@ package message //nolint:dupl
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/rawmessage"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/rawmessage"
|
||||
)
|
||||
|
||||
// MsgUserControlStreamIsRecorded is a user control message.
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
|
||||
"github.com/notedit/rtmp/format/flv/flvio"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/rawmessage"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/rawmessage"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -3,9 +3,9 @@ package message
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/bytecounter"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/rawmessage"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/bytecounter"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/rawmessage"
|
||||
)
|
||||
|
||||
func allocateMessage(raw *rawmessage.Message) (Message, error) {
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"github.com/notedit/rtmp/format/flv/flvio"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/bytecounter"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/bytecounter"
|
||||
)
|
||||
|
||||
var readWriterCases = []struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package message
|
||||
|
||||
import (
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/bytecounter"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/bytecounter"
|
||||
)
|
||||
|
||||
// ReadWriter is a message reader/writer.
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/bytecounter"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/bytecounter"
|
||||
)
|
||||
|
||||
type duplexRW struct {
|
||||
|
@ -1,8 +1,8 @@
|
||||
package message
|
||||
|
||||
import (
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/bytecounter"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/rawmessage"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/bytecounter"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/rawmessage"
|
||||
)
|
||||
|
||||
// Writer is a message writer.
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/bytecounter"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/bytecounter"
|
||||
)
|
||||
|
||||
func TestWriter(t *testing.T) {
|
||||
|
@ -4,7 +4,7 @@ package rawmessage
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
)
|
||||
|
||||
// Message is a raw message.
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/bytecounter"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/bytecounter"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
)
|
||||
|
||||
var errMoreChunksNeeded = errors.New("more chunks are needed")
|
||||
|
@ -7,8 +7,8 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/bytecounter"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/bytecounter"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
)
|
||||
|
||||
var cases = []struct {
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/bytecounter"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/bytecounter"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
)
|
||||
|
||||
type writerChunkStream struct {
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/bytecounter"
|
||||
"github.com/aler9/rtsp-simple-server/internal/rtmp/chunk"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/bytecounter"
|
||||
"github.com/aler9/mediamtx/internal/rtmp/chunk"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
2
main.go
2
main.go
@ -4,7 +4,7 @@ package main
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/aler9/rtsp-simple-server/internal/core"
|
||||
"github.com/aler9/mediamtx/internal/core"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -7,7 +7,7 @@ logLevel: info
|
||||
# Destinations of log messages; available values are "stdout", "file" and "syslog".
|
||||
logDestinations: [stdout]
|
||||
# If "file" is in logDestinations, this is the file which will receive the logs.
|
||||
logFile: rtsp-simple-server.log
|
||||
logFile: mediamtx.log
|
||||
|
||||
# Timeout of read operations.
|
||||
readTimeout: 10s
|
||||
|
20
openwrt.mk
20
openwrt.mk
@ -1,36 +1,36 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=rtsp-simple-server
|
||||
PKG_NAME:=mediamtx
|
||||
PKG_VERSION:=v0.0.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/aler9/rtsp-simple-server
|
||||
PKG_SOURCE_URL:=https://github.com/aler9/mediamtx
|
||||
PKG_SOURCE_VERSION:=$(PKG_VERSION)
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=github.com/aler9/rtsp-simple-server
|
||||
GO_PKG_LDFLAGS_X:=github.com/aler9/rtsp-simple-server/internal/core.version=$(PKG_VERSION)
|
||||
GO_PKG:=github.com/aler9/mediamtx
|
||||
GO_PKG_LDFLAGS_X:=github.com/aler9/mediamtx/internal/core.version=$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
GO_MOD_ARGS:=-buildvcs=false
|
||||
|
||||
define Package/rtsp-simple-server
|
||||
define Package/mediamtx
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=rtsp-simple-server
|
||||
URL:=https://github.com/aler9/rtsp-simple-server
|
||||
TITLE:=mediamtx
|
||||
URL:=https://github.com/aler9/mediamtx
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS)
|
||||
endef
|
||||
|
||||
define Package/rtsp-simple-server/description
|
||||
define Package/mediamtx/description
|
||||
ready-to-use server and proxy that allows users to publish, read and proxy live video and audio streams through various protocols
|
||||
endef
|
||||
|
||||
$(eval $(call GoBinPackage,rtsp-simple-server))
|
||||
$(eval $(call BuildPackage,rtsp-simple-server))
|
||||
$(eval $(call GoBinPackage,mediamtx))
|
||||
$(eval $(call BuildPackage,mediamtx))
|
||||
|
@ -1,14 +1,14 @@
|
||||
define DOCKERFILE_BINARIES
|
||||
FROM $(RPI32_IMAGE) AS rpicamera32
|
||||
RUN ["cross-build-start"]
|
||||
RUN apt update && apt install -y --no-install-recommends g++ pkg-config make libcamera-dev libfreetype-dev patchelf
|
||||
RUN apt update && apt install -y --no-install-recommends g++ pkg-config make libcamera-dev libfreetype-dev xxd patchelf
|
||||
WORKDIR /s/internal/rpicamera
|
||||
COPY internal/rpicamera .
|
||||
RUN cd exe && make -j$$(nproc)
|
||||
|
||||
FROM $(RPI64_IMAGE) AS rpicamera64
|
||||
RUN ["cross-build-start"]
|
||||
RUN apt update && apt install -y --no-install-recommends g++ pkg-config make libcamera-dev libfreetype-dev patchelf
|
||||
RUN apt update && apt install -y --no-install-recommends g++ pkg-config make libcamera-dev libfreetype-dev xxd patchelf
|
||||
WORKDIR /s/internal/rpicamera
|
||||
COPY internal/rpicamera .
|
||||
RUN cd exe && make -j$$(nproc)
|
||||
@ -26,28 +26,28 @@ RUN rm -rf binaries
|
||||
RUN mkdir tmp binaries
|
||||
RUN cp mediamtx.yml LICENSE tmp/
|
||||
|
||||
RUN GOOS=windows GOARCH=amd64 go build -ldflags "-X github.com/aler9/rtsp-simple-server/internal/core.version=$$VERSION" -o tmp/rtsp-simple-server.exe
|
||||
RUN cd tmp && zip -q ../binaries/rtsp-simple-server_$${VERSION}_windows_amd64.zip rtsp-simple-server.exe mediamtx.yml LICENSE
|
||||
RUN GOOS=windows GOARCH=amd64 go build -ldflags "-X github.com/aler9/mediamtx/internal/core.version=$$VERSION" -o tmp/mediamtx.exe
|
||||
RUN cd tmp && zip -q ../binaries/mediamtx_$${VERSION}_windows_amd64.zip mediamtx.exe mediamtx.yml LICENSE
|
||||
|
||||
RUN GOOS=linux GOARCH=amd64 go build -ldflags "-X github.com/aler9/rtsp-simple-server/internal/core.version=$$VERSION" -o tmp/rtsp-simple-server
|
||||
RUN tar -C tmp -czf binaries/rtsp-simple-server_$${VERSION}_linux_amd64.tar.gz --owner=0 --group=0 rtsp-simple-server mediamtx.yml LICENSE
|
||||
RUN GOOS=linux GOARCH=amd64 go build -ldflags "-X github.com/aler9/mediamtx/internal/core.version=$$VERSION" -o tmp/mediamtx
|
||||
RUN tar -C tmp -czf binaries/mediamtx_$${VERSION}_linux_amd64.tar.gz --owner=0 --group=0 mediamtx mediamtx.yml LICENSE
|
||||
|
||||
RUN GOOS=darwin GOARCH=amd64 go build -ldflags "-X github.com/aler9/rtsp-simple-server/internal/core.version=$$VERSION" -o tmp/rtsp-simple-server
|
||||
RUN tar -C tmp -czf binaries/rtsp-simple-server_$${VERSION}_darwin_amd64.tar.gz --owner=0 --group=0 rtsp-simple-server mediamtx.yml LICENSE
|
||||
RUN GOOS=darwin GOARCH=amd64 go build -ldflags "-X github.com/aler9/mediamtx/internal/core.version=$$VERSION" -o tmp/mediamtx
|
||||
RUN tar -C tmp -czf binaries/mediamtx_$${VERSION}_darwin_amd64.tar.gz --owner=0 --group=0 mediamtx mediamtx.yml LICENSE
|
||||
|
||||
COPY --from=rpicamera32 /s/internal/rpicamera/exe/exe internal/rpicamera/exe/
|
||||
RUN GOOS=linux GOARCH=arm GOARM=6 go build -ldflags "-X github.com/aler9/rtsp-simple-server/internal/core.version=$$VERSION" -o tmp/rtsp-simple-server -tags rpicamera
|
||||
RUN tar -C tmp -czf binaries/rtsp-simple-server_$${VERSION}_linux_armv6.tar.gz --owner=0 --group=0 rtsp-simple-server mediamtx.yml LICENSE
|
||||
RUN GOOS=linux GOARCH=arm GOARM=6 go build -ldflags "-X github.com/aler9/mediamtx/internal/core.version=$$VERSION" -o tmp/mediamtx -tags rpicamera
|
||||
RUN tar -C tmp -czf binaries/mediamtx_$${VERSION}_linux_armv6.tar.gz --owner=0 --group=0 mediamtx mediamtx.yml LICENSE
|
||||
RUN rm internal/rpicamera/exe/exe
|
||||
|
||||
COPY --from=rpicamera32 /s/internal/rpicamera/exe/exe internal/rpicamera/exe/
|
||||
RUN GOOS=linux GOARCH=arm GOARM=7 go build -ldflags "-X github.com/aler9/rtsp-simple-server/internal/core.version=$$VERSION" -o tmp/rtsp-simple-server -tags rpicamera
|
||||
RUN tar -C tmp -czf binaries/rtsp-simple-server_$${VERSION}_linux_armv7.tar.gz --owner=0 --group=0 rtsp-simple-server mediamtx.yml LICENSE
|
||||
RUN GOOS=linux GOARCH=arm GOARM=7 go build -ldflags "-X github.com/aler9/mediamtx/internal/core.version=$$VERSION" -o tmp/mediamtx -tags rpicamera
|
||||
RUN tar -C tmp -czf binaries/mediamtx_$${VERSION}_linux_armv7.tar.gz --owner=0 --group=0 mediamtx mediamtx.yml LICENSE
|
||||
RUN rm internal/rpicamera/exe/exe
|
||||
|
||||
COPY --from=rpicamera64 /s/internal/rpicamera/exe/exe internal/rpicamera/exe/
|
||||
RUN GOOS=linux GOARCH=arm64 go build -ldflags "-X github.com/aler9/rtsp-simple-server/internal/core.version=$$VERSION" -o tmp/rtsp-simple-server -tags rpicamera
|
||||
RUN tar -C tmp -czf binaries/rtsp-simple-server_$${VERSION}_linux_arm64v8.tar.gz --owner=0 --group=0 rtsp-simple-server mediamtx.yml LICENSE
|
||||
RUN GOOS=linux GOARCH=arm64 go build -ldflags "-X github.com/aler9/mediamtx/internal/core.version=$$VERSION" -o tmp/mediamtx -tags rpicamera
|
||||
RUN tar -C tmp -czf binaries/mediamtx_$${VERSION}_linux_arm64v8.tar.gz --owner=0 --group=0 mediamtx mediamtx.yml LICENSE
|
||||
RUN rm internal/rpicamera/exe/exe
|
||||
endef
|
||||
export DOCKERFILE_BINARIES
|
||||
|
@ -2,7 +2,7 @@ define DOCKERFILE_DOCKERHUB
|
||||
FROM scratch
|
||||
ARG BINARY
|
||||
ADD $$BINARY /
|
||||
ENTRYPOINT [ "/rtsp-simple-server" ]
|
||||
ENTRYPOINT [ "/mediamtx" ]
|
||||
endef
|
||||
export DOCKERFILE_DOCKERHUB
|
||||
|
||||
@ -11,7 +11,7 @@ FROM $(RPI32_IMAGE) AS base
|
||||
RUN apt update && apt install -y --no-install-recommends libcamera0 libfreetype6
|
||||
ARG BINARY
|
||||
ADD $$BINARY /
|
||||
ENTRYPOINT [ "/rtsp-simple-server" ]
|
||||
ENTRYPOINT [ "/mediamtx" ]
|
||||
endef
|
||||
export DOCKERFILE_DOCKERHUB_RPI_32
|
||||
|
||||
@ -20,7 +20,7 @@ FROM $(RPI64_IMAGE)
|
||||
RUN apt update && apt install -y --no-install-recommends libcamera0 libfreetype6
|
||||
ARG BINARY
|
||||
ADD $$BINARY /
|
||||
ENTRYPOINT [ "/rtsp-simple-server" ]
|
||||
ENTRYPOINT [ "/mediamtx" ]
|
||||
endef
|
||||
export DOCKERFILE_DOCKERHUB_RPI_64
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user