I found two source archives for twolame 0.4.0: SourceForge (https://sourceforge.net/projects/twolame/) and GitHub (https://github.com/njh/twolame/). Both provide different binaries, but not for Windows. So I tried to compile the sources in an MSYS2/MinGW environment (provided by the media-autobuild suite).
As documented, the basic automake process worked, a small binary was built with GCC 10.2, and it ran. So I copied the frontend/twolame.exe elsewhere ... and it did not work anymore. Nothing happened.
A closer analysis revealed that this was just a wrapper for the real binaries: frontend/.libs/twolame.exe and libtwolame/.libs/libtwolame-0.dll (it seems to locate these to run them from their installation location when called).
As long as both are copied to the same directory, they seem to work well. But I wonder if it is possible to create a really static build, everything in one EXE. I tried to configure --enable-static but that was not sufficient.
/*
* ATTENTION WIN32 USERS!
*
* By default, when you use this header file, it is configured to use
* symbols from the "twolame.dll" file. If you use the static version of
* the library, define LIBTWOLAME_STATIC prior to including this header.
*/
Try that and see if it does what you want.
I've posted a win32 binary at Rarewares. It uses the libsndfile dll which is included.
how can i create a free format encoding with "450kbts"?
Thank you both. Food for experiments.
"Free format" encoding means that the header does not tell a target bitrate of each audio block, they will be as big as they are, and audio players won't rely on a bitrate per block. It's not meant to enforce a constant specific bitrate here. The blocks will have a size at the accuracy saturation limit, which depends a lot on the encoded audio material.
Actually, most encoders only support "free format" at a constant bitrate. The only way to delineate packets in Free Format MP3 is by searching forward indefinitely until you find another sync word.
I do not think that MP2 has a "free format", however.
how can i create a free format encoding with "450kbts"?
twolame -b 300 --freeformat input_file
(notice the used bitrate 300, which is impossible to set among "standard" CBR bitrates)
I do not think that MP2 has a "free format", however.
It is not mp2 having free format, it is mpeg audio. Any layers allow for free format encoding.
Way to bump the topic. And even if it has free format, good luck finding anything that will play it.
Way to bump the topic. And even if it has free format, good luck finding anything that will play it.
At least foobar2000 does not like mp2 free format, but it plays mp2 VBR which is not specified in ISO/IEC 11172 part 3
Free format is "special" in that it doesn't specify a packet length field, so you have to completely decode a packet to determine its length.
And even if it has free format, good luck finding anything that will play it.
VLC can play MP3 free format.
FFmpeg can probably play it too. What's the point, even? 320kbps CBR not wasteful enough for your needs? Need 640kbps?
FFplay can't play free format:
[mp3float @ 00000033a21a0e80] Header missing
Last message repeated 259 times
[mp3 @ 00000033a219ef00] decoding for stream 0 failed
[mp3 @ 00000033a219ef00] Could not find codec parameters for stream 0 (Audio: mp3 (mp3float), 0 channels, fltp): unspecified frame size
However Winamp MAD plug-in 0.15.1b (in_mad.dll) can also play MP3 free format, it can be used with 1by1 (https://mpesch3.de/1by1.html), for instance.
The point is that free format does exist and there are softwares being able to play it back, to answer your challenge.
Cog can now play free format as well. You could say I'm a bit MAD.