How to read m4a file in python?

2.4k Views Asked by At

I tried with the following code to read the file:

from pydub import AudioSegment
filename = "test.m4a"
audio = AudioSegment.from_file(filename)

This throwed the following error:

[mov,mp4,m4a,3gp,3g2,mj2 @ 000001a101b24980] Format mov,mp4,m4a,3gp,3g2,mj2 detected only with low score of 1, misdetection possible!

[mov,mp4,m4a,3gp,3g2,mj2 @ 000001a101b24980] moov atom not found

test.m4a: Invalid data found when processing input

Any help would be much appreciated!

1

There are 1 best solutions below

1
Manish Shegokar On

I found the solution. The file was corrupted so I replaced it and it worked! Thank you the quick responses @rzlvmp and @hc_dev