修复PTS漂移综合症
This commit is contained in:
@@ -595,9 +595,12 @@ app.get('/api/hls/segment.ts', async (req, res) => {
|
||||
'-hls_time', HLS_SEGMENT_TIME.toString(),
|
||||
'-hls_list_size', '0',
|
||||
'-hls_segment_filename', segmentFilename,
|
||||
'-start_number', seg.toString()
|
||||
'-start_number', seg.toString(),
|
||||
'-copyts',
|
||||
'-avoid_negative_ts', 'disabled',
|
||||
'-muxdelay', '0',
|
||||
'-muxpreload', '0'
|
||||
]);
|
||||
if (startTime > 0) hlsOptions.push('-output_ts_offset', startTime.toString());
|
||||
|
||||
ffmpegCommand.outputOptions(hlsOptions).output(m3u8Path);
|
||||
ffmpegCommand.on('error', (err) => {
|
||||
|
||||
Reference in New Issue
Block a user