toots / shine Goto Github PK
View Code? Open in Web Editor NEWSuper fast fixed-point MP3 encoder with JS/wasm and android native bindings.
License: Other
Super fast fixed-point MP3 encoder with JS/wasm and android native bindings.
License: Other
CMakeLists.txt
cmake_minimum_required(VERSION 3.20)
project(libshine)
include_directories(src src/lib src/bin)
add_library(
shine STATIC
src/lib/bitstream.c src/lib/huffman.c
src/lib/l3bitstream.c
src/lib/l3loop.c
src/lib/l3mdct.c
src/lib/l3subband.c
src/lib/layer3.c
src/lib/reservoir.c
src/lib/tables.c)
install(
TARGETS shine
LIBRARY DESTINATION lib # for shared libs
ARCHIVE DESTINATION lib) # for static libs
install(
DIRECTORY libshine/include/
DESTINATION include
FILES_MATCHING PATTERN "*.h")
I integrated shine into prefix, a cmake ci project system. project ion is using shine. it needs CMake projects or ones with an autoconfigure, and for this one I had a generative autotools.cmake; however cmake did not launch with the appropriate environment vars so that configure would generate and then invoke & succeed. So I made this one manually
I am trying to encode this wave file (output from hexdump -C ):
00000000 52 49 46 46 24 e4 57 00 57 41 56 45 66 6d 74 20 |RIFF$.W.WAVEfmt |
00000010 10 00 00 00 01 00 02 00 80 bb 00 00 00 ee 02 00 |................|
00000020 04 00 10 00 64 61 74 61 00 e4 57 00 00 00 00 00 |....data..W.....|
This is the output from shineenc -v /tmp/sample.wav /tmp/output.mp3:
shineenc (Liquidsoap version)
Looking for chunk 'fmt '
Found chunk 'fmt ', length: 268435456
WAVE format: 256
Error: Unknown WAVE format
I am using shine package version 3.1.0-2 from OpenWRT on a GL.iNet GL-AR150 device.
Given the output above it looks shine is not properly converting byte order when reading from the file. WAVE format is 256 instead of 1 (0x0100 vs 0x0010) and length is 0x1000 0000 instead of 0x0000 0010
Hi,
Nice work. Looks like it doesn't support 8K and I tried to copy the bandindex table from lame but it still doesn't work.
If you'd like to help and this I can create a pull request.
Thanks,
Seven.
Hi
I saw that you have made some changes to avoid name collisions with lame.
Here ---> 6341ce5
Maybe you can make some more changes to allow FFmpeg build with static libshine and libmp3lame libraries.
FFmpeg won't compile with static libshine and libmp3lame libraries.
This is my build method
(I'm using 32-bit Ubuntu-14.04 Linux)...
cd ~/; sudo rm -rf build; mkdir build; cd build; \
wget sourceforge.net/projects/lame/files/lame/3.99/lame-3.99.5.tar.gz -qO- | tar -xz; cd lame-*; \
./configure --prefix=$HOME/build --disable-shared; \
make; make install; cd ..; \
git clone --depth 1 https://github.com/toots/shine.git; cd shine; ./bootstrap; \
./configure --prefix=$HOME/build --disable-shared; \
make; make install; cd ..; \
git clone --depth 1 git://source.ffmpeg.org/ffmpeg.git ffmpeg; cd ffmpeg; \
PKG_CONFIG_PATH=$HOME/build/lib/pkgconfig LDFLAGS=-L$HOME/build/lib CFLAGS=-I$HOME/build/include \
./configure --enable-libmp3lame --enable-libshine; make
This is the error message...
^
CC cmdutils.o
CC ffmpeg_opt.o
CC ffmpeg_filter.o
CC ffmpeg_vdpau.o
LD ffmpeg_g
/home/user/build/lib/libmp3lame.a(takehiro.o):(.rodata+0x160): multiple definition of `slen2_tab'
/home/user/build/lib/libshine.a(tables.o):(.rodata+0xc80): first defined here
/home/user/build/lib/libmp3lame.a(takehiro.o):(.rodata+0x1a0): multiple definition of `slen1_tab'
/home/user/build/lib/libshine.a(tables.o):(.rodata+0xcc0): first defined here
collect2: error: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1
xuzhiwendeMacBook-Pro:shine-3.1.0 xuzhiwen$ make
[ -d android/bin ] || mkdir android/bin
[ -d android/include ] || mkdir android/include
[ -d android/lib ] || mkdir android/lib
NDK_PROJECT_PATH=/Users/xuzhiwen/Documents/work/ffmpeg/shine/shine-3.1.0 ndk-build APP_BUILD_SCRIPT=/Users/xuzhiwen/Documents/work/ffmpeg/shine/shine-3.1.0/android/Library.mk
[arm64-v8a] Compile : shine <= bitstream.c
[arm64-v8a] Compile : shine <= formatbits.c
[arm64-v8a] Compile : shine <= huffman.c
[arm64-v8a] Compile : shine <= l3bitstream.c
[arm64-v8a] Compile : shine <= l3loop.c
[arm64-v8a] Compile : shine <= l3mdct.c
[arm64-v8a] Compile : shine <= l3subband.c
[arm64-v8a] Compile : shine <= layer3.c
[arm64-v8a] Compile : shine <= reservoir.c
[arm64-v8a] Compile : shine <= tables.c
[arm64-v8a] SharedLibrary : libshine.so
[arm64-v8a] Install : libshine.so => libs/arm64-v8a/libshine.so
[x86_64] Compile : shine <= bitstream.c
[x86_64] Compile : shine <= formatbits.c
[x86_64] Compile : shine <= huffman.c
[x86_64] Compile : shine <= l3bitstream.c
[x86_64] Compile : shine <= l3loop.c
[x86_64] Compile : shine <= l3mdct.c
[x86_64] Compile : shine <= l3subband.c
[x86_64] Compile : shine <= layer3.c
[x86_64] Compile : shine <= reservoir.c
[x86_64] Compile : shine <= tables.c
[x86_64] SharedLibrary : libshine.so
[x86_64] Install : libshine.so => libs/x86_64/libshine.so
[mips64] Compile : shine <= bitstream.c
[mips64] Compile : shine <= formatbits.c
[mips64] Compile : shine <= huffman.c
[mips64] Compile : shine <= l3bitstream.c
[mips64] Compile : shine <= l3loop.c
[mips64] Compile : shine <= l3mdct.c
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s: Assembler messages:
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:580: Error: opcode not supported on this processor: mips64r6 (mips64r6) mult $3,$7' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:597: Error: opcode not supported on this processor: mips64r6 (mips64r6)
madd $9,$10'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:616: Error: opcode not supported on this processor: mips64r6 (mips64r6) madd $9,$11' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:629: Error: opcode not supported on this processor: mips64r6 (mips64r6)
madd $9,$11'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:642: Error: opcode not supported on this processor: mips64r6 (mips64r6) madd $9,$11' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:655: Error: opcode not supported on this processor: mips64r6 (mips64r6)
madd $9,$11'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:668: Error: opcode not supported on this processor: mips64r6 (mips64r6) madd $9,$11' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:681: Error: opcode not supported on this processor: mips64r6 (mips64r6)
madd $8,$7'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:705: Error: opcode not supported on this processor: mips64r6 (mips64r6) mfhi $8' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:732: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mult $3,$13'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:750: Error: opcode not supported on this processor: mips64r6 (mips64r6) msub $4,$14' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:761: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mfhi $4'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:761: Error: opcode not supported on this processor: mips64r6 (mips64r6) mflo $5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:776: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mult $6,$14'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:795: Error: opcode not supported on this processor: mips64r6 (mips64r6) madd $13,$5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:810: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mfhi $4'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:810: Error: opcode not supported on this processor: mips64r6 (mips64r6) mflo $5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:831: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mult $4,$24'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:846: Error: opcode not supported on this processor: mips64r6 (mips64r6) msub $4,$15' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:857: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mfhi $4'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:857: Error: opcode not supported on this processor: mips64r6 (mips64r6) mflo $5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:872: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mult $6,$15'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:891: Error: opcode not supported on this processor: mips64r6 (mips64r6) madd $24,$5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:906: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mfhi $4'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:906: Error: opcode not supported on this processor: mips64r6 (mips64r6) mflo $5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:927: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mult $4,$18'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:942: Error: opcode not supported on this processor: mips64r6 (mips64r6) msub $4,$25' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:953: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mfhi $4'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:953: Error: opcode not supported on this processor: mips64r6 (mips64r6) mflo $5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:968: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mult $6,$25'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:987: Error: opcode not supported on this processor: mips64r6 (mips64r6) madd $18,$5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1002: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mfhi $4'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1002: Error: opcode not supported on this processor: mips64r6 (mips64r6) mflo $5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1023: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mult $4,$ra'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1038: Error: opcode not supported on this processor: mips64r6 (mips64r6) msub $4,$20' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1049: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mfhi $4'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1049: Error: opcode not supported on this processor: mips64r6 (mips64r6) mflo $5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1064: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mult $6,$20'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1083: Error: opcode not supported on this processor: mips64r6 (mips64r6) madd $ra,$5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1098: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mfhi $4'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1098: Error: opcode not supported on this processor: mips64r6 (mips64r6) mflo $5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1120: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mult $4,$8'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1136: Error: opcode not supported on this processor: mips64r6 (mips64r6) msub $4,$7' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1147: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mfhi $4'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1147: Error: opcode not supported on this processor: mips64r6 (mips64r6) mflo $5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1162: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mult $6,$7'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1181: Error: opcode not supported on this processor: mips64r6 (mips64r6) madd $8,$5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1196: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mfhi $4'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1196: Error: opcode not supported on this processor: mips64r6 (mips64r6) mflo $5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1218: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mult $4,$8'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1234: Error: opcode not supported on this processor: mips64r6 (mips64r6) msub $4,$7' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1245: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mfhi $4'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1245: Error: opcode not supported on this processor: mips64r6 (mips64r6) mflo $5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1260: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mult $6,$7'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1279: Error: opcode not supported on this processor: mips64r6 (mips64r6) madd $8,$5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1294: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mfhi $4'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1294: Error: opcode not supported on this processor: mips64r6 (mips64r6) mflo $5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1316: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mult $4,$8'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1332: Error: opcode not supported on this processor: mips64r6 (mips64r6) msub $4,$7' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1343: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mfhi $4'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1343: Error: opcode not supported on this processor: mips64r6 (mips64r6) mflo $5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1358: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mult $6,$7'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1377: Error: opcode not supported on this processor: mips64r6 (mips64r6) madd $8,$5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1392: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mfhi $4'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1392: Error: opcode not supported on this processor: mips64r6 (mips64r6) mflo $5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1414: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mult $4,$8'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1430: Error: opcode not supported on this processor: mips64r6 (mips64r6) msub $4,$7' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1441: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mfhi $4'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1441: Error: opcode not supported on this processor: mips64r6 (mips64r6) mflo $5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1456: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mult $6,$7'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1475: Error: opcode not supported on this processor: mips64r6 (mips64r6) madd $8,$5' /var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1490: Error: opcode not supported on this processor: mips64r6 (mips64r6)
mfhi $4'
/var/folders/95/y0h1lvf10ndd8lbsc5gtyh7c0000gn/T/l3mdct-e634fb.s:1490: Error: opcode not supported on this processor: mips64r6 (mips64r6) `mflo $5'
clang: error: assembler command failed with exit code 1 (use -v to see invocation)
make[1]: *** [/Users/xuzhiwen/Documents/work/ffmpeg/shine/shine-3.1.0/obj/local/mips64/objs/shine/src/lib/l3mdct.o] Error 1
make: *** [android] Error 2
Project is missing quality comparison as faster algorithm with missing Psychoacoustic Model could have lower audio quality at same bitrate.
When encoding a 32khz WAV at a bitrate of 48kbps, shine generates a frame header of FF FB 3A C4
instead of the expected FF FB 38 C4
; the padding bit is incorrectly being set.
It seems to narrow down to non-associativity of the floating-point calculation of avg_slots_per_frame
in layer3.c
. The calculation with samplerate=32000
and bitr=48
gives a double of 215.999999999999972... which consequently truncates incorrectly to 215.
Setting whole_slots_per_frame
by first truncating to a float before converting to an int:
config->mpeg.whole_slots_per_frame = (int)(float)avg_slots_per_frame;
seems to work now and various other WAV files still convert properly. May not be the best solution however as floating point errors may still occur elsewhere.
got this messange after "make":
cd . && /bin/bash /home/pi/downloads/shine-3.1.0/missing automake-1.14 --foreign
/home/pi/downloads/shine-3.1.0/missing: Zeile 81: automake-1.14: Kommando nicht gefunden.
WARNING: 'automake-1.14' is missing on your system.
You should only need it if you modified 'Makefile.am' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'automake' program is part of the GNU Automake package:
http://www.gnu.org/software/automake
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
http://www.gnu.org/software/autoconf
http://www.gnu.org/software/m4/
http://www.perl.org/
Makefile:374: recipe for target 'Makefile.in' failed
make: *** [Makefile.in] Error 1
I am not sure where to ask, but LAME and shine have similar 'calc_xmin' functions, but the shine function doesn't do anything inside other than setting l3_xmin->l[gr][ch][sfb] = 0; inside the loop. Could I get some overview of what it would take for me to port this?
If this is the wrong place, please advise the correct place to ask.
0 is invalid bitrate
With the new FSF address.
See https://www.gnu.org/licenses/old-licenses/gpl-2.0.html#SEC1
I'm build LEDE on Ubuntu 17.10.
There are Error Info:
touch /home/xpf/lede/build_dir/target-mipsel_24kc_musl/ffmpeg-full/ffmpeg-3.2.8/.prepared_f9165894b22b3b77bad3e7e50ca63601_6664517399ebbbc92a37c5bb081b5c53_check
. /home/xpf/lede/include/shell.sh; xzcat /home/xpf/lede/dl/ffmpeg-3.2.8.tar.xz | tar -C /home/xpf/lede/build_dir/target-mipsel_24kc_musl/ffmpeg-full/ffmpeg-3.2.8/.. -xf -
[ ! -d ./src/ ] || cp -fpR ./src/* /home/xpf/lede/build_dir/target-mipsel_24kc_musl/ffmpeg-full/ffmpeg-3.2.8
touch /home/xpf/lede/build_dir/target-mipsel_24kc_musl/ffmpeg-full/ffmpeg-3.2.8/.prepared_f9165894b22b3b77bad3e7e50ca63601_6664517399ebbbc92a37c5bb081b5c53
rm -f /home/xpf/lede/staging_dir/target-mipsel_24kc_musl/stamp/.ffmpeg.full_installed
( cd /home/xpf/lede/build_dir/target-mipsel_24kc_musl/ffmpeg-full/ffmpeg-3.2.8;
CFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -iremap/home/xpf/lede/build_dir/target-mipsel_24kc_musl/ffmpeg-full/ffmpeg-3.2.8:ffmpeg-3.2.8 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/xpf/lede/staging_dir/target-mipsel_24kc_musl/usr/include -I/home/xpf/lede/staging_dir/target-mipsel_24kc_musl/include -I/home/xpf/lede/staging_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/usr/include -I/home/xpf/lede/staging_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/include/fortify -I/home/xpf/lede/staging_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/include -fpic" LDFLAGS="-L/home/xpf/lede/staging_dir/target-mipsel_24kc_musl/usr/lib -L/home/xpf/lede/staging_dir/target-mipsel_24kc_musl/lib -L/home/xpf/lede/staging_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/usr/lib -L/home/xpf/lede/staging_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/lib -znow -zrelro" ./configure --enable-cross-compile --cross-prefix="mipsel-openwrt-linux-musl-" --arch="mipsel" --target-os=linux --prefix="/usr" --pkg-config="pkg-config" --enable-shared --enable-static --enable-pthreads --enable-zlib --disable-doc --disable-debug --disable-lzma --disable-vaapi --disable-vdpau --disable-outdevs --disable-altivec --disable-vsx --disable-power8 --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-inline-asm --disable-mipsdsp --disable-mipsdspr2 --disable-mipsfpu --disable-msa --disable-mmi --disable-fast-unaligned --disable-runtime-cpudetect --disable-yasm --enable-avresample --enable-libopus --enable-small --enable-libshine )
ERROR: shine not found using pkg-config
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.
Makefile:686: recipe for target '/home/xpf/lede/build_dir/target-mipsel_24kc_musl/ffmpeg-full/ffmpeg-3.2.8/.configured_f78b6842b4d5492e928f33d107540819' failed
make[3]: *** [/home/xpf/lede/build_dir/target-mipsel_24kc_musl/ffmpeg-full/ffmpeg-3.2.8/.configured_f78b6842b4d5492e928f33d107540819] Error 1
make[3]: Leaving directory '/home/xpf/lede/feeds/packages/multimedia/ffmpeg'
package/Makefile:109: recipe for target 'package/feeds/packages/ffmpeg/compile' failed
make[2]: *** [package/feeds/packages/ffmpeg/compile] Error 2
make[2]: Leaving directory '/home/xpf/lede'
package/Makefile:105: recipe for target '/home/xpf/lede/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile' failed
make[1]: *** [/home/xpf/lede/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/xpf/lede'
/home/xpf/lede/include/toplevel.mk:216: recipe for target 'world' failed
make: *** [world] Error 2
I try to reinstall pkg-config,
I try to run ./scripts/feeds install shine
but it doesn't work.
How can I fix this? Thanks.
then,I found that “PKG_SOURCE_URL:=https://github.com/toots/shine/releases/download/$(PKG_VERSION)/” does not exist in Makefile
A quick question: to your knowledge, can the encoder be used again after a call to shine_flush or shall it be closed and a new one created? When I flush it and then restart, there is always a pop heard from the previous track encoded
Thank you
Hi,
Please excuse my lack of knowledge here. I have compiled ffmpeg with libshine, intending to do recording from a microphone directly to MP3 on an RPi.
I can transcode a file just fine, but when attempting to use an alsa source, I get:
"[libshine @ 0x1a67f00] free format output not supported"
I tracked this to the code where it suggests a requirement to read headers - is this basically saying "streaming from live sources not supported"? Or do I just need to adjust my ffmpeg command line?
Thanks
Hi,
I'm currently trying to add npm support for this package.
However, right now when I go into the js
folder and run make, I get a different output in dist
to the one that you've uploaded.
I get a separate .js
and .wasm
file. I wonder if that's because we may have different emscripten versions or because there are some parameters missing in the Makefile.
Mine is:
> emcc --version
emcc (Emscripten gcc/clang-like replacement) 1.39.0 (commit ae5044e7797654f2ed5fb7c0e174e7c8ead5187b)
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Can you please update information on how to use this with darkice or liquidsoap.
i am trying to setup streaming client for icecast2.
i use raspberrypi and raspbian and usb sound card. there is very less info on how to do what i want.
Initializing and closing shine without encoding anything results in segmentation fault.
This was tested on 3.0 and latest git version. Simple workaround is to write zeros, but that's not pretty.
#include <shine/layer3.h>
int main(void)
{
shine_t shine;
shine_config_t config;
shine_set_config_mpeg_defaults(&config.mpeg);
config.mpeg.mode = STEREO;
config.wave.channels = PCM_STEREO;
config.wave.samplerate = 44100;
shine = shine_initialise(&config);
shine_close(shine);
}
gdb:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7bd2571 in shine_BF_freePartHolder () from /usr/lib/libshine.so.3
(gdb) info stack
#0 0x00007ffff7bd2571 in shine_BF_freePartHolder () from /usr/lib/libshine.so.3
#1 0x00007ffff7bd25b9 in shine_formatbits_close () from /usr/lib/libshine.so.3
#2 0x00007ffff7bd5cf1 in shine_close () from /usr/lib/libshine.so.3
#3 0x0000000000400703 in main () at shine.c:19
I want a so for linux, not android.
Library is missing flush function. To properly handle last frames.
There is ugly workaround to fed encoder with zeroes.
If the bitstream cache doesn't happen to be filled to an int (32-bit) boundary, the final mp3 frame may be truncated, resulting in a non-fatal error when playing that final frame, e.g.:
$ mpv test.mp3
[ffmpeg/demuxer] mp3: Estimating duration from bitrate, this may be inaccurate
(+) Audio --aid=1 (mp3 1ch 44100Hz)
AO: [pulse] 44100Hz mono 1ch float
A: 00:00:03 / 00:00:04 (92%)
[ffmpeg/audio] mp3float: invalid new backstep -1
A: 00:00:03 / 00:00:04 (94%)
Exiting... (End of file)
I use libshine to compress wav file to mp3 file in STM32. STM32 is a ARM CM4 mcu with fpu.
I use your code and I find is not so fast to compress realtime.
Actually,I just test a short file with 64 frame, so I calculate the code has 0.75x realtime.
It's reasonable in stm32 casue this chip's frequence just 180Mhz. Have you ever run it in a similar chip?
I find your code has lots of change compare to the original libshine. I guess you want the code faster so you modify it, am I right?
I want to know the ram consumption, have you ever notice it? In my test is almost 100kB, I mean is very wonderful if the ram consumption less.
My English is real poor, I hope you can understand it.
Thank you very much.
Hi This is great work. Appreciate it!
Had a bit of an issue using it though, because only this works from C++
extern "C" {
#include <shine/layer3.h>
};
Its not typical to something I try right away -- its common to have this conditional in the header. so it took me longer than I can admit to get it going ha; I had undefined calls. Appreciate the great project.
How did this come to have LGPL when the original shine seems to have been GPL?
Would be nice if pipe support could be added to allow decoding a source with i.e. ffmpeg and then encode with shineenc:
ffmpeg -y -threads 8 -loglevel fatal -i "input.aac" -ac 2 -ar 48000 -acodec pcm_s16le -f wav - | shineenc -d - output.mp3
Hi...
I found the following problem, can you help me to resolve it?
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.