Comments (7)
After inspecting the code, this seems to be a problem with the pre-compiled version of ffmpeg in Ubuntu 12.04, which is failing with the error:
ffmpeg: relocation error: ffmpeg: symbol avformat_alloc_output_context2, version LIBAVFORMAT_53 not defined in file libavformat.so.53 with link time reference
After uninstalled the ffmpeg package and compiling it from scratch following https://trac.ffmpeg.org/wiki/UbuntuCompilationGuide, it seems to work fine.
This issue aside, it might be a good idea in audio_segment.py
to change:
subprocess.call(ffmpeg_call, stderr=open(os.devnull))
to:
subprocess.call(ffmpeg_call, stderr=sys.stderr)
so the user can see a more direct error message. Not seeing that wasted a lot of my time.
from pydub.
I wonder if there is a good way to make this user configurable. ffmpeg
can be quite verbose and most of the time it's not useful information for pydub to output to stderr
(showing the progress of the operation).
How would you feel about capturing ffmpeg
's stderr and only outputting it to sys.stderr
if ffmpeg
returns a non-zero (error) status code.
from pydub.
What about logging? if the user is logging her application she will be able to see the log anyway.
from pydub.
Checking the exit code for a non-zero value makes sense.
from pydub.
Hi, I also have a problem with playing an mp3.
from pydub import AudioSegment
u=AudioSegment.from_mp3("yourself.mp3")
Traceback (most recent call last):
File "", line 1, in
File "build/bdist.macosx-10.6-intel/egg/pydub/audio_segment.py", line 297, in from_mp3
File "build/bdist.macosx-10.6-intel/egg/pydub/audio_segment.py", line 284, in from_file
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 493, in call
return Popen(_popenargs, *_kwargs).wait()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 679, in init
errread, errwrite)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
would anyone help me? Thanks!
from pydub.
@Ratnaganadi It looks like you don't have ffmpeg installed, or if it is installed, pydub can't find it.
from pydub.
@Ratnaganadi You may want to take a look at the Getting ffmpeg set up section of the read me :)
from pydub.
Related Issues (20)
- 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!!
- Failed to decode audio in `.mkv` files with `flac` codec [analysis and solution attached]
- Chunked Audio not Playing
- "SyntaxWarning: invalid escape sequence \("
- pyinstaller compatibility?
- Inconsistency with audio segment duration on silence or Sine
- MP3 exports unreadable/corrupted HOT 1
- app crash after playing a boing sound with exit error code -1073741819 (0xC0000005)
- pyaudioop.py def ratecv doesn't return something
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.