You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I set the encoder to 16kbps as biterate using "direct" encoding i get a blob, i can append the latter to a new recorded one and get a new blob that has the duration of the two blobs and iit is playable by chrome.
The problem is when i load a mono 16kbps lame encoded mp3 file from the db and try to append to it the newly recorded track with Mp3LameEcoder.js,
The resulting file has correct duration, but unfortunately not playable, although i play it withe vlc player:
It is playable but when hits the start of the appended blob the current time monitor on vlc player gets messed up.
I used a Java program to compare the different files i got the following:
My db Blob : 16kb,11025 sample rate, Mono.
Recordings of Mp3LameRecorder.js: 16Kb,41100 sample rate, Joint Stereo.
I changed the channels section in Mp3LameRecorder.js to encode one channel but no avail, it's the same result.
function _lame_set_num_channels($gfp,$num_channels) : $num_channels = 1;
After some mp3 file analysis i think you encode with MPEG-2 Layer III while my db mp3's are MPEG-2.5 Layer III which encoded with 16kbps.
The text was updated successfully, but these errors were encountered:
First of all, I don't know about tools you are using (what's db?, vic player? and so on ... I only know foobar200, Audacity and other few tools). I can't help you about these things.
I don't think it is OK to append encoded data to another existing MP3. All MP3 file has a header block. Data chunk after header relies on header information. Concatenating two different data obviously fails.
Also, I did not intend such VERY low (16k!) bitrate. I imagine you want to record some low quality voice memo or so on. But LAME has been mostly designed for hi-fi audio.
(I think) this is why it is difficult to set MONO mode for LAME. LAME API needs special setup for mono encoding (not enough with setting num_channels to 1). API spec deeply depends on multi-channel hi-fi data.
In fact, I don't know about exact API setup for encoding mono data. Even lame.exe (or other binary command for each environment) needs special options to set mono. But I dont know how to set it from API.
You can search for forks of akrennmair/libmp3lame-js and their variations on google. Some of them are trying to set mono (as you want).
But I would rather recommend Ogg Vorbis. Vorbis support mono channel easier and has better performance for low bitrate. I have made JavaScript Vorbis encoder with similar interface as Mp3LameEncoder.js. See below.
I set the encoder to 16kbps as biterate using "direct" encoding i get a blob, i can append the latter to a new recorded one and get a new blob that has the duration of the two blobs and iit is playable by chrome.
The problem is when i load a mono 16kbps lame encoded mp3 file from the db and try to append to it the newly recorded track with Mp3LameEcoder.js,
The resulting file has correct duration, but unfortunately not playable, although i play it withe vlc player:
It is playable but when hits the start of the appended blob the current time monitor on vlc player gets messed up.
I used a Java program to compare the different files i got the following:
My db Blob : 16kb,11025 sample rate, Mono.
Recordings of Mp3LameRecorder.js: 16Kb,41100 sample rate, Joint Stereo.
I changed the channels section in Mp3LameRecorder.js to encode one channel but no avail, it's the same result.
function _lame_set_num_channels($gfp,$num_channels) : $num_channels = 1;
After some mp3 file analysis i think you encode with MPEG-2 Layer III while my db mp3's are MPEG-2.5 Layer III which encoded with 16kbps.
The text was updated successfully, but these errors were encountered: