feat: set best audio quality
This commit is contained in:
parent
42cd0865a5
commit
1a04de439c
@ -21,6 +21,7 @@ import (
|
|||||||
func fetchAudio(video *goutubedl.Result, out string, ch chan error) {
|
func fetchAudio(video *goutubedl.Result, out string, ch chan error) {
|
||||||
dl, err := video.DownloadWithOptions(context.Background(), goutubedl.DownloadOptions{
|
dl, err := video.DownloadWithOptions(context.Background(), goutubedl.DownloadOptions{
|
||||||
DownloadAudioOnly: true,
|
DownloadAudioOnly: true,
|
||||||
|
AudioFormats: "best",
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ch <- err
|
ch <- err
|
||||||
@ -115,6 +116,7 @@ func convertToMp3(data ConvertOptions, ch chan error) {
|
|||||||
input := []*ffmpeg.Stream{ffmpeg.Input(data.Video).Audio()}
|
input := []*ffmpeg.Stream{ffmpeg.Input(data.Video).Audio()}
|
||||||
args := ffmpeg.KwArgs{
|
args := ffmpeg.KwArgs{
|
||||||
"format": "mp3",
|
"format": "mp3",
|
||||||
|
"ab": "320k",
|
||||||
"id3v2_version": "3",
|
"id3v2_version": "3",
|
||||||
"write_id3v1": "1",
|
"write_id3v1": "1",
|
||||||
"metadata": []string{
|
"metadata": []string{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user