Adjust README, build dependencies
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
4612766b64
commit
b35ead54da
13
.drone.yml
13
.drone.yml
|
@ -9,12 +9,21 @@ steps:
|
|||
commands:
|
||||
- apk update && apk add --no-cache git-lfs && git lfs install
|
||||
- git submodule update --init --recursive
|
||||
- name: test
|
||||
- name: build-repo
|
||||
image: golang:1.18-bullseye
|
||||
commands:
|
||||
- sed -i -e "s/ main[[:space:]]*\$/ main contrib non-free/" /etc/apt/sources.list
|
||||
- DEBIAN_FRONTEND=noninteractive apt update
|
||||
- DEBIAN_FRONTEND=noninteractive apt install -y git build-essential autoconf automake libtool libflac-dev libopus-dev libopusfile-dev libsamplerate0-dev libmp3lame-dev libebur128-dev libfdk-aac-dev
|
||||
- git clone --depth 1 https://gitlab.xiph.org/xiph/libopusenc.git && cd libopusenc && ./autogen.sh && ./configure --prefix /usr && make && make install && cd ..
|
||||
- git clone --depth 1 https://git.gammaspectra.live/S.O.N.G/alac.git && cd alac && autoreconf -fi && ./configure --prefix /usr && make && make install && cd ..
|
||||
- go test -c -v
|
||||
- name: build-test-full
|
||||
image: golang:1.18-bullseye
|
||||
commands:
|
||||
- DEBIAN_FRONTEND=noninteractive apt update
|
||||
- DEBIAN_FRONTEND=noninteractive apt install -y git build-essential autoconf automake libtool libflac-dev libopus-dev libopusfile-dev libsamplerate0-dev libmp3lame-dev libebur128-dev
|
||||
- git clone --depth 1 https://github.com/xiph/libopusenc.git && cd libopusenc && ./autogen.sh && ./configure --prefix /usr && make && make install && cd ..
|
||||
- git clone --depth 1 https://gitlab.xiph.org/xiph/libopusenc.git && cd libopusenc && ./autogen.sh && ./configure --prefix /usr && make && make install && cd ..
|
||||
- git clone --depth 1 https://github.com/mstorsjo/fdk-aac.git && cd fdk-aac && ./autogen.sh && ./configure --prefix /usr && make -j$(nproc) && make install && cd ..
|
||||
- git clone --depth 1 https://git.gammaspectra.live/S.O.N.G/alac.git && cd alac && autoreconf -fi && ./configure --prefix /usr && make && make install && cd ..
|
||||
- go test -cover -coverpkg=git.gammaspectra.live/S.O.N.G/Kirika/hasher,git.gammaspectra.live/S.O.N.G/Kirika/audio,git.gammaspectra.live/S.O.N.G/Kirika/audio/format,git.gammaspectra.live/S.O.N.G/Kirika/audio/format/flac,git.gammaspectra.live/S.O.N.G/Kirika/audio/format/mp3,git.gammaspectra.live/S.O.N.G/Kirika/audio/format/aac,git.gammaspectra.live/S.O.N.G/Kirika/audio/format/alac,git.gammaspectra.live/S.O.N.G/Kirika/audio/format/opus,git.gammaspectra.live/S.O.N.G/Kirika/audio/format/tta -v
|
||||
|
|
26
README.md
26
README.md
|
@ -37,19 +37,19 @@ Collection of audio utilities for decoding/encoding files and streams.
|
|||
## Dependencies
|
||||
### Go >= 1.18
|
||||
|
||||
### [libFLAC](https://github.com/xiph/flac) (required by [goflac](https://git.gammaspectra.live/S.O.N.G/goflac))
|
||||
### [libFLAC](https://gitlab.xiph.org/xiph/flac) (required by [goflac](https://git.gammaspectra.live/S.O.N.G/goflac))
|
||||
```shell
|
||||
sudo apt install libflac-dev
|
||||
```
|
||||
|
||||
### [libopus](https://github.com/xiph/opus) and [libopusfile](https://github.com/xiph/opusfile) (required by [go-pus](https://git.gammaspectra.live/S.O.N.G/go-pus))
|
||||
### [libopus](https://gitlab.xiph.org/xiph/opus) and [libopusfile](https://gitlab.xiph.org/xiph/opusfile) (required by [go-pus](https://git.gammaspectra.live/S.O.N.G/go-pus))
|
||||
```shell
|
||||
sudo apt install libopus-dev libopusfile-dev
|
||||
```
|
||||
|
||||
### [libopusenc](https://github.com/xiph/libopusenc) (required by [go-pus](https://git.gammaspectra.live/S.O.N.G/go-pus))
|
||||
### [libopusenc](https://gitlab.xiph.org/xiph/libopusenc) (required by [go-pus](https://git.gammaspectra.live/S.O.N.G/go-pus))
|
||||
```shell
|
||||
git clone --depth 1 https://github.com/xiph/libopusenc.git
|
||||
git clone --depth 1 https://gitlab.xiph.org/xiph/libopusenc.git
|
||||
cd libopusenc
|
||||
./autogen.sh
|
||||
./configure --prefix /usr
|
||||
|
@ -59,6 +59,11 @@ sudo make install
|
|||
|
||||
### [FDK AAC Codec Library](https://github.com/mstorsjo/fdk-aac) (required by [go-fdkaac](https://git.gammaspectra.live/S.O.N.G/go-fdkaac))
|
||||
```shell
|
||||
sudo apt install libfdk-aac-dev
|
||||
```
|
||||
|
||||
Alternatively if package cannot be found under your distribution:
|
||||
```shell
|
||||
git clone --depth 1 https://github.com/mstorsjo/fdk-aac.git
|
||||
cd fdk-aac
|
||||
./autogen.sh
|
||||
|
@ -67,6 +72,7 @@ make -j$(nproc)
|
|||
sudo make install
|
||||
```
|
||||
|
||||
|
||||
### [libalac](https://git.gammaspectra.live/S.O.N.G/alac) (required by [go-alac](https://git.gammaspectra.live/S.O.N.G/go-alac))
|
||||
```shell
|
||||
git clone --depth 1 https://git.gammaspectra.live/S.O.N.G/alac.git
|
||||
|
@ -122,20 +128,20 @@ Subdependencies that are not cgo-based are denoted in cursive.
|
|||
| [S.O.N.G/go-fdkaac](https://git.gammaspectra.live/S.O.N.G/go-fdkaac) | [MIT](https://git.gammaspectra.live/S.O.N.G/go-fdkaac/src/branch/master/LICENSE) | |
|
||||
| [mstorsjo/fdk-aac](https://github.com/mstorsjo/fdk-aac) | [FDK License, BSD-like](https://github.com/mstorsjo/fdk-aac/blob/master/NOTICE) | Does not include patent grants.<br/>Can be linked by cgo as a shared library. |
|
||||
| [S.O.N.G/go-pus](https://git.gammaspectra.live/S.O.N.G/go-pus) | [MIT](https://git.gammaspectra.live/S.O.N.G/go-pus/src/branch/v2/LICENSE) | |
|
||||
| [xiph/opus](https://github.com/xiph/opus) | [BSD 3-Clause](https://github.com/xiph/opus/blob/master/COPYING) | Read extra license details on the [official site](https://opus-codec.org/license/).<br/>Can be linked by cgo as a shared library. |
|
||||
| [xiph/opusfile](https://github.com/xiph/opusfile) | [BSD 3-Clause](https://github.com/xiph/opusfile/blob/master/COPYING) | Can be linked by cgo as a shared library. |
|
||||
| [xiph/ogg](https://github.com/xiph/ogg) | [BSD 3-Clause](https://github.com/xiph/ogg/blob/master/COPYING) | Can be linked by cgo as a shared library. |
|
||||
| [xiph/libopusenc](https://github.com/xiph/libopusenc) | [BSD 3-Clause](https://github.com/xiph/libopusenc/blob/master/COPYING) | Can be linked by cgo as a shared library. |
|
||||
| [xiph/opus](https://gitlab.xiph.org/xiph/opus) | [BSD 3-Clause](https://gitlab.xiph.org/xiph/opus/-/blob/master/COPYING) | Read extra license details on the [official site](https://opus-codec.org/license/).<br/>Can be linked by cgo as a shared library. |
|
||||
| [xiph/opusfile](https://gitlab.xiph.org/xiph/opusfile) | [BSD 3-Clause](https://gitlab.xiph.org/xiph/opusfile/-/blob/master/COPYINGG) | Can be linked by cgo as a shared library. |
|
||||
| [xiph/ogg](https://gitlab.xiph.org/xiph/ogg) | [BSD 3-Clause](https://gitlab.xiph.org/xiph/ogg/-/blob/master/COPYING) | Can be linked by cgo as a shared library. |
|
||||
| [xiph/libopusenc](https://gitlab.xiph.org/xiph/libopusenc) | [BSD 3-Clause](https://gitlab.xiph.org/xiph/libopusenc/-/blob/master/COPYING) | Can be linked by cgo as a shared library. |
|
||||
| [S.O.N.G/go-tta](https://git.gammaspectra.live/S.O.N.G/go-tta) | [LGPL v3](https://git.gammaspectra.live/S.O.N.G/go-tta/src/branch/master/LICENSE) | |
|
||||
| [S.O.N.G/goflac](https://git.gammaspectra.live/S.O.N.G/goflac) | [BSD 3-Clause](https://git.gammaspectra.live/S.O.N.G/goflac/src/branch/master/LICENSE) | |
|
||||
| [xiph/flac](https://github.com/xiph/flac) | [BSD 3-Clause](https://github.com/xiph/flac/blob/master/COPYING.Xiph) | Read extra license details on the [official site](https://xiph.org/flac/license.html).<br/>Can be linked by cgo as a shared library. |
|
||||
| [xiph/flac](https://gitlab.xiph.org/xiph/flac) | [BSD 3-Clause](https://gitlab.xiph.org/xiph/flac/-/blob/master/COPYING.Xiph) | Read extra license details on the [official site](https://xiph.org/flac/license.html).<br/>Can be linked by cgo as a shared library. |
|
||||
| [dh1tw/gosamplerate](https://github.com/dh1tw/gosamplerate) | [BSD 2-Clause](https://github.com/dh1tw/gosamplerate/blob/master/LICENSE) | |
|
||||
| [libsndfile/libsamplerate](https://github.com/libsndfile/libsamplerate) | [BSD 2-Clause](https://github.com/libsndfile/libsamplerate/blob/master/COPYING) | Can be linked by cgo as a shared library. |
|
||||
| [edgeware/mp4ff](https://github.com/edgeware/mp4ff) | [MIT](https://github.com/edgeware/mp4ff/blob/master/LICENSE.md) | |
|
||||
| [jfreymuth/oggvorbis](https://github.com/jfreymuth/oggvorbis) | [MIT](https://github.com/jfreymuth/oggvorbis/blob/master/LICENSE) | | |
|
||||
| _[jfreymuth/vorbis](https://github.com/jfreymuth/vorbis)_ | [MIT](https://github.com/jfreymuth/vorbis/blob/master/LICENSE) | Subdependency of _jfreymuth/oggvorbis_. | |
|
||||
| [kvark128/minimp3](https://github.com/kvark128/minimp3) | [MIT](https://github.com/kvark128/minimp3/blob/master/LICENSE.txt) | | |
|
||||
| [lieff/minimp3](https://github.com/lieff/minimp3) | [CC0 1.0](https://github.com/lieff/minimp3/blob/master/LICENSE) | |
|
||||
| [lieff/minimp3](https://github.com/lieff/minimp3) | [CC0 1.0](https://github.com/lieff/minimp3/blob/master/LICENSE) | Subdependency of _lieff/minimp3_. |
|
||||
| [mewkiz/flac](https://github.com/mewkiz/flac) | [The Unlicense](https://github.com/mewkiz/flac/blob/master/LICENSE) | |
|
||||
| _[go-audio/audio](https://github.com/go-audio/audio)_ | [Apache 2.0](https://github.com/go-audio/audio/blob/master/LICENSE) | Subdependency of _mewkiz/flac_. Only used on tests there. |
|
||||
| _[go-audio/wav](https://github.com/go-audio/wav)_ | [Apache 2.0](https://github.com/go-audio/wav/blob/master/LICENSE) | Subdependency of _mewkiz/flac_. Only used on tests there. |
|
||||
|
|
|
@ -135,12 +135,12 @@ func (f Format) Encode(source audio.Source, writer io.WriteCloser, options map[s
|
|||
|
||||
encoder := fdkaac.NewAacEncoder()
|
||||
if isHEv2 {
|
||||
err := encoder.InitHEv2(source.Channels, source.SampleRate, bitrate*1024)
|
||||
err := encoder.InitHEv2(source.Channels, source.SampleRate, bitrate*1024, fdkaac.MuxingModeADTS)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
err := encoder.InitLc(source.Channels, source.SampleRate, bitrate*1024)
|
||||
err := encoder.InitLc(source.Channels, source.SampleRate, bitrate*1024, fdkaac.MuxingModeADTS)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
2
go.mod
2
go.mod
|
@ -5,7 +5,7 @@ go 1.18
|
|||
require (
|
||||
git.gammaspectra.live/S.O.N.G/go-alac v0.0.0-20220421110341-7839cd4c1da1
|
||||
git.gammaspectra.live/S.O.N.G/go-ebur128 v0.0.0-20220418202343-73a167e76255
|
||||
git.gammaspectra.live/S.O.N.G/go-fdkaac v0.0.0-20220417020459-7018d91e3eed
|
||||
git.gammaspectra.live/S.O.N.G/go-fdkaac v0.0.0-20220421165127-c4b73b260d94
|
||||
git.gammaspectra.live/S.O.N.G/go-pus v0.0.0-20220227175608-6cc027f24dba
|
||||
git.gammaspectra.live/S.O.N.G/go-tta v0.2.1-0.20220226150007-096de1072bd6
|
||||
git.gammaspectra.live/S.O.N.G/goflac v0.0.0-20220417181802-3057bde44c07
|
||||
|
|
4
go.sum
4
go.sum
|
@ -2,8 +2,8 @@ git.gammaspectra.live/S.O.N.G/go-alac v0.0.0-20220421110341-7839cd4c1da1 h1:D1Vy
|
|||
git.gammaspectra.live/S.O.N.G/go-alac v0.0.0-20220421110341-7839cd4c1da1/go.mod h1:f1+h7KOnuM9zcEQp7ri4UaVvgX4m1NFFIXgReIyjGMA=
|
||||
git.gammaspectra.live/S.O.N.G/go-ebur128 v0.0.0-20220418202343-73a167e76255 h1:BWRx2ZFyhp5+rsXhdDZtk5Gld+L44lxlN9ASqB9Oj0M=
|
||||
git.gammaspectra.live/S.O.N.G/go-ebur128 v0.0.0-20220418202343-73a167e76255/go.mod h1:5H4eVW9uknpn8REFr+C3ejhvXdncgm/pbGqKGC43gFY=
|
||||
git.gammaspectra.live/S.O.N.G/go-fdkaac v0.0.0-20220417020459-7018d91e3eed h1:aJPCb3LS4Wai34S5bKUGgAm+/hPt0J2tvWPOl6RnbbE=
|
||||
git.gammaspectra.live/S.O.N.G/go-fdkaac v0.0.0-20220417020459-7018d91e3eed/go.mod h1:pkWt//S9hLVEQaJDPu/cHHPk8vPpo/0+zHy0me4LIP4=
|
||||
git.gammaspectra.live/S.O.N.G/go-fdkaac v0.0.0-20220421165127-c4b73b260d94 h1:gD6lOyQwwuyJilwbLC8lAEWpUSZvndJsUGwxxDatCAE=
|
||||
git.gammaspectra.live/S.O.N.G/go-fdkaac v0.0.0-20220421165127-c4b73b260d94/go.mod h1:pkWt//S9hLVEQaJDPu/cHHPk8vPpo/0+zHy0me4LIP4=
|
||||
git.gammaspectra.live/S.O.N.G/go-pus v0.0.0-20220227175608-6cc027f24dba h1:JEaxCVgdr3XXAuDCPAx7ttLFZaaHzTEzG+oRnVUtUKU=
|
||||
git.gammaspectra.live/S.O.N.G/go-pus v0.0.0-20220227175608-6cc027f24dba/go.mod h1:vkoHSHVM9p6vAUmXAik0gvaLcIfiQYrD6bQqVpOulUk=
|
||||
git.gammaspectra.live/S.O.N.G/go-tta v0.2.1-0.20220226150007-096de1072bd6 h1:ITVVisbHPnUclp3PBkCbXFeBhOCBcOjPdgjJ9wRH3TI=
|
||||
|
|
Loading…
Reference in a new issue