feat(download): add remux option for best audio quality
Introduced a 'remux' option in the download functionality, enabling users to remux videos with the best available audio when selected. This enhances the audio quality of downloaded videos when the option is checked in the UI. Added corresponding checkbox in the template for user selection.
This commit is contained in:
parent
a563c57d7f
commit
0bd0f8f156
2 changed files with 11 additions and 1 deletions
|
@ -44,7 +44,13 @@ class DownloadController extends BaseController
|
|||
{
|
||||
$url = $this->getVideoPageUrl($request);
|
||||
|
||||
$this->video = $this->downloader->getVideo($url, $this->getFormat($request), $this->getPassword($request));
|
||||
$format = $this->getFormat($request);
|
||||
|
||||
if ($this->config->remux && $request->getQueryParam('remux')) {
|
||||
$this->video = $this->downloader->getVideo($url, $format . "+bestaudio", $this->getPassword($request));
|
||||
} else {
|
||||
$this->video = $this->downloader->getVideo($url, $format, $this->getPassword($request));
|
||||
}
|
||||
|
||||
try {
|
||||
if ($this->config->convert && $request->getQueryParam('audio')) {
|
||||
|
|
|
@ -32,6 +32,10 @@
|
|||
{html_options name='format' options=$formats selected=$defaultFormat id="format" class="formats monospace"}
|
||||
<br/>
|
||||
<br/>
|
||||
<input type="checkbox" checked name="remux" id="remux" value="1"/>
|
||||
<label for="remux">{t}Remux with best audio{/t}</label>
|
||||
<br/>
|
||||
<br/>
|
||||
{/if}
|
||||
{if $config->stream}
|
||||
<input type="checkbox" {if $config->stream !== 'ask'}checked{/if} name="stream" id="stream"/>
|
||||
|
|
Loading…
Reference in a new issue