Giter Site home page Giter Site logo

Comments (9)

faroit avatar faroit commented on June 12, 2024

Sorry for the late reply. did you solve it in the meantime?

from stempeg.

vinspatel avatar vinspatel commented on June 12, 2024

No worries. I still haven't solved it yet.
I looked into the inner code of the plugins. It is not creating temp file form ffmpeg execution. This happens with other ffmpeg based libraries as well such as librosa's load throws the same error when ran in loop.
It could be a process management issue in windows i.e., it could be possible that file is still in use or such.

from stempeg.

faroit avatar faroit commented on June 12, 2024

are you using python 2.7? Seems that there is a bug in the process call: https://bugs.python.org/issue9400

Otherwise I don't know how to reproduce, could you provide a minimal example where you iterate over the musdb tracks using multiprocessing?

from stempeg.

faroit avatar faroit commented on June 12, 2024

I now found a workaround that might help. I added a functionality reuse the Info object, so that ffprobe is only called once if the stream configuration is the same for all tracks (like in musdb)

info = stempeg.Info("first_track.stem.mp4")
for i in range(tracks):
    S, _ = stempeg.read_stems("further_tracks.stem.mp4", info=info)

I will also add this to musdb and update the packages.

from stempeg.

vinspatel avatar vinspatel commented on June 12, 2024

are you using python 2.7? Seems that there is a bug in the process call: https://bugs.python.org/issue9400

Otherwise I don't know how to reproduce, could you provide a minimal example where you iterate over the musdb tracks using multiprocessing?

Apologies for late reply, I was trying to do this on conda environment in windows:
with necessary packages including libsndfile, ffmpeg, stempeg, musdb, etc.

mus = musdb.DB(root_dir=r"C:\Users\w1572032.INTRANET.002\Desktop\musdb18")
tracks = mus.load_mus_tracks(subsets=['train'])
for i, track in enumerate(tqdm(tracks)):
    t = np.copy(track.targets['vocals'].audio.T)
    xt = np.copy(track.targets['accompaniment'].audio.T)

from stempeg.

faroit avatar faroit commented on June 12, 2024

but was this python 2.7 or 3?

and what do you think about the workaround?

from stempeg.

vinspatel avatar vinspatel commented on June 12, 2024

I was using python 3.7.2 in specific.
I will test it on the updated library and will let you know by tomorrow.
Thanks a lot for your reply.

from stempeg.

vinspatel avatar vinspatel commented on June 12, 2024

I have tested the updated library on musdb tracks and it works.
Thanks

from stempeg.

faroit avatar faroit commented on June 12, 2024

That's great! Thanks for your feedback. I will update musdb as well in the coming days

from stempeg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.