quippy-git / javamod

JavaMod Player
https://quippy-git.github.io/javamod/
GNU General Public License v3.0
9 stars 2 forks source link

ffmpeg -vol arg Mp3 milliseconds double #1

Closed ShisanXing closed 2 years ago

ShisanXing commented 2 years ago

I use v2.3 (java) build my mp3 player, if use ffmpeg -vol mp3file, I always get double milliseconds, the frame_size is difference with original file, what should I do ?

quippy-git commented 2 years ago

You should provide a bitrate like this: ffmpeg -i -vol 256 -b:a 128k Files generated that way will work with JavaMod

However, if files are generated this way: ffmpeg -i -vol 256 without a bitrate provided, ffmpg will set a bitrate of 64kbs in the header, but the length suggests, that it's 128kbs in reality.

The problem is, that the headers of such generated files (without KBS provided) and those, generated explecitly on 64kbs are identical, so I so far do not know how to destinguish these two files.

quippy-git commented 2 years ago

Stepping deeper into this I found out I did not read Info-Header (same as Xing header, but for CBR). I parse that now and it works.

ShisanXing commented 2 years ago

thanks.