Comments (5)
Thank you both for the spoon-feeding there.
from flac.
Hi @spbkaizo,
Hi, It's great that you're attempting to implement a new encoder API, but after some testing with it I've not got a path forward with existing files, which are using a non-implemented prediction codec:
ERROR: github.com/mewkiz/flac.encodeSubframe (encode_subframe.go:38): error: support for prediction method 3 not yet implemented
Yeah. This is to be expected, as support for LPC encoded samples is yet to be implemented. In essence only verbatim encoding of audio samples is currently implemented.
For background, refer to issue #35 and #37.
Previously, I could use flac.Encode(...) to achieve simple metadata editing, which works on those files but that was removed in favour of the new Encoder API.
The previous encoding API was essentially a hot-fix to allow for metadata encoding (for background, see issue #14), but it didn't try to re-encode audio samples. The new API is intended to be generic and support also re-encoding of audio samples (see #15). However, as stated above, support for LPC encoding of audio samples has not yet been implemented.
Looking for a suggestion as to how best to proceed - should I attempt to re-implement the flac.Encode function within my own code, or is there something I'm missing when trying to change just the metadata, and not the samples.
I'd suggest that you either roll your own metadata encoding API (feel free to copy the metadata encoding API of mewkiz/flac
and adapt it to your need).
Of course, if you are interested in moving the flac
project further, then you'd be most welcome to contribute to implementing support for LPC encoding of audio samples. The person with most experience on LPC encoding is @wsc1. I'm sure if you asked William specific questions related to LPC encoding, he'd be glad to help you get up to speed.
Cheers,
Robin
Edit: as a workaroud for now, you could probably pin to commit 306014a in your go.mod
. At least, with that commit there should be working encoding of metadata (but not yet any attempt at supporting encoding of audio samples).
from flac.
Hi @mewmew
I also want to just edit metadata leaving the audio untouched and was already using the flac.Encode() helper.
I'm trying to pin 306014a but it doesn't work due to unsynced dependencies I think (Errors like bitio.Writer does not implement io.Writer (Write method has pointer receiver))
Is there any chance of having a working branch with the old flac.Encode() for legacy purposer or having an examble like https://go.dev/play/p/P3efeHuhHO but using NewEncoder?
Thanks in advance!
from flac.
Hi @oprietop!
I also want to just edit metadata leaving the audio untouched and was already using the flac.Encode() helper.
Hopefully, the (unsupported) metadata encoding API (flac.Encode
) should still work, after fixing the build that is.
The enc.go
file (which was removed in #32), implemented metadata encoding. We've re-added it to an unsupported branch called unsupported-metadata-encoding.
Feel free to try and pin against this branch to use the metadata encoding API.
The only change we've done is to change the type of the bw
field from bitio.Writer
to *bitio.Writer
in the encoder
struct to fix the build (62f10a5#diff-5058624b6c704de7e48133a21cbbff8f5745fa67075f6558c08825adf249babcR92).
Hopefully the metadata encoding should still work! We've not tested the metadata encoding of 62f10a5 locally ourselves.
So feel free to test it out and report back.
Wish you happy coding and a lovely winter.
Cheers,
Henry & Robin
from flac.
As of version v1.0.10 of mewkiz/flac
support for LPC encoding of audio samples has been added (see #35 and #66).
Cheerful regards,
Henry & Robin
Edit: for an example of how to encode a FLAC stream (including audio samples), see
Line 135 in 50b27ff
from flac.
Related Issues (20)
- Implement LPC encoding of audio samples
- Any plans for replaygain scanning support? HOT 2
- Audio Compression HOT 7
- Convert problem in the flac2wav HOT 3
- Error when downloading package HOT 2
- Sample with Rice parameter escape codes HOT 5
- Reason for using sized integer types in `StreamInfo` and `frame.Header` HOT 2
- Update seek API to use absolute rather than relative sample number HOT 2
- Flac plays slowly HOT 1
- `flac.parseStreamInfo` reports wrong type when first block is not `STREAMINFO` HOT 3
- FLAC decoder testbench HOT 7
- Last call on FLAC spec HOT 3
- IETF test cases - 3 of 64 FAIL (61 of 64 PASS) in flac.TestDecode HOT 6
- "frame.Frame.parseHeader: The flac library test cases do not yet include any audio files with block size 192." HOT 2
- flac.Parse funcs are prone to data races HOT 3
- IETF test cases - 1 of 64 FAIL (63 of 64 PASS) in frame.TestFrameHash (decoding audio samples) HOT 5
- proposal: move cmd example tools to external repository (to reduce external dependencies of flac)
- ci: replace Travis CI with Github actions for continuous build and test runs
- investigate why some encoding test cases are failing HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flac.