Skip to content

Commit

Permalink
Updated list of recoding formats supported by YT-DLP (#203)
Browse files Browse the repository at this point in the history
* Updated list of recoding formats supported by YT-DLP

* Updated `testInvalidRecodeVideoThrows` exception message

* Updated description of `remuxVideo` option
  • Loading branch information
FlorianLeChat authored Mar 27, 2023
1 parent 399518d commit c89d34b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Options
self::AUDIO_FORMAT_ALAC,
];

public const RECODE_VIDEO_FORMATS = ['mp4', 'flv', 'ogg', 'webm', 'mkv', 'avi'];
public const RECODE_VIDEO_FORMATS = ['avi', 'flv', 'gif', 'mkv', 'mov', 'mp4', 'webm', 'aac', 'aiff', 'alac', 'flac', 'm4a', 'mka', 'mp3', 'ogg', 'opus', 'vorbis', 'wav'];

public const SUBTITLE_FORMAT_SRT = 'srt';
public const SUBTITLE_FORMAT_VTT = 'vtt';
Expand Down Expand Up @@ -1375,10 +1375,10 @@ public function audioQuality(?string $audioQuality): self

/**
* Remux the video into another container if necessary (currently supported:
* mp4|mkv|flv|webm|mov|avi|mp3|mka|m4a|ogg|opus). If target container does
* not support the video/audio codec, remuxing will fail. You can specify
* multiple rules; Eg. "aac>m4a/mov>mp4/mkv" will remux aac to * m4a,
* mov to mp4 and anything else to mkv.
* avi, flv, gif, mkv, mov, mp4, webm, aac, aiff, alac, flac, m4a, mka, mp3, ogg,
* opus, vorbis, wav). If target container does not support the video/audio codec,
* remuxing will fail. You can specify multiple rules; e.g. "aac>m4a/mov>mp4/mkv"
* will remux aac to m4a, mov to mp4 and anything else to mkv.
*/
public function remuxVideo(?string $remuxVideo): self
{
Expand Down
2 changes: 1 addition & 1 deletion tests/OptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function testInvalidAudioFormatThrows(): void
public function testInvalidRecodeVideoThrows(): void
{
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('Option `recodeVideo` expected one of: "mp4", "flv", "ogg", "webm", "mkv", "avi". Got: "mp4000".');
$this->expectExceptionMessage('Option `recodeVideo` expected one of: "avi", "flv", "gif", "mkv", "mov", "mp4", "webm", "aac", "aiff", "alac", "flac", "m4a", "mka", "mp3", "ogg", "opus", "vorbis", "wav". Got: "mp4000".');

Options::create()->recodeVideo('mp4000');
}
Expand Down

0 comments on commit c89d34b

Please sign in to comment.