Add ability to disable webtorrent
In favour of HLS
This commit is contained in:
parent
14981d7331
commit
d7a25329f9
80 changed files with 1189 additions and 540 deletions
|
@ -130,6 +130,7 @@ interface BaseTranscodeOptions {
|
|||
|
||||
interface HLSTranscodeOptions extends BaseTranscodeOptions {
|
||||
type: 'hls'
|
||||
copyCodecs: boolean
|
||||
hlsPlaylist: {
|
||||
videoFilename: string
|
||||
}
|
||||
|
@ -232,7 +233,7 @@ export {
|
|||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
async function buildx264Command (command: ffmpeg.FfmpegCommand, options: VideoTranscodeOptions) {
|
||||
async function buildx264Command (command: ffmpeg.FfmpegCommand, options: TranscodeOptions) {
|
||||
let fps = await getVideoFileFPS(options.inputPath)
|
||||
// On small/medium resolutions, limit FPS
|
||||
if (
|
||||
|
@ -287,7 +288,8 @@ async function buildQuickTranscodeCommand (command: ffmpeg.FfmpegCommand) {
|
|||
async function buildHLSCommand (command: ffmpeg.FfmpegCommand, options: HLSTranscodeOptions) {
|
||||
const videoPath = getHLSVideoPath(options)
|
||||
|
||||
command = await presetCopy(command)
|
||||
if (options.copyCodecs) command = await presetCopy(command)
|
||||
else command = await buildx264Command(command, options)
|
||||
|
||||
command = command.outputOption('-hls_time 4')
|
||||
.outputOption('-hls_list_size 0')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue