Code Monkey home page Code Monkey logo

Comments (5)

BreadMaker avatar BreadMaker commented on July 18, 2024

After reading through a lot of different documentations, I have found the correct parameters for avconv, adding -ab (non-existent) made the important parameter -aq be ignored. bitrate keeps ignored. This info should be documented.

BTW, the corrected (and working as expected) line is:

preview.export("tmp.ogg", "ogg", codec="libvorbis", parameters=["-aq", "0", "-ar", "32000"])

from pydub.

BreadMaker avatar BreadMaker commented on July 18, 2024

I've been trying different settings and I've noticed something, the bitrate parameter has always worked, but not the way I expected.

Now the following happens: bitrate="64k" works but bitrate="32k" fails silently. The lowest option that works for me is bitrate="48k" that generates a much smaller file (just what I need)

preview.export("tmp.ogg", "ogg", codec="libvorbis", bitrate="48k")

After this odyssey, I conclude that pydub is a great project, but unfortunately requires more documentation.

from pydub.

jiaaro avatar jiaaro commented on July 18, 2024

@BreadMaker thanks for the bug report! I've been working on docs (even wrote some today!) but there's a lot to cover, especially for the export method, since it covers much of the functionality of ffmpeg.

I will update the docs with your notes when I'm back at my computer :)

Thanks again!

from pydub.

jiaaro avatar jiaaro commented on July 18, 2024

@BreadMaker After further research, each codec has it's own rules about acceptable bitrates. The ffmpeg documentation is pretty light on details but does have some info on bitrate arguments.

from pydub.

BreadMaker avatar BreadMaker commented on July 18, 2024

Cool, if you add an statement about that in the export docstring, I think we can close this issue.

from pydub.

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.