potok

module
v0.0.0-...-3cd9b9f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2023 License: MIT

README


potok

Video transcoding solution converting live webcam streams to HLS (HTTP Live Streaming) that browsers and players can consume. It also supports often needed requirements like watermarking and scaling the video streams.

Requirements

  • Go (for development only)
  • ffmpeg
    • Install latest release for macOS
      brew install ffmpeg
      
    • Install latest release for Linux kernels >= v3.2.0
      wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz
      tar xvf ffmpeg-release-amd64-static.tar.xz
      sudo mv ffmpeg-*-amd64-static/ff* /usr/local/bin/
      

Defining Streams

Streams are defined in a single YAML file following the format:

- name: <Stream Name> (required)
  url: <URL of the IP camera> (required)
  rtsp_transport: <"tcp" or "udp"> (optional, "tcp" is default)
  scale: <width:height> (optional)
  watermarks:
    - file: <path to the image> (required)
      opacity: <0.1 - 1> (required)
      position: <"top-left" or "center" or "bottom-right"> (required)

Definitions will be transcoded and the main streaming playlist (video) will each be served over HTTP at:

http://localhost:53030/streaming/<Stream Name>/playlist.m3u8

Web Player

Since only Apple products natively support HLS, you're recommended to use HLS.js as an open-source browser player.

Meaning of "potok"

The literal transalation of "stream" in Bosnian/Croatian/Serbian language is "potok" (Google Translate). It is actually a river stream.

Directories

Path Synopsis
cmd
pkg
env

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL