Comments (5)
Thanks Damien,
Can you tell me a little more about the problem you were having and how you came to this solution? line 262 is not the only use of a NamedTemporaryFile(…)
so I just want to make sure this change isn't needed elsewhere as well.
from pydub.
hi,
I've just tried your module and I've got no error but the export mp3 has
been not created properly (tiny bad mp3 file).
I found out that temporary MP3 file was good but when you read it and copy
it to the MP3 "out_f" file => out_f.write (output.read()) <= it seems that
the reader stop after a zero-byte string...
I know, It's weird that I'm the only one with this malfunction...
But I wonder why the "output" file is the only file open as not binary
file...
I used v2.7 of python under pydev+eclipse env. (win7).
hope it helps,
-damien
HAPPY NEW YEAR
2012/12/31 James Robert [email protected]
Thanks Damien,
Can you tell me a little more about the problem you were having and how
you came to this solution? line 262 is not the only use of a
NamedTemporaryFile(…) so I just want to make sure this change isn't
needed elsewhere as well.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-11781330.
from pydub.
hi again James,
Probably with windows you have to open as binary the mp3 file:
I read:
"On Windows, 'b' appended to the mode opens the file in binary mode, so
there are also modes like 'rb', 'wb', and 'r+b'. Python on Windows makes a
distinction between text and binary files; the end-of-line characters in
text files are automatically altered slightly when data is read or written.
This behind-the-scenes modification to file data is fine for ASCII text
files, but it’ll corrupt binary data like that in JPEG or EXE files. Be
very careful to use binary mode when reading and writing such files. On
Unix, it doesn’t hurt to append a 'b' to the mode, so you can use it
platform-independently for all binary files."
hope it helps,
-damien
HAPPY NEW YEAR
2012/12/31 James Robert [email protected]
Thanks Damien,
Can you tell me a little more about the problem you were having and how
you came to this solution? line 262 is not the only use of a
NamedTemporaryFile(…) so I just want to make sure this change isn't
needed elsewhere as well.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-11781330.
from pydub.
@python4d would you mind running from the latest rev in github to confirm that this fixes your issue? (and as an aside would you mind letting me know if you're able to export a file as mp3?)
from pydub.
I've tested your new build and it works like a charm :-)
thanks!
-damien
from pydub.
Related Issues (20)
- 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!!
- 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)
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.