freyr-js icon indicating copy to clipboard operation
freyr-js copied to clipboard

Some music downloads result to high pitched sound?

Open padi opened this issue 9 months ago • 2 comments

The smallest example I could reproduce on my machine is here:

freyr get -S youtube spotify:track:1jjEZnBiBFPtX6EyxtwHpc

Here's the original track for comparison https://open.spotify.com/track/1jjEZnBiBFPtX6EyxtwHpc

I know it tries to get from youtube so I shouldn't always expect the same quality of music, but other downloaders that also use yt-dlp seem to not produce the same high pitched (chipmunk voice) for the same track. (e.g. https://github.com/spotDL/spotify-downloader)

So I suspect it has something to do with post-processing, but I'm not knowledgeable enough to know for sure.

Tried changing the bitrate to 128, 256, and 320 but same result

padi avatar Mar 21 '25 08:03 padi

By the way, because of this app, I was able to resuscitate and make use of my old iPod touch as a dedicated music player I can leave anywhere in the house or in the car 😅

padi avatar Mar 21 '25 11:03 padi

Hi Marc, thanks for filing, and including a repro case. I'll find some time to look into this. In the meantime, if you're up to experiment with this, here's maybe where to start:

https://github.com/miraclx/freyr-js/blob/05c0591190660a735c53d5180fa90f28e4ee9a48/cli.js#L1178-L1195

Start by removing -aac_pns 0, then -b:a <bitrate>. Incrementally removing items until you're left with -i <infile>.

If none of that works, try adding console.log(files) to https://github.com/miraclx/freyr-js/blob/05c0591190660a735c53d5180fa90f28e4ee9a48/cli.js#L1220-L1222.

Then you can try to listen to the raw file downloaded from yt-dlp, see if that has any noise.

miraclx avatar Mar 21 '25 11:03 miraclx