slhck / ffmpeg-normalize

Audio Normalization for Python/ffmpeg
MIT License
1.28k stars 118 forks source link

"Can't write header" error for m4a to wav #173

Closed loshlee closed 2 years ago

loshlee commented 2 years ago

This works fine: ffmpeg -i infile.m4a outfile.wav but ffmpeg-normalize infile.m4a -o outfile.wav yields "Could not write header" error. Why is that? Thanks.

slhck commented 2 years ago

In the first command, you are actually passing two inputs. The second file does not exist, so it will be skipped. Instead, it'll create the output in the "normalized" directory.

I'm the second command, you are passing an actual output file name.

Please show the complete information requested in the bug report template. Otherwise it's hard to tell why it errors.

loshlee commented 2 years ago

Thanks. Sorry, please let me clarify.

ffmpeg -i /path/to/input/infile.m4a /path/to/input/normalized/outfile.wav yields a .wav file in the /path/to/input/normalized directory. However, ffmpeg-normalize /path/to/infile/infile.m4a -o /path/to/infile/normalized/outfile.wav yields the error.

slhck commented 2 years ago

As mentioned, please show the complete information requested in the bug report template. When you create a new issue in this project, there's the template. I need to see details on your input file and what is being done in the software in order to help you.

loshlee commented 2 years ago

OK, thanks. Bug report submitted.

loshlee commented 2 years ago

One more thing. When I submitted the bug report, I had to use "python3 --version" rather than "python --version" to ascertain the python details. The "python --version" command yielded "zsh: command not found: python". Could that be related to the issue?

slhck commented 2 years ago

No that's not a problem. I will fix the bug report template. Thanks for letting me know!

Closing in favor of the other issue.