Writing OGG produces an empty file
See original GitHub issueI don’t know if I’m doing something wrong, but this produces an OGG file with zero frames:
import soundfile as sf
import numpy as np
a = np.empty(100000)
sf.write(a, 'delme.ogg', 44100)
This doesn’t seem to depend on my libsndfile binary, since the same error happens both on Debian Linux and on Windows XP 32bit. To be sure, I compiled a little test program in C, which correctly writes a non-empty OGG file (this I tried only on Linux), so it cannot really be related to my installed version of libsndfile, or can it?
Any ideas what’s wrong?
Can anybody write OGG files with PySoundFile?
Reading OGGs works perfectly, BTW … Writing other formats, too …
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:20 (7 by maintainers)
Top Results From Across the Web
Writing OGG produces an empty file · Issue #130 - GitHub
I don't know if I'm doing something wrong, but this produces an OGG file with zero frames: import soundfile as sf import numpy...
Read more >Why redirecting output sometimes produces an empty file?
This means that for cat file > file , the output redirection (which truncates the file) occurs before cat is spawned, and cat...
Read more >writing to file produces an empty file or no file at all
I tried to add: int fileLength = myFile.GetLength(); and see fileLength gets the correct length, but even then the file is removed /...
Read more >Create an empty file using Python - GeeksforGeeks
Write Only ('w'): Open the file for writing. For an existing file, the data is truncated and over-written. Write and Read ('w+'): Open...
Read more >5 Ways to Empty or Delete a Large File Content in Linux
5 Ways to Empty or Delete a Large File Content in Linux · 1. Empty File Content by Redirecting to Null · 2....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can query
soundfile.__libsndfile_version__
to get the version of soundfile you are using.By the way, you say you are using “PySoundFile”, which is severely outdated. Please install “soundfile” instead, which is the current version.
I seem to have the same problem using libsndfile1 1.0.28-7ubuntu0.1 with
soundfile.__version__
: 0.10.3.post1.I see no easy option for downgrading libsndfile1 to 1.0.27.