ffmpeg command can be simplified (now copies cover art too!)
Erudition opened this issue · comments
Could you please elaborate your request?
I'm not sure what more there is to say, I fit it all in the title.
It's more of a suggestion than a request. To rephrase:
The current version of this tool spits out a long ffmpeg command like
ffmpeg.exe -y -activation_bytes 00000000 -i ".\input.aax" -map_metadata 0 -id3v2_version 3 -codec:a copy -vn "output.m4b"
But now, as briefly described in the QA linked, for modern ffmpeg
it can simply be
ffmpeg -activation_bytes 00000000 -i input.aax -c copy output.m4b
which has the additional benefit of preserving cover art.
I actually came here to post the same issue, and oddly enough, that's my StackExchange post you linked to @Erudition haha.
But yeah, in FFmpeg version 4.1 they added native support for copying album artwork when decrypting AAX files, so the request is to change the command run by ffmpeg.wasm
in the browser to allow this. In order to do it you just have to remove the -vn
flag and change -codec:a copy
to -c copy
.
As far as the other flags like map_metadata
and id3v2_version
, I'm not sure if you need those, but I've never really needed them when running this conversion process locally.
@Erudition @csandman PR's welcome
@csandman Online conversion is broken with your patch
Awesome! Sorry it didn't work in browser, I could not for the life of me get ffmpeg.wasm to work in the browser, even before I changed anything. I'm glad you got it worked out.
I guess you missed the cors headers required for sharedarraybuffers
how do you set that up locally? does it not run out of the box?