New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set audio format (.ogg vs. .mp3) #4
Comments
These are the formats Spotify offers for Spotify-hosted shows: Spotify-hosted (streaming download): "audio": {
"items": [
{
"url": "https://anon-podcast.scdn.co/d5fe1647e3fb98c7f074cf87c0a6fe6fbd3848b1",
"format": "AAC_24",
"fileId": "d5fe1647e3fb98c7f074cf87c0a6fe6fbd3848b1",
"externallyHosted": false
},
{
"url": "https://anon-podcast.scdn.co/47e7f56afca4719d33094c81dc826a63668a23a6",
"format": "MP4_128",
"fileId": "47e7f56afca4719d33094c81dc826a63668a23a6",
"externallyHosted": false
},
{
"url": "https://anon-podcast.scdn.co/ec2cd6625026c45273e8776c3779b80afc28ca36",
"format": "MP4_128_DUAL",
"fileId": "ec2cd6625026c45273e8776c3779b80afc28ca36",
"externallyHosted": false
},
{
"url": "https://anon-podcast.scdn.co/226e1bd59da25e023cbdb450485e43b6b1b9878b",
"format": "OGG_VORBIS_96",
"fileId": "226e1bd59da25e023cbdb450485e43b6b1b9878b",
"externallyHosted": false
}
]
} Externally hosted shows can be download directly as Externally hosted (direct download): "audio": {
"items": [
{
"url": "https://anon-podcast.scdn.co/b16d6ecd88942a0fac5dea4e560fc553e7ba90fb",
"format": "AAC_24",
"fileId": "b16d6ecd88942a0fac5dea4e560fc553e7ba90fb",
"externallyHosted": false
},
{
"url": "https://anon-podcast.scdn.co/63437b0b71f6d332555b041441d760641e00dba8",
"format": "MP4_128_DUAL",
"fileId": "63437b0b71f6d332555b041441d760641e00dba8",
"externallyHosted": false
},
{
"url": "https://anon-podcast.scdn.co/30f1f2170606c5bc6ccd367ea163b9a1039336af",
"format": "MP4_128",
"fileId": "30f1f2170606c5bc6ccd367ea163b9a1039336af",
"externallyHosted": false
},
{
"url": "https://anon-podcast.scdn.co/ce101e45379048a8d41d21e352dfc076aa1cdbf1",
"format": "OGG_VORBIS_96",
"fileId": "ce101e45379048a8d41d21e352dfc076aa1cdbf1",
"externallyHosted": false
},
{
"url": "https://www.podtrac.com/pts/redirect.mp3/pdst.fm/e/pdst.fm/e/traffic.megaphone.fm/BENT9388265894.mp3?updated=1645154429",
"format": "UNKNOWN",
"fileId": null,
"externallyHosted": true
}
]
} Spodcast simply takes the last array item, checks whether it can be downloaded directly and does so if possible, otherwise it downloads the VORBIS stream at high speed or in real time if |
Ok. Got it. Thanks for the explanation. Would be interesting to implement an option to choose the filetype, as not all my players can play |
The librespot-python library on wich Spodcast rests currently only supports [edit] I just did the experiment and found out the AAC stream is not recognised as such (possibly due to encryption), at least when using the version of librespot-python on PyPi as is used by the version of Spodcast on PyPi, the one you get when you |
For the record, ogg format does not work on iOS. I work around this issue by running a (not very elegant) script to convert the ogg files to mp3 and update the metadata in the
@Yetangitu would it be reasonable to add a feature to the project that if you specify |
Aren't there any tools to breach the Apple boycott of open formats? That would be the better solution IMnsHO. Working around Apple-related problems reminds me too much of working around Microsoft-related problems.VLC seems to be available, it can play Vorbis. Anyway, I'll give it some thought, more in a few days - busy now. |
The latest release (0.4.1) introduces a |
There's a typo in 0.4.1, wait for 0.4.2... |
Fixed now, 0.4.2 is up on Github and PyPi |
Worked great for me! Thanks for adding this feature. |
Works for me too. One minor issue is that the embedded image is not copied to the mp3-file while transcoding. |
@ahuse is this an issue worth tackling? Is anyone using those images? What is the effect of not having them? For sure, it is possible to copy embedded images but if nobody uses them (I for one do not) it isn't worth spending any (processing) time on. |
@Yetangitu For me, yes. My Podcast app always uses the cover of the last episode as the shows cover. Should be just a setting in ffmpeg to copy the cover to the new file. I will do some research. |
I checked a random downloaded Ogg file and did not find any embedded image in it, am I missing something? Could you give me an example of such a file - or a pointer to a Spotify-hosted (s)podcast which hosts such files - which does contain an embedded image? |
Some podcasts are downloaded as
.mp3
and some as.ogg
. I looked at your code and it seems to me, that you are preferring.ogg
over.mp3
.In which format are the files stored on Spotify's servers? Either
.mp3
or.ogg
? Or both formats for some podcasts?Would it be possible to download the
.mp3
for the episodes which are currently downloaded as.ogg
?The text was updated successfully, but these errors were encountered: