m1k1o/go-transcode là dự án Developer Tools trên GitHub, viết chủ yếu bằng Go, với 293 sao. On-demand transcoding origin server for live inputs and static files in Go using ffmpeg. Also with NVIDIA GPU hardware acceleration.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
On demand transcoding of live sources and static files (with seeking).
Why
Transcoding is expensive and resource consuming operation on CPU and GPU. For big companies with thousands of customers it is essential, to have a dedicated 24/7 transcoding servers which can store all the transcoded versions.
For the rest of us who don't have infinite resources and cannot have 3 times bigger media library because of transcoding, we should only transcode when it is needed. This tool is trying to solve this problem by offering transcoding on demand.
This feature is common in media centers (plex, jellyfin) but there was no simple transcoding server without all other media center features. Now there is one! go-transcode is simple and extensible, and will probably not add features unrelated to transcoding.
Features
Sources:
Live streams
VOD (static files, basic support)
Any codec/container supported by ffmpeg
Live Outputs:
Basic MP4 over HTTP (h264+aac) : http://go-transcode/[profile]/[stream-id]
Basic HLS over HTTP (h264+aac) : http://go-transcode/[profile]/[stream-id]/index.m3u8
Demo HTML player (for HLS) : http://go-transcode/[profile]/[stream-id]/play.html
Demo HTML player (for master playlist) : http://go-transcode/vod/[media-path]/play.html
Features:
Seeking for static files (indexed vod files)
Audio/Subtitles tracks
Private mode (serve users authenticated by reverse proxy)
You can find examples in docs.
Config
Place your config file in ./config.yaml (or /etc/transcode/config.yaml). The streams are defined like this:
streams:
<stream-id>: <stream-url>
Full configuration example:
# allow debug outputs
debug: true
# mount debug pprof endpoint at /debug/pprof/
pprof: true
# bind server to IP:PORT (use :8888 for all connections)
bind: localhost:8888
# serve static files from this directory (optional)
static: /var/www/html
# X-Forwarded-For headers will be used to determine the client IP
proxy: true
# allow CORS requests (for web players)
cors: true
# For live streaming
streams:
cam: rtmp://localhost/live/cam
ch1_hd: http://192.168.1.34:9981/stream/channelid/85
ch2_hd: http://192.168.1.34:9981/stream/channelid/43
# To import channels from enigma2
enigma2:
# address of your enigma2 device (if using password, use http://user:pass@host:port)
webif-url: http://192.168.1.10/
# (optional) address of your enigma2 stream server, if empty, webif-url will be used with port 8001
stream-url: http://192.168.1.10:8001/
# name of the bouquet to import channels from
bouquet: "SKY Germany HD"
# reference to the bouquet to import channels from (use instead of bouquet name)
reference: "1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.dbe0e.tv" ORDER BY bouquet"
# For static files
vod:
# Source, where are static files, that will be transcoded
media-dir: ./media
# Temporary transcode output directory, if empty, default tmp folder will be used
transcode-dir: ./transcode
# Available video profiles
video-profiles:
360p:
width: 640 # px
height: 360 # px
bitrate: 800 # kbps
540p:
width: 960
height: 540
bitrate: 1800
720p:
width: 1280
height: 720
bitrate: 2800
1080p:
width: 1920
height: 1080
bitrate: 5000
# Use video keyframes as existing reference for chunks split
# Using this might cause long probing times in order to get
# all keyframes - therefore they should be cached
video-keyframes: false
# Single audio profile used
audio-profile:
bitrate: 192 # kbps
# If cache is enabled
cache: true
# If dir is empty, cache will be stored in the same directory as media source
# If not empty, cache files will be saved to specified directory
cache-dir: ./cache
# OPTIONAL: Use custom ffmpeg & ffprobe binary paths
ffmpeg-binary: ffmpeg
ffprobe-binary: ffprobe
# For proxying HLS streams
hls-proxy:
my_server: http://192.168.1.34:9981
Transcoding profiles for live streams
go-transcode supports any formats that ffmpeg likes. We provide profiles out-of-the-box for h264+aac (mp4 container) for 360p, 540p, 720p and 1080p resolutions: h264_360p, h264_540p, h264_720p and h264_1080p. Profiles can have any name, but must match regex: ^[0-9A-Za-z_-]+$
In these profile directories, actual profiles are located in hls/ and http/, depending on the output format requested. The profiles scripts detect hardware support by running ffmpeg. No special config needed to use hardware acceleration.
Install
Clone repository and build with go compiler:
$ git clone https://github.com/m1k1o/go-transcode
$ cd go-transcode
$ go build
$ ./go-transcode serve
3:58PM WRN preflight complete without config file debug=false
3:56PM INF starting main server service=main
3:56PM INF http listening on 127.0.0.1:8080 module=http
3:56PM INF serving streams from basedir /home/klahaha/go-transcode: map[] service=main
3:56PM INF main ready service=main
First line is warning and "serving streams" line says empty list (map[]) because we don't have config.yaml so there no stream configured. Make your config.yaml and try again.
Input codec will be automatically determined from given stream. Please check your graphic card's supported codec and maximum concurrent sessions here.
Codec
CUVID
Codec Name
h264
h264_cuvid
H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
hevc
hevc_cuvid
H.265 / HEVC
mjpeg
mjpeg_cuvid
Motion JPEG
mpeg1video
mpeg1_cuvid
MPEG-1 video
mpeg2video
mpeg2_cuvid
MPEG-2 video
mpeg4
mpeg4_cuvid
MPEG-4 part 2
vc1
vc1_cuvid
SMPTE VC-1
vp8
vp8_cuvid
On2 VP8
vp9
vp9_cuvid
Google VP9
Alternatives
nginx-vod-module: Only supports MP4 sources.
tvheadend: Intended for various live sources (IPTV or DVB), not media library - although it can record TV. Supports Nvidia acceleration, but it is hard to compile.
jellyfin: Supports live TV sources, although does not work realiably. Cannot run standalone transcoding service (without media library).
Any suggestions?
Contribute
Join us in the Matrix space (or the #go-transcode-general room directly) or via XMPP bridge.
Architecture
The source code is in the following files/folders:
cmd/ and main.go: source for the command-line interface
hls/: process runner for HLS transcoding
hlsvod/: process runner for HLS VOD transcoding (for static files)
internal/: actual source code logic
TODO: document different modules/packages and dependencies
Other files/folders in the repositories are:
data/: files used/served by go-transcode
dev/: some docker helper scripts
profiles/: the ffmpeg profiles for transcoding
tests/: some tests for the project
Dockerfile, Dockerfile.nvidia and docker-compose.yaml: for the docker lovers
god.mod and go.sum: golang dependencies/modules tracking
m1k1o/go-transcode thuộc nhóm Developer Tools trên TopGit, cùng 9 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về m1k1o/go-transcode ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/m1k1o/go-transcode là nguồn chính thức.
m1k1o/go-transcode có phải mã nguồn mở không?
Có — m1k1o/go-transcode phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/m1k1o/go-transcode.
m1k1o/go-transcode là gì?
m1k1o/go-transcode (m1k1o/go-transcode) là dự án Go trên GitHub. Theo mô tả gốc: On-demand transcoding origin server for live inputs and static files in Go using ffmpeg. Also with NVIDIA GPU hardware acceleration.
m1k1o/go-transcode so với các dự án Developer Tools khác thế nào?
m1k1o/go-transcode được TopGit xếp vào nhóm Developer Tools, với 293 sao GitHub và viết bằng Go. Xem trang chủ đề Developer Tools trên TopGit để so sánh với các dự án tương tự theo số sao và mức độ hoạt động.
Vì sao m1k1o/go-transcode được xếp vào nhóm Developer Tools?
TopGit xếp m1k1o/go-transcode vào nhóm Developer Tools dựa trên GitHub topics và mô tả của repo (gắn thẻ: "demand-transcoding", "docker", "ffmpeg"). Việc phân loại dựa trên metadata thật của repo, không phải đoán theo cảm tính biên tập.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về go-transcode?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về go-transcode.