Comments (5)
have you tried this?
segt.export("test.mp3", format="mp3", codec="libmp3lame")
The encoder is reported as libmp3lame
in your codecs, I think that's what avconv expects you to use. Honestly, once you have to name the codec explicitly everything goes straight to hell ;) - I'm not sure it's not figuring it out on it's own from just the format
from pydub.
Can you confirm that your install of ffmpeg/avlib includes lame?
Why do each of these commands return?
ffmpeg -version
ffmpeg -codecs
ffmpeg -formats
from pydub.
I'm on ubuntu 14.04, so it's now called "avconv" 😛
Here is the output for avconv:
avconv --version
avconv version 9.16-6:9.16-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
built on Aug 10 2014 18:16:02 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
avconv 9.16-6:9.16-0ubuntu0.14.04.1
libavutil 52. 3. 0 / 52. 3. 0
libavcodec 54. 35. 0 / 54. 35. 0
libavformat 54. 20. 4 / 54. 20. 4
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 3. 3. 0 / 3. 3. 0
libavresample 1. 0. 1 / 1. 0. 1
libswscale 2. 1. 1 / 2. 1. 1
avconv -codecs | grep lame
avconv version 9.16-6:9.16-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
built on Aug 10 2014 18:16:02 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
DEA.L. mp3 MP3 (MPEG audio layer 3) (decoders: mp3 mp3float ) (encoders: libmp3lame )
avconv -formats | grep mp3
avconv version 9.16-6:9.16-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
built on Aug 10 2014 18:16:02 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
DE mp3 MP3 (MPEG audio layer 3)
Standing by in case you need more info!
from pydub.
Hmm... sorry, but still making an empty file.
I threw both
segt.export("test1.mp3", format="mp3", codec="libmp3lame")
and
segt.export("test1.ogg", format="ogg", codec="libvorbis")
at it, to make sure. The ogg works fine, the mp3's just an empty file.
from pydub.
@hadware would you mind sharing one of the files that is having this issue for you? I'm out of ideas :/
you can email me at [email protected]
from pydub.
Related Issues (20)
- URGENT ISSUE:- RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning) HOT 1
- pyaudioop.rms() TypeError: 'float' object cannot be interpreted as an integer and NameError: name 'buffer' is not defined HOT 1
- JSONDecodeError with AudioSegment when reading from bytesio
- Wrong exception when ffprobe is not installed HOT 1
- works for me on win11
- Option to return offsets with audio segments when splitting on silence
- CouldntDecodeError: Decoding failed. ffmpeg returned error code: 1
- AudioSegment.from_file(audio_path) crashes despite ffmpeg.exe hardcoded and also in the PATH
- M4A Chapters
- Pydub import error
- Improve memory footprint of make_chunks
- Calling AudioSegment.export() with an integer bitrate causes Python subprocess exception HOT 1
- is there a faster way to play audio?
- using base64 audio data on AudioSegment
- test failures on python 3.12 HOT 2
- Tell
- Create new tag version.
- Disable pydub RuntimeWarning if not applicable to deployment HOT 1
- How do you guys install ffmpeg or libav inside a python-image? HOT 1
- Unwanted Logs!!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pydub.