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

Apple lossless codec 'alac' not working #20

Closed
mperkh opened this issue Dec 23, 2018 · 3 comments
Closed

Apple lossless codec 'alac' not working #20

mperkh opened this issue Dec 23, 2018 · 3 comments
Labels
feedback requested Waiting for details or feedback from user

Comments

@mperkh
Copy link

mperkh commented Dec 23, 2018

It would be nice, to be able to encode audio books into a lossless codec, so that its possible to make final lossy encode of the audio stream at a later time.

ffmpeg supports Apple lossless codec 'alac'. Trying to produce a result with a command like this:

php ../m4b-tool.phar merge --audio-codec="alac" -d inputFolder --output-file="out.m4b"

results in that:

...
In MergeCommand.php line 328:

  could not convert /Users/test/inputFile.m4a to out-tmpfiles/inputFile.m4b

Its seems the problem is caused by the -f mp4 option, which is set on the final ffmpeg command, resulting in:

[mp4 @ 0x7ff18f00a400] Could not find tag for codec alac in stream #0, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 --

Omitting the -f mp4 option results in alac encoded m4a file to be correctly generated.

@sandreas
Copy link
Owner

Ok, thanks. I'll take a look in the next days :-)

@sandreas
Copy link
Owner

sandreas commented Dec 23, 2018

You were right...
Seems that ALAC is a bit tricky when using ffmpeg... since it was not officially mp4 compilant all the time (see: http://forum.doom9.org/archive/index.php/t-97014.html), ffmpeg complains when using alac in combination with -f mp4.

Should be fixed in current master, here is a build:
m4b-tool.phar.zip

Would be nice if you could test the fix.

@sandreas sandreas added feedback requested Waiting for details or feedback from user and removed question labels Dec 23, 2018
@mperkh
Copy link
Author

mperkh commented Dec 28, 2018

Tested and alac encoding works perfect now. Thanks a lot!

Top Gun Gif Anim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback requested Waiting for details or feedback from user
Projects
None yet
Development

No branches or pull requests

2 participants