Skip to content

Commit 4c954b3

Browse files
authored
Merge pull request #265 from davidvexel/feature/concurrent-fragment
Adding concurrent-fragments option
2 parents 3484eb3 + 11cb0e6 commit 4c954b3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Options.php

+14
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ class Options
126126
private ?string $externalDownloader = null;
127127
private ?string $externalDownloaderArgs = null;
128128
private ?string $downloadSections = null;
129+
private ?int $concurrentFragments = null;
129130

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

1545+
/**
1546+
* Number of fragments of a dash/hlsnative
1547+
* video that should be downloaded concurrently (default is 1).
1548+
*/
1549+
public function concurrentFragments(?int $concurrentFragments): self
1550+
{
1551+
$new = clone $this;
1552+
$new->concurrentFragments = $concurrentFragments;
1553+
1554+
return $new;
1555+
}
1556+
15441557
/**
15451558
* Force keyframes at cuts when downloading/splitting/removing sections.
15461559
* This is slow due to needing a re-encode, but the resulting video
@@ -1829,6 +1842,7 @@ public function toArray(): array
18291842
'external-downloader' => $this->externalDownloader,
18301843
'external-downloader-args' => $this->externalDownloaderArgs,
18311844
'download-sections' => $this->downloadSections,
1845+
'concurrent-fragments' => $this->concurrentFragments,
18321846
// Filesystem Options
18331847
'batch-file' => $this->batchFile,
18341848
'id' => $this->id,

0 commit comments

Comments
 (0)