No as both are lossy codecs you will always lose quality doing so. You can do it with ffmpeg.
parallel ffmpeg -i {} {.}.opus ::: *.m4a
You may want to tweak parameters for bitrate, etc. But this is not needed at all, as AAC had patents that are now expired.
If you get .flac, .wav or similar lossless music, you should encode that with opus. But lossy to lossy makes nearly no sense (apart from specific players not supporting them)
GNU Parallel works well for this kind of thing. A lot of audio stuff is single threaded, so unlike video transcoding running multiple conversions simultaneously is a useful thing to do. The command is simpler, too:
Well sure always back up everything but this command will create new .opus files still leaving the original .m4a in the folder too, so even if it errors just delete the bad .opus files and try to resolve your ffmpeg codec issue before retrying the conversion or trying another method. Ffmpeg in my experience always converts with the "makes a new file with your file(s)" method, I've never had it do the "change the file destructively" method.
13 replies
No as both are lossy codecs you will always lose quality doing so. You can do it with ffmpeg.
You may want to tweak parameters for bitrate, etc. But this is not needed at all, as AAC had patents that are now expired.
If you get .flac, .wav or similar lossless music, you should encode that with opus. But lossy to lossy makes nearly no sense (apart from specific players not supporting them)
GNU Parallel works well for this kind of thing. A lot of audio stuff is single threaded, so unlike video transcoding running multiple conversions simultaneously is a useful thing to do. The command is simpler, too:
Thanks, learning is always good, changed it
Fixed.
Unless you have a strong stance against people storing lossless files of their music? But I don't think that's quite what you meant :)
it's my music and i dont like proprietary formats
"If you get .flac, .wav or similar lossless music, you should encode that with opus."
I am looking forward to similarly useful discussions XD
If you're on linux try navigating to the folder in the terminal and running
for i in *.m4a; do ffmpeg -i "$i" "${i%.*}.opus"; donebefore doing anything like that.. back up the folder.
Well sure always back up everything but this command will create new .opus files still leaving the original .m4a in the folder too, so even if it errors just delete the bad .opus files and try to resolve your ffmpeg codec issue before retrying the conversion or trying another method. Ffmpeg in my experience always converts with the "makes a new file with your file(s)" method, I've never had it do the "change the file destructively" method.
It'll also error out or prompt to overwrite an existing file unless a flag is passed that tells it to overwrite unattended.
You can use the
findcommand to do the stuff other commenters have posted recursiveor fd
Opus is lossy, so no. But they’re already stored in a lossy format, so you probably won’t notice a difference if you use the same bitrate.