add voice mono option

This commit is contained in:
Ying Zhao 2025-05-19 15:23:30 -04:00
parent 725ce0d81e
commit b5eeffd998
2 changed files with 7 additions and 0 deletions

View file

@ -78,6 +78,12 @@ def get_opts(format: str, quality: str, ytdl_opts: dict) -> dict:
} }
) )
# Add voice mono settings for MP3
if format == "mp3" and quality == "voice_mono":
opts["postprocessor_args"] = {
"ffmpeg": ["-ac", "1", "-ar", "22050", "-q:a", "8"]
}
# Audio formats without thumbnail # Audio formats without thumbnail
if format not in ("wav") and "writethumbnail" not in opts: if format not in ("wav") and "writethumbnail" not in opts:
opts["writethumbnail"] = True opts["writethumbnail"] = True

View file

@ -55,6 +55,7 @@ export const Formats: Format[] = [
{ id: '320', text: '320 kbps' }, { id: '320', text: '320 kbps' },
{ id: '192', text: '192 kbps' }, { id: '192', text: '192 kbps' },
{ id: '128', text: '128 kbps' }, { id: '128', text: '128 kbps' },
{ id: 'voice_mono', text: 'Voice Mono' },
], ],
}, },
{ {