HydrogenAudio

Hosted Forums => foobar2000 => Support - (fb2k) => Topic started by: Gruzky on 2019-10-28 09:42:52

Title: MP3 conversion not outputting selected quality
Post by: Gruzky on 2019-10-28 09:42:52
So I'm doing something unconventional and am having issues.  I have an MP4 video file of a presentation that I want to get the audio from.  Since it's a presentation, I'm not concerned about lossy > lossy conversion.  If I load the MP4 directly into foobar and convert the file, it outputs fine.

One thing I tried doing however was increasing the audio in GoldWave or removing certain segments, then saving the edited audio as a WAV file and converting the WAV to MP3 in foobar.  When I do this, I selected V4 as the output quality, however the created file shows V2 as the profile in foobar.  Any idea what may be happening?
Title: Re: MP3 conversion not outputting selected quality
Post by: lvqcl on 2019-10-28 15:24:45
What is the samplerate of the source files?
Title: Re: MP3 conversion not outputting selected quality
Post by: Gruzky on 2019-10-30 15:12:51
What is the samplerate of the source files?
According to foobar, the sample rate of the WAV file after I edit the MP4 audio is 22050 Hz.
Also, I want to note, it seems that the bitrate and file size of the "V2" file actually correlates with what would be expected of a V4, yet it still says V2.
Title: Re: MP3 conversion not outputting selected quality
Post by: A_Man_Eating_Duck on 2019-11-01 02:21:49
Could this be a bug in Lame? Mediainfo reports it as a -V 2 encoding.

Code: [Select]
C:\Users\xxxxxx\Music>lame.exe -V 4 test.wav
LAME 3.100 32bits (http://lame.sf.net)
CPU features: MMX (ASM used), SSE (ASM used), SSE2
polyphase lowpass filter disabled
Encoding TEST.wav to TEST.mp3
Encoding as 22.05 kHz j-stereo MPEG-2 Layer III VBR(q=2.44706)
    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
  9096/9096  (100%)|    0:02/    0:02|    0:02/    0:02|   102.37x|    0:00
  8 [   1] *
 16 [   0]
 24 [   0]
 32 [   0]
 40 [  31] %
 48 [  38] %
 56 [   0]
 64 [   8] %
 80 [ 425] %*******
 96 [3889] %%%%%%%%%%%%%%%%%***************************************************
112 [2707] %%%%%%%%%%%%%%%%%%%*****************************
128 [ 422] %%%*****
144 [ 338] %%****
160 [1237] %%%%%%%%%%%%**********
-------------------------------------------------------------------------------
   kbps        LR    MS  %     long switch short %
  111.6       32.6  67.4        79.0  11.9   9.1
Writing LAME Tag...done
ReplayGain: -9.2dB

Mediainfo
Code: [Select]
Complete name                            : C:\Users\xxxxxx\Music\TEST.mp3
Format                                   : MPEG Audio
File size                                : 3.16 MiB
Duration                                 : 3 min 57 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 111 kb/s
Writing library                          : LAME3.100

Audio
Format                                   : MPEG Audio
Format version                           : Version 2
Format profile                           : Layer 3
Format settings                          : Joint stereo
Duration                                 : 3 min 57 s
Bit rate mode                            : Variable
Bit rate                                 : 111 kb/s
Minimum bit rate                         : 8 000 b/s
Channel(s)                               : 2 channels
Sampling rate                            : 22.05 kHz
Frame rate                               : 38.281 FPS (576 SPF)
Compression mode                         : Lossy
Stream size                              : 3.16 MiB (100%)
Writing library                          : LAME3.100
Encoding settings                        : -m j -V 2 -q 0 -lowpass 11 --vbr-new -b 8

Foobar file properties
Code: [Select]
File name : TEST.mp3
Folder name : C:\Users\xxxxxx\Music
File path : C:\Users\xxxxxx\Music\TEST.mp3
Subsong index : 0
File size : 3.15 MB (3 308 641 bytes)
Last modified : 2019-11-01 15:17:13
Duration : 3:57.547 (5 237 904 samples)
Sample rate : 22050 Hz
Channels : 2
Bitrate : 111 kbps
Codec : MP3
Codec profile : MP3 VBR V2
Encoding : lossy
Tool : LAME3.100
Embedded cuesheet : no
<ENC_DELAY> : 576
<ENC_PADDING> : 816
<MP3_ACCURATE_LENGTH> : yes
<MP3_STEREO_MODE> : joint stereo
Title: Re: MP3 conversion not outputting selected quality
Post by: yetanotherid on 2019-11-02 14:32:38
I can't add anything to the discussion other than to report that LAME 3.99r does the same thing (screenshot #1).
-S --noreplaygain -V 4 - %d

Based on the output bitrate, ffmpeg doesn't (screenshot #2).
-i - -ignore_length true -c:a libmp3lame -q:a 4 -id3v2_version 3 %d
Title: Re: MP3 conversion not outputting selected quality
Post by: fuffi on 2019-11-07 00:47:26
Any idea what may be happening?

I  can add only a question:

Are you using the "internal" or "external" encoder?
Maybe there are differences in version?
Title: Re: MP3 conversion not outputting selected quality
Post by: yetanotherid on 2019-11-07 14:15:01
Are you using the "internal" or "external" encoder?
Maybe there are differences in version?


If you select the fb2k mp3 encoder preset and choose a quality, then select "custom" from the drop down list at the top, fb2k fills in the appropriate command line based on your settings (the same applies to the other fb2k encoder presets). So unless you specify a different encoder file path after choosing "custom", it should be the same encoder.
Title: Re: MP3 conversion not outputting selected quality
Post by: m14u on 2019-11-07 15:19:50
Code: [Select]
[...] MPEG-2 Layer III [...]
lame.exe 32bit corrupt? lame linux 64 is OK - mpeg1.
Title: Re: MP3 conversion not outputting selected quality
Post by: fuffi on 2019-11-07 15:58:58
So unless you specify a different encoder file path after choosing "custom", it should be the same encoder.
Good to know, thank you!
Title: Re: MP3 conversion not outputting selected quality
Post by: A_Man_Eating_Duck on 2019-11-07 17:57:40
Code: [Select]
[...] MPEG-2 Layer III [...]
lame.exe 32bit corrupt? lame linux 64 is OK - mpeg1.
Are you using the correct sample rate for your test. It should be MPEG-2 Layer III for 22.05kHz