GoLang 将 webm 转换为 mp3

问题描述

这是我的代码示例

package main 

import (
  "fmt"
  "io"
  "net/http"

  "github.com/kkdai/youtube"
)

func getVideo() {
  client := youtube.Client{}
  currentVideo,videoError := client.GetVideo("https://www.youtube.com/watch?v=kGEJNZd1hTA")
  resp,err := client.GetStream(currentVideo,&currentVideo.Formats.Type("audio/webm")[0])
  w.Header().Set("Content-Type",req.Header.Get("Content-Type"))
  w.Header().Set("Content-Disposition","attachment; filename=WHATEVER_YOU_WANT.webm")
  io.Copy(w,resp.Body)
}

func main() {
  http.HandleFunc("/video",getVideo)

  http.ListenAndServe(":8090",nil)
}

那么问题是如何将我的 webm 流转换为 mp3 并将其提供给客户端?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)