Skip to content
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

mutagen.mp3.HeaderNotFoundError: can't sync to MPEG frame #562

Open
ChickenNugget25 opened this issue Jun 12, 2022 · 7 comments
Open

mutagen.mp3.HeaderNotFoundError: can't sync to MPEG frame #562

ChickenNugget25 opened this issue Jun 12, 2022 · 7 comments

Comments

@ChickenNugget25
Copy link

I've done a little bit of searching on this error and I found that it's thrown when the .mp3 file passed is corrupted or 'not a real mp3' The .mp3 that's throwing the error is one I made with the package pyttsx3, and it runs fine through windows media player, but still has the error. What should I do?

@ChickenNugget25 ChickenNugget25 changed the title mutagen.mp3.HeaderNotFoundError: can't sycn to MPEG frame mutagen.mp3.HeaderNotFoundError: can't sync to MPEG frame Jun 12, 2022
@Ocean-Spud
Copy link

Ocean-Spud commented Sep 3, 2022

I'm glad someone else had this problem, I did a little debugging and it looks like mutagen only supports a handful of mp3 formats. pyttsx3 writes its mp3 files in pcm_s16le format, but mutagen can't read that. Right now, the best thing to do is use FFMPEG's tools for this or use .wav files. But I'd love to see this problem fixed in the future.

@lazka
Copy link
Member

lazka commented Sep 4, 2022

An example file would be helpful to debug this.

@QY-Y
Copy link

QY-Y commented Sep 5, 2022

Hi, I have the same problem processing the meta info this file.
I m Coming Home .zip

 from mutagen.mp3 import MP3
 return MP3(path)

0220905155106

@Tailslide
Copy link

I ran into this one as well.

@Pimool
Copy link

Pimool commented Oct 11, 2023

Don't know why it happens, but I solved it out with ffmpeg.

ffmpeg -i a.mp3 b.mp3 

Putting b.mp3 didn't have any problem for my case.

@Mohammad9760
Copy link

hi! I ran into this problem.
I have a script downloading mp3 files and since the script is not running on my machine it's preferred that I don't re-encode it (I can do it only with a portable ffmpeg build, but that is ~80mb that I don't want to have where my script is hosted).
is there a workaround for this?

@Mohammad9760
Copy link

is there a way to fix this or should I try to fix the problem from the other end (the part of my script that downloads mp3s)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants