Open inversetab opened 3 years ago
Thanks for reporting this issue!
I think I might have caught the problem. Soundcloud sometimes doesn't set the duration of m4a (high quality) files when downloading. To counter this, I wrote some code that would insert the duration manually into the file. From the logs I see that the downloads were corrupted, when the portion it was trying to write the duration to, did not exist. I now added some logic to handle this case better. This will however lead to the tracks not having a duration set, which could lead to funky behavior in you audio player. This is not a perfect solution. Maybe I will revisit this once I have more time to make it work in all cases. But for now this should at least enable you to download your tracks in a (hopefully) playable state.
I published a new version (1.9.4) which includes this change. I currently do not have SoundCloud Go+ nor the desire to purchase it, so I can't verify for sure that the issue is fixed. Please reopen this issue and let me know if this issue is still present for you. If yes, please post the logs again and maybe also the file that is affected.
Thank you for using my extension! :)
Thank you for the quick reply! Your extension is a lifesaver for getting fresh tracks for djing :)
Updated and tried again, for these it still seems to be happening, sadly. Attached log and zip of affected files.
I once again published a new version (1.9.5). This does not attempt to fix the issue at hand, rather it helps me diagnose the issue. I've added a new setting to control if metadata should be set or not. With this off, it should download the file straight off of SoundCloud without any changes. If this file turns out to be corrupted, the issue is on SoundCloud's end.
You could try downloading the file after disabling the setting of metadata. If you navigate to soundcloud.com you should see the icon of this extension next to the URL Bar - click on it: You should be seeing an options window like the following: "Set track metadata" should be enabled per default, disable it (uncheck it) and hit "Save". Now download the problematic file again and let me know, whether it is corrupted or not.
Even if it turns out to be SoundCloud's fault I will still attempt to fix this issue. I just want to be sure it's not my code doing wonky things! ;)
Thanks for your help thus far and sorry for using you as my guinea pig! :)
Alright! Updated, disabled, and attempted a re-download, and the resulting file was unplayable in groove music and vlc. Not unexpected at this point, but happy to help figure out the problem :)
Attached the three songs I attempted to download (one a single dl, the other two a playlist dl, just in case it matters) and the log file.
wait, i think i forgot to click save when removing the set metadata setting.
Did that, but it's still not a playable track, but it's not kicking back a thousand errors when i click download:
I'm just wondering if there's any plausible way that I could post process these files to set the duration? Some things I use to play the m4a files (e.g. MPD) have no problem with them, while others (e.g. Navidrome) play the files without trouble, but can't seek within them or see the total length, presumably because there is no file length.
I'm guessing if it was easy to use ffmpeg or similar to fix this then you would already be doing it, so apologies if this is a stupid question!
You can try to use ffmpeg or similar tools to fix up the files after the fact. You have to remember that the extension is working inside the browser's sandbox. I can't call any programs installed on your system and neither can I use anything besides browser APIs. I could host a service that postprocesses files and call it via HTTP. But this would incur some costs for me, likely make downloads take a lot longer and I would have a call to an external service in my plugin, which some people might not feel safe with. As I explained above, fixing this issue just with browser APIs would likely be very hard and the time investment would not be warranted for this hobby project of mine. If you find a solid way of fixing this issue with ffmpeg for example, please let me know and I can add it as tutorial in the README and/or the extension description.
Thanks for the detailed reply! I completely understand.
I've yet to succeed with ffmpeg, or anything else, but I will keep investigating. Simply using ffmpeg with "-c copy" gives files that look like they have the duration, but then don't actually play in all my players, so there is clearly something weird going on. I will try reaching out to the developers of those programs to see if they have any insight.
Was there ever a fix for this or workaround? I am having the same issue with no track time.
Thanks for the detailed reply! I completely understand.
I've yet to succeed with ffmpeg, or anything else, but I will keep investigating. Simply using ffmpeg with "-c copy" gives files that look like they have the duration, but then don't actually play in all my players, so there is clearly something weird going on. I will try reaching out to the developers of those programs to see if they have any insight.
Did you ever find a fix for this?
Bump, still experiencing issues with this
For these songs, it'll download the MP3 version just fine, but not high quality, I can't find any sort of pattern to tell which songs will download in HQ and which won't.
console-export-2021-3-3_22-59-16.txt