juliaaudio / mp3.jl Goto Github PK
View Code? Open in Web Editor NEWUNMAINTAINED - MP3 codec for Julia using JuliaAudio idioms. LAME and mpg123 working under the hood
License: Other
UNMAINTAINED - MP3 codec for Julia using JuliaAudio idioms. LAME and mpg123 working under the hood
License: Other
It seems that in savestream
the stream is initialized using the keyword args, but the stream properties are set from the MP3INFO
argument.
To reproduce:
julia> using MP3, SampledSignals
julia> osc = SinSource(Float32, 48000Hz, [440Hz])
SampledSignals.SinSource{Float32,SIUnits.SIQuantity{Int64,0,0,-1,0,0,0,0,0,0}}(48000 s⁻¹,SIUnits.SIQuantity{Int64,0,0,-1,0,0,0,0,0,0}[440 s⁻¹],0.0)
julia> buf = read(osc, 5s)
240000-frame, 1-channel SampleBuf{Float32, 2, SIUnits.SIQuantity{Int64,0,0,-1,0,0,0,0,0,0}}
5.0 s at 48000 s⁻¹
████████████████████████████████████████████████████████████████████████████████
julia> str = MP3.savestream("/tmp/sine.mp3", MP3.MP3INFO(buf), nchannels=2)
MP3.MP3FileSink("/tmp/sine.mp3",Ptr{Void} @0x00007fcf24e401e0,MP3.MP3INFO(240000,1,48000,Float32),IOStream(<file /tmp/sine.mp3>))
julia> nchannels(str)
1
julia> eltype(str)
Float32
I'd expect here that eltype(str)
should return Fixed{Int16, 15}
(because that's what the stream can accept), and nchannels(str)
should return 2
. This way it can make use of the automatic conversion stuff in SampledSignals.
At some point we should also figure out how to export loadstream
and savestream
. I think in LibSndFile I just export them, but we don't want every package exporting their own versions. It might be worth talking to the FileIO folks to make those part of the FileIO API.
trying add https://github.com/JuliaAudio/MP3.jl
gives the following error: could not find project file in package at https://github.com/JuliaAudio/MP3.jl
. Some googling has led me to conclude that this is due to an old way of handling the packaging system and the new system requires one to add something called a project file.
The package is good but not compatible with Julia 0.7 or 1.0.
Hi, I'm having some problems installing the MP3 package.
I'm using Julia v1.3 and running Pkg.add("MP3")
launches this error:
ERROR: The following package names could not be resolved:
* MP3 (not found in project, manifest or registry)
Please specify by known `name=uuid`.
I don't know what to do, any idea what is happening here?
It looks like mpg123_format
doesn't return bitrate but sample rate (https://www.mpg123.de/api/group__mpg123__output.shtml):
Line 100 in ac386b6
(I was trying to find the bitrate of an MP3 file in Julia, but couldn't figure it out)
Is it possible for this package to be upgraded to work with Julia 1.4? Or has it been deprecated?
Hi all,
I need to read in an MP3-file. I installed the MP3.jl package but I face an error while precompiling.
On Windows 10, I get the error "space required before ? operator". On Ubuntu I get the error "extra token MP3INFO after end of expression".
I am on Julia 1.3, with [c0f69490] MP3 v0.0.0 #master (https://github.com/JuliaAudio/MP3.jl)
Perhaps someone can point me out where I go wrong? Is this package still maintained?
Are there other options to read an MP3-file from disk?
Thanks in advance!
I'm not expert of Julia but I'd like to help here.
If the repo is unlikely to taking PR any time in the near future, shall I publish a fork of MP3.jl to the registry?
Is there a good reason for this package to not be registered? This would need #20
As described in https://discourse.julialang.org/t/ann-plans-for-removing-packages-that-do-not-yet-support-1-0-from-the-general-registry/ we are planning on removing packages that do not support 1.0 from the General registry. This package has been detected to not support 1.0 and is thus slated to be removed. The removal of packages from the registry will happen approximately a month after this issue is open.
To transition to the new Pkg system using Project.toml
, see https://github.com/JuliaRegistries/Registrator.jl#transitioning-from-require-to-projecttoml.
To then tag a new version of the package, see https://github.com/JuliaRegistries/Registrator.jl#via-the-github-app.
If you believe this package has erroneously been detected as not supporting 1.0 or have any other questions, don't hesitate to discuss it here or in the thread linked at the top of this post.
Unfortunately liblame and mpg123 aren't available in WinRPM, but it looks like there are binaries we could just download (liblame, mpg123) during the build
process, or maybe we just include the libraries in the repo.
Whatever we do, the DLLs need to end up in deps/usr/lib
. Also, I'm not sure if we need to worry about 32-bit/64-bit libs or whether we can just install both and let the library loader figure it out. If we need to handle it ourselves we can branch on Sys.WORD_SIZE
or Sys.ARCH
.
The following attempt to load an mp3 file was not successful:
using MP3
load("wcello.mp3")
Julia complained with:
FileIO.File{FileIO.DataFormat{:UNKNOWN}}("...") couldn't be recognized by FileIO.
The clip was obtained by exporting a wav using Audacity.
Tried another mp3 file with the same format (Sting) and it worked just fine.
Links to both below.
Cello file : MPEG2.5 sample rate 11025 bit rate 64000
https://www.dropbox.com/s/h4n1r1lg02hztrb/wcello.mp3?dl=0
Sting file: same format, sample and bit rate as cello file
https://www.dropbox.com/s/jkr2ag3xaiw1f0s/sting_mono_11025sps.mp3?dl=0
Running Julia 0.5 on Ubuntu Gnome. Upon compiling for the first time, got these errors. Upon testing, it failed to know what load meant.
WARNING: Module Compat with uuid 635101549445 is missing from the cache.
This may mean module Compat does not support precompilation but is imported by a module that does.
ERROR: LoadError: Declaring precompile(false) is not allowed in files that are being precompiled.
in require(::Symbol) at ./loading.jl:385
in include_from_node1(::String) at ./loading.jl:488
in macro expansion; at ./none:2 [inlined]
in anonymous at ./:?
in eval(::Module, ::Any) at ./boot.jl:234
in process_options(::Base.JLOptions) at ./client.jl:239
in _start() at ./client.jl:318
while loading /home/antares/.julia/v0.5/SIUnits/src/SIUnits.jl, in expression starting on line 5
ERROR: LoadError: Failed to precompile SIUnits to /home/antares/.julia/lib/v0.5/SIUnits.ji.
in compilecache(::String) at ./loading.jl:593
in require(::Symbol) at ./loading.jl:393
in include_from_node1(::String) at ./loading.jl:488
in macro expansion; at ./none:2 [inlined]
in anonymous at ./:?
in eval(::Module, ::Any) at ./boot.jl:234
in process_options(::Base.JLOptions) at ./client.jl:239
in _start() at ./client.jl:318
while loading /home/antares/.julia/v0.5/SampledSignals/src/SampledSignals.jl, in expression starting on line 5
ERROR: LoadError: Failed to precompile SampledSignals to /home/antares/.julia/lib/v0.5/SampledSignals.ji.
in compilecache(::String) at ./loading.jl:593
in require(::Symbol) at ./loading.jl:393
in include_from_node1(::String) at ./loading.jl:488
in macro expansion; at ./none:2 [inlined]
in anonymous at ./:?
in eval(::Module, ::Any) at ./boot.jl:234
in process_options(::Base.JLOptions) at ./client.jl:239
in _start() at ./client.jl:318
while loading /home/antares/.julia/v0.5/MP3/src/MP3.jl, in expression starting on line 9
LoadError: Failed to precompile MP3 to /home/antares/.julia/lib/v0.5/MP3.ji.
while loading In[5], in expression starting on line 3
in compilecache(::String) at ./loading.jl:593
in require(::Symbol) at ./loading.jl:422
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.