Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: best options for mono encoding ffmpeg libpous. (Read 936 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

best options for mono encoding ffmpeg libpous.

Hi 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.

Code: [Select]
#/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

Code: [Select]
-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.

Code: [Select]
-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.
Regards,
Rupesh.

Re: best options for mono encoding ffmpeg libpous.

Reply #1
I don't know how good is the script, but since nobody gave you an answer about bitrate, I will do it.

I guess that 80kbps is enough for good audio quality in mono, for music and/or general audio).
Try it and tell us if you are satisfied with the results :)

Re: best options for mono encoding ffmpeg libpous.

Reply #2
I am not asking about bitrate.

Previously in windows dbpoweramp I converted some MP3 files which are documentaries into opus mono 16 kbps.

There was no downgrade in the converted speech opus files. I mean there are no artifacts etc.,.

The converted file is almost equal to the source MP3 file in quality.

The size of the converted opus file was 1/5th of source mp3 file.

So I want to convert m4a files which are documentaries into opus mono through ffmpeg and libopus at 20 kbps.

I am requesting you to suggest the best options for mono encoding through libopus in ffmpeg.

For example in opusenc there's an option called --downmix-mono but there's no such option in libopus.
Regards,
Rupesh.