Miserlou / Miserlou/SoundScrape

Identify file type to set proper extension

Open
#83 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
1.4k
Forks
143
PR merge metrics
No merged PRs in 30d

Description

$ soundscrape https://soundcloud.com/apriscity/second-chance-official
Downloading: Second Chance (Official)
[################################] 6169/6169 - 00:00:18
can't sync to an MPEG frame

Is there any way to get SoundScrape to read the header of the file? In this example, we have a file "Apris City - Second Chance (Official).mp3", but the file isn't an mp3:

Container: MPEG-4 AAC
Codec: MPEG-4 AAC

**So can SoundScrape read the header of the file (MPEG-4 ACC), and determine if the file has the correct file extension? MP3 isn't correct extension for this particular file, but any of these are:

Filename extension .m4a, .m4b, .m4p, .m4v, .m4r, .3gp, .mp4, .aac**

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the soundscrape download entry point that saves the downloaded track as .mp3, then inspect how the file header or container is currently handled. Confirm the reported MPEG-4 AAC case and identify the supported extension mapping. Done means downloads receive an appropriate extension instead of being treated as MP3, with the existing sync error avoided.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.