Skip to content

Commit

Permalink
Add 'seekable 0' and 'thread_queue_size 1024' to ffmpeg args
Browse files Browse the repository at this point in the history
Fixes #156
  • Loading branch information
Kethsar committed Sep 2, 2023
1 parent 1a47c29 commit 6f44209
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion player_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ func (di *DownloadInfo) GetPlayablePlayerResponse() (retrieved int, pr *PlayerRe
*/
time.Sleep(time.Duration(DefaultPollTime) * time.Second)
secsLate += DefaultPollTime
LogGeneral("\rStream is %d seconds late...", secsLate)
LogGeneral("Stream is %d seconds late...", secsLate)
continue

case PlayableOk:
Expand Down
12 changes: 10 additions & 2 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -909,11 +909,19 @@ func GetFFmpegArgs(audioFile, videoFile, thumbnail, fileDir, fileName string, on
}

if !onlyVideo {
ffmpegArgs = append(ffmpegArgs, "-i", audioFile)
ffmpegArgs = append(ffmpegArgs,
"-seekable", "0",
"-thread_queue_size", "1024",
"-i", audioFile,
)
}

if !onlyAudio {
ffmpegArgs = append(ffmpegArgs, "-i", videoFile)
ffmpegArgs = append(ffmpegArgs,
"-seekable", "0",
"-thread_queue_size", "1024",
"-i", videoFile,
)
if !mkv {
ffmpegArgs = append(ffmpegArgs, "-movflags", "faststart")
}
Expand Down

0 comments on commit 6f44209

Please sign in to comment.