rupeshforu3
2nd September 2024, 15:12
Hi i I am Rupesh from India and I brought a new pc with AMD Ryzen zen3 5500GT APU and Asus prime b450 motherboard and installed Linux Fedora 40 and I have some aac m4a music files and I want to convert them to opus files.
I installed libopus and libfdk-aac and compiled ffmpeg with options successfully using the following command
--enable_libopus and --enable_libfdk-aac
I want to convert aac m4a music files to opus using ffmpeg and libopus and so I have created a small bash script as follows.
#/bin/bash
for i in *.mp4;
do name="${i%????}";
echo $name;
ffmpeg -y -i "$i" -f mp4 -vn -ac 1 -c:a libopus -vbr on -application audio -mapping_family 0 -b:a 20k -af aresample=resampler=soxr -ar 48000 "${name}.opus";
done
For the opusenc command line encoder we have option as --downmix-mono but in ffmpeg along with libopus we don't have this option.
So for encoding from stereo to mono I have chosen option which is implied to libopus as
-ac 1 mapping_family 0
I used soxr resampler because I think it produces more quantity output audio file.
I have even choosen the following options which are related to vbr mode and the output audio is music not speech.
-vbr on -application audio
Kindly try to examine the above script and tell whether I have chosen the best options for encoding aac m4a music files to opus using ffmpeg and libopus.
If you think some other options need to be added to the above script suggest them also.
Regards,
Rupesh.
I installed libopus and libfdk-aac and compiled ffmpeg with options successfully using the following command
--enable_libopus and --enable_libfdk-aac
I want to convert aac m4a music files to opus using ffmpeg and libopus and so I have created a small bash script as follows.
#/bin/bash
for i in *.mp4;
do name="${i%????}";
echo $name;
ffmpeg -y -i "$i" -f mp4 -vn -ac 1 -c:a libopus -vbr on -application audio -mapping_family 0 -b:a 20k -af aresample=resampler=soxr -ar 48000 "${name}.opus";
done
For the opusenc command line encoder we have option as --downmix-mono but in ffmpeg along with libopus we don't have this option.
So for encoding from stereo to mono I have chosen option which is implied to libopus as
-ac 1 mapping_family 0
I used soxr resampler because I think it produces more quantity output audio file.
I have even choosen the following options which are related to vbr mode and the output audio is music not speech.
-vbr on -application audio
Kindly try to examine the above script and tell whether I have chosen the best options for encoding aac m4a music files to opus using ffmpeg and libopus.
If you think some other options need to be added to the above script suggest them also.
Regards,
Rupesh.