修复vtt时间轴问题 fix #41
This commit is contained in:
parent
fa76a101fa
commit
4cc5fd6d35
|
@ -433,7 +433,7 @@ namespace N_m3u8DL_RE.CommandLine
|
||||||
Environment.Exit(0);
|
Environment.Exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
var rootCommand = new RootCommand("N_m3u8DL-RE (Beta version) 20220928")
|
var rootCommand = new RootCommand("N_m3u8DL-RE (Beta version) 20221011")
|
||||||
{
|
{
|
||||||
Input, TmpDir, SaveDir, SaveName, BaseUrl, ThreadCount, DownloadRetryCount, AutoSelect, SkipMerge, SkipDownload, CheckSegmentsCount,
|
Input, TmpDir, SaveDir, SaveName, BaseUrl, ThreadCount, DownloadRetryCount, AutoSelect, SkipMerge, SkipDownload, CheckSegmentsCount,
|
||||||
BinaryMerge, DelAfterDone, WriteMetaJson, AppendUrlParams, ConcurrentDownload, Headers, /**SavePattern,**/ SubOnly, SubtitleFormat, AutoSubtitleFix,
|
BinaryMerge, DelAfterDone, WriteMetaJson, AppendUrlParams, ConcurrentDownload, Headers, /**SavePattern,**/ SubOnly, SubtitleFormat, AutoSubtitleFix,
|
||||||
|
|
|
@ -345,7 +345,7 @@ namespace N_m3u8DL_RE.DownloadManager
|
||||||
//手动计算MPEGTS
|
//手动计算MPEGTS
|
||||||
if (finalVtt.MpegtsTimestamp == 0 && vtt.MpegtsTimestamp == 0)
|
if (finalVtt.MpegtsTimestamp == 0 && vtt.MpegtsTimestamp == 0)
|
||||||
{
|
{
|
||||||
vtt.MpegtsTimestamp = 90 * (long)(seg.Duration * 1000) * seg.Index;
|
vtt.MpegtsTimestamp = 90000 * (long)keys.Where(s => s.Index < seg.Index).Sum(s => s.Duration);
|
||||||
}
|
}
|
||||||
if (first)
|
if (first)
|
||||||
{
|
{
|
||||||
|
|
|
@ -322,7 +322,7 @@ namespace N_m3u8DL_RE.DownloadManager
|
||||||
//手动计算MPEGTS
|
//手动计算MPEGTS
|
||||||
if (currentVtt.MpegtsTimestamp == 0 && vtt.MpegtsTimestamp == 0)
|
if (currentVtt.MpegtsTimestamp == 0 && vtt.MpegtsTimestamp == 0)
|
||||||
{
|
{
|
||||||
vtt.MpegtsTimestamp = 90 * (long)(seg.Duration * 1000) * seg.Index;
|
vtt.MpegtsTimestamp = 90000 * (long)keys.Where(s => s.Index < seg.Index).Sum(s => s.Duration);
|
||||||
}
|
}
|
||||||
if (firstSub)
|
if (firstSub)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue