You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52-5Lines changed: 52 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
# go-transcode HTTP on-demand transcoding API
2
2
3
+
On demand transcoding of live sources and static files (with seeking).
4
+
3
5
## Why
4
6
5
7
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.
@@ -12,17 +14,21 @@ This feature is common in media centers (plex, jellyfin) but there was no simple
12
14
13
15
Sources:
14
16
-[x] Live streams
15
-
-[ ] Static files (basic support)
17
+
-[x] VOD (static files, basic support)
16
18
-[x] Any codec/container supported by ffmpeg
17
19
18
-
Outputs:
20
+
Live Outputs:
19
21
-[x] Basic MP4 over HTTP (h264+aac) : `http://go-transcode/[profile]/[stream-id]`
20
22
-[x] Basic HLS over HTTP (h264+aac) : `http://go-transcode/[profile]/[stream-id]/index.m3u8`
21
23
-[x] Demo HTML player (for HLS) : `http://go-transcode/[profile]/[stream-id]/play.html`
# Source, where are static files, that will be transcoded
71
+
media-dir: ./media
72
+
# Temporary transcode output directory, if empty, default tmp folder will be used
73
+
transcode-dir: ./transcode
74
+
# Available video profiles
75
+
video-profiles:
76
+
360p:
77
+
width: 640# px
78
+
height: 360# px
79
+
bitrate: 800# kbps
80
+
540p:
81
+
width: 960
82
+
height: 540
83
+
bitrate: 1800
84
+
720p:
85
+
width: 1280
86
+
height: 720
87
+
bitrate: 2800
88
+
1080p:
89
+
width: 1920
90
+
height: 1080
91
+
bitrate: 5000
92
+
# Use video keyframes as existing reference for chunks split
93
+
# Using this might cause long probing times in order to get
94
+
# all keyframes - therefore they should be cached
95
+
video-keyframes: false
96
+
# Single audio profile used
97
+
audio-profile:
98
+
bitrate: 192# kbps
99
+
# If cache is enabled
100
+
cache: true
101
+
# If dir is empty, cache will be stored in the same directory as media source
102
+
# If not empty, cache files will be saved to specified directory
103
+
cache-dir: ./cache
104
+
# Use custom ffmpeg & ffprobe binary paths
105
+
ffmpeg-binary: ffmpeg
106
+
ffprobe-binary: ffmpeg
107
+
61
108
# For proxying HLS streams
62
109
hls-proxy:
63
110
my_server: http://192.168.1.34:9981
64
-
65
111
```
66
112
67
-
## Transcoding profiles
113
+
## Transcoding profiles for live streams
68
114
69
115
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_-]+$`
70
116
@@ -160,6 +206,7 @@ The source code is in the following files/folders:
160
206
161
207
- `cmd/` and `main.go`: source for the command-line interface
162
208
- `hls/`: process runner for HLS transcoding
209
+
- `hlsvod/`: process runner for HLS VOD transcoding (for static files)
163
210
- `internal/`: actual source code logic
164
211
165
212
*TODO: document different modules/packages and dependencies*
0 commit comments