viert / go-lame Goto Github PK
View Code? Open in Web Editor NEWnew generation lamemp3 bindings for Go
License: MIT License
new generation lamemp3 bindings for Go
License: MIT License
Hi there! This seems like a super useful library for a project I'm working on that needs to do a bit of wav > mp3 transcoding, but I'm not really sure how to actually use the library?
Even just running go get "github.com/viert/go-lame"
fails, since it can't find lame/lame.h
. I'm not familiar with calling code via cgo, so if any additional setup instruction could be provided, it'd be super helpful.
Cheers!
When reading a wav file (generated by github.com/go-audio/wav
) there is an audible click at the start of the resulting mp3 file.
I wonder, is it treating the wav file header like audio data? I don't know enough about wav files and lame to have an intuition as to what is causing this.
go get: warning: modules disabled by GO111MODULE=auto in GOPATH/src;
ignoring go.mod;
see 'go help modules'
0.57s$ go get -u github.com/viert/go-lame
go get: warning: modules disabled by GO111MODULE=auto in GOPATH/src;
ignoring go.mod;
see 'go help modules'
# github.com/viert/go-lame
../../viert/go-lame/encoder.go:5:23: fatal error: lame/lame.h: No such file or directory
compilation terminated.
The command "go get -u github.com/viert/go-lame" failed and exited with 2 during .
When I use the code exactly as per the readme it works out of the box except for one important problem.
When used on mac os x, on a sample wav file, the mp3 plays faster than the wav file. The mp3 audio and sounds like a sped up chipmunk.
The bitrate of the input file is 22khz / mono / 16bit. It appears that the library doesn't read the metadata of the wav file. So it assume your code must first open the wav file, read the metadata, then pass that metadata on to go-lame. It would be more convenient if the library just used the metadata inside the wav file. cf github.com/go-audio/wav
What encoding should be used in the ID3 strings?
https://stackoverflow.com/questions/9857727/text-encoding-in-id3v2-3-tags
Hello @viert! I have the same ask for this package as for the previous one :)
Also, new pkg.go.dev website doesn't show documentation for non-licensed projects.
Hi!
I have created a package to decode from another type of file to mp3 using lame-go.
https://github.com/Wameuh/Golang-AudioConverterToMp3
My issue is when I try to set the VBR mode to default lame.VBRDefault
, the output file is not correct (wrong duration for instance).
To be more accurate, when I try to open the file with an mp3 player (like VLC), the duration is not correct.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.