-
-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Autodetect quality depending on source #233
Comments
You are absolutely correct. Unfortunately this is not as trivial as it may seem. In the past I had to rely on With Moreover the comparison has to be done per FILE not per BOOK, because every source file could have different quality. So if you have a 320k book with one file of 64k the limit as a whole would be 64k or I would have to build an average quality value, where I measure every file, sum it up and divide it by the number of files. That would be possible, but still a bit inaccurate. There is also the sampling rate, etc. etc. However, we don't wanna have a perfect solution, so what I could do is a simple value comparison like this: if ($sourceBitrate < $destinationBitrate) {
$destinationBitrate = $sourceBitrate;
$destinationSamplingRate = findAccordingSamplingRate($destinationBitrate);
} or as mentioned the average approach $sourceAvgBitrate = buildAverageBitrate($sourceFiles);
if($destinationBitrate > $sourceAvgBitrate) {
$destinationBitrate = $sourceAvgBitrate;
$destinationSamplingRate = findAccordingSamplingRate($destinationBitrate);
} when a flag (e.g. Which one would you prefer? |
I'm not an expert in encoding. I just want to pack my books into a handy container with cover, chapters and bookmarks. So in my cases what I do is pretty straigh forward - I get the maximum bitrate from vbr mp3's of book and convert the whole book in this bitrate according this rule: 64/mp3 to 32/aac, 128 to 64, all other to 96
P.S. |
Personally, I use this commande in my script to detect bitrate :
where "$sample" is the first file of the audiobook. Then i set the bitrate in the merge function :
|
It would be great if tool can detect source quality and automaticaly sets maximum available output quality for this source.
There is no point to convert 32k mp3 to 128 aac. Manual seting up the output quality is ok for single book but totally unusable when I use batch converting of my library collected from different sources.
The text was updated successfully, but these errors were encountered: