node-ytdl-core icon indicating copy to clipboard operation
node-ytdl-core copied to clipboard

Downloading audio as mp3 downloads in wav format.

Open MistakingManx opened this issue 2 years ago • 2 comments

Unexpected behavior:

  • What should happen? When you download a file with the mp3 format, it downloads in mp3 format.
  • What happens instead? It downloads into a semi-readable mp3 format, but isn't viewable on all platforms as it actually downloads in wav, opening it in Audacity after renaming it to .wav lets you convert it to an mp3 which fixes the issue.

Trying to explain better: I download videos in mp3 format, but even though SOME apps can play it, it's encoded in the wav format, it's most obvious when using Safari and Audacity, renaming the audio file to end with .wav instead of .mp3 lets those apps read it, which is why I assume it's a wav instead of mp3.

MistakingManx avatar Jun 04 '22 18:06 MistakingManx

I don't believe this package supports mp3, as you say it's kind of a fake mp3 format that many media players don't work with (VLC mobile and Apple Music MacOS player can't play the 'mp3' file i generate from this package, while browsers can and elmedia video player).

I get the ytdl as an mp4 file with the options { filter: 'audioonly' } then have to use a package like fluent-ffmpeg to convert it to a 'real' mp3.

Alternatively you can just save it as a webm, which I believe can be audio only though probably less support than mp3

wc2184 avatar Jul 11 '22 05:07 wc2184

I don't believe this package supports mp3, as you say it's kind of a fake mp3 format that many media players don't work with (VLC mobile and Apple Music MacOS player can't play the 'mp3' file i generate from this package, while browsers can and elmedia video player).

YouTube does not deliver mp3 and neither does this package. What you have there is an m4a.

LuanRT avatar Jul 11 '22 07:07 LuanRT

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 12 '22 12:11 stale[bot]