Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding concurrent-fragments option #265

Merged
merged 1 commit into from
Feb 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Adding concurrent-fragments option
davidvexel committed Feb 20, 2025
commit 11cb0e6688306a74a14734ae75b4067e075422d6
14 changes: 14 additions & 0 deletions src/Options.php
Original file line number Diff line number Diff line change
@@ -126,6 +126,7 @@ class Options
private ?string $externalDownloader = null;
private ?string $externalDownloaderArgs = null;
private ?string $downloadSections = null;
private ?int $concurrentFragments = null;

// Filesystem Options
private ?string $batchFile = null;
@@ -1541,6 +1542,18 @@ public function downloadSections(?string $downloadSections): self
return $new;
}

/**
* Number of fragments of a dash/hlsnative
* video that should be downloaded concurrently (default is 1).
*/
public function concurrentFragments(?int $concurrentFragments): self
{
$new = clone $this;
$new->concurrentFragments = $concurrentFragments;

return $new;
}

/**
* Force keyframes at cuts when downloading/splitting/removing sections.
* This is slow due to needing a re-encode, but the resulting video
@@ -1829,6 +1842,7 @@ public function toArray(): array
'external-downloader' => $this->externalDownloader,
'external-downloader-args' => $this->externalDownloaderArgs,
'download-sections' => $this->downloadSections,
'concurrent-fragments' => $this->concurrentFragments,
// Filesystem Options
'batch-file' => $this->batchFile,
'id' => $this->id,