DzenanJupic / rustube

A YouTube video downloader, originally inspired by pytube, written in Rust.
Apache License 2.0
227 stars 41 forks source link

Files downloaded with best_audio or worst_audio are using the wrong extension #43

Closed HristoGochevUni closed 2 years ago

HristoGochevUni commented 2 years ago

Media files downloaded with video.best_audio() or video.worst_audio() use the mp4 extension despite being webm files.

I just spend a couple of days trying to convert the produced mp4 to mp3 using various multimedia encoding/decoding libraries, only to discover that the file is actually webm file using the mp4 extension falsely.

DzenanJupic commented 2 years ago

@HristoGochevUni thank you for opening this issue! Sorry for the inconvenience, the file extension is currently hardcoded. But that's, fortunately, a quick fix.

DzenanJupic commented 2 years ago

Fixed in 0.3.8

In case you should ever have a similar problem again, a quick fix is always to use Stream::download_to instead of Stream::download[_to_dir].