New video transcoder (#27)

* New video transcoder

* Set a smaller max muxing size + logging tweaks

* No need to return an err since it wiill panic anyway

* Use a default encoder preset if one is not supplied

* Rename to NewTranscoder.  Add comments.

* Rename Bitrate to VideoBitrate. Config file changes required with this rename.

* Allow overrides of segment length. Allow offline stream to live in a single segment

* Append offline state video to existin HLS stream instead of overwriting because players do not like that

* Make properties private as they do not need to be exported
This commit is contained in:
Gabe Kangas
2020-06-25 17:44:47 -07:00
committed by GitHub
parent 17eb9da30c
commit 04dc0796d8
12 changed files with 390 additions and 229 deletions

View File

@@ -1,18 +1,25 @@
publicHLSPath: webroot/hls
privateHLSPath: hls
ffmpegPath: /usr/local/bin/ffmpeg
ffmpegPath: /usr/bin/ffmpeg
webServerPort: 8080
enableOfflineImage: true
videoSettings:
chunkLengthInSeconds: 4
streamingKey: abc123
encoderPreset: superfast # https://trac.ffmpeg.org/wiki/Encode/H.264
passthrough: true # Enabling this will ignore the below stream qualities and pass through the same quality that you're sending it
offlineImage: doc/logo.png # Is displayed when a stream ends
offlineContent: static/offline.m4v # Is displayed when a stream ends
streamQualities:
- bitrate: 1000 # in k
# Pass through the exact video and audio that you're streaming.
- full:
videoPassthrough: true
audioPassthrough: true
# Transcode the video to a lower bitrate and resize
# - low:
# videoBitrate: 700
# scaledWidth: 600
# audioPassthrough: true
# encoderPreset: superfast
files:
maxNumberInPlaylist: 30
@@ -27,4 +34,4 @@ s3:
accessKey: ABC12342069
secret: lolomgqwtf49583949
region: us-west-2
bucket: myvideo
bucket: myvideo