Don't download vp9
This commit is contained in:
parent
a6e50510d8
commit
86d3df51b7
3 changed files with 5 additions and 6 deletions
|
|
@ -3,6 +3,8 @@ A mobile friendly tool for downloading videos from social media.
|
|||
The backend is is a Golang server that will take a URL (YouTube, Reddit, Twitter, etc),
|
||||
download the video file, and return a URL to download the video. The video will be transcoced as needed to produce a single mp4 file.
|
||||
|
||||
Note: This is for home use only. There's no auth.
|
||||
|
||||

|
||||
|
||||

|
||||
|
|
|
|||
|
|
@ -118,10 +118,11 @@ func downloadMedia(url string) (string, error) {
|
|||
log.Info().Msgf("Downloading %s to %s", url, id)
|
||||
|
||||
cmd := exec.Command("youtube-dl",
|
||||
"--format", "bestvideo+bestaudio[ext=m4a]/bestvideo+bestaudio/best",
|
||||
"--format", "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best",
|
||||
"--merge-output-format", "mp4",
|
||||
"--restrict-filenames",
|
||||
"--write-info-json",
|
||||
"--verbose",
|
||||
"--output", name,
|
||||
url)
|
||||
|
||||
|
|
|
|||
|
|
@ -78,9 +78,5 @@ func streamFileToClient(writer http.ResponseWriter, filename string) {
|
|||
}
|
||||
|
||||
// Copy the file to the client
|
||||
if _, err = io.Copy(writer, Openfile); err != nil {
|
||||
log.Error().Msgf("Error copying file %s %v", filename, err)
|
||||
http.Error(writer, "Couldn't copy file", 404)
|
||||
return
|
||||
}
|
||||
_, _ = io.Copy(writer, Openfile)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue