-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vorbis.convert() - unable to encode file with oggenc | from_pcm() sub.wait returns -11 #10
Comments
error occurs on line: 360 in the master development branch (line 352 in 2.19 release) |
What happens when you try to run oggenc directly, such as on a .wav file using "oggenc file.wav" ? If you're able to run it successfully, I may need to adjust the arguments I'm sending it, but if it fails when run directly there may be some issue with your oggenc install. |
Hey Tuffy Yep, I tried running oggenc directly and the encoding works fine. I tried using both FLAC and .wav files as the source and both source formats work. Here's the commands that I tried (different quality settings): oggenc 00_audio.wav -q -1 -o 00_audio-1.ogg Additional shorter-hand forms works: oggenc 00_audio.flac -q -1 Also oggenc was installed via vorbis-tools in Ubuntu 12.10 Hope this helps. |
That is interesting. One of my testing machines is Ubuntu 12.04 which hasn't exhibited any problems and is running vorbis-tools-1.4.0-1ubuntu2. I'm going to install 12.10 and see if I can duplicate the problem on my end. |
After installing Ubuntu 12.10, I'm getting the same error you are when attempting to encode from oggenc using data from stdin. It's a segmentation fault in vorbis-tools-1.4.0-1ubuntu3 package that doesn't occur in ubuntu2 or when encoding from a source file. After installing vorbis-tools from source and running it through valgrind, it looks like there's a bug on line 449 of oggenc.c during a file close operation that's causing it to crash, but it'll take more digging to find the whole cause. In the meantime, I could reimplement my from_pcm() method to use temp files if you need that functionality right away, but I may have to punt a long-term oggenc fix to the Ubuntu people. |
Ahh OK thanks for finding the source of the problem. I only upgraded to Ubuntu 12.10 recently too so that I could get the Opus encoder/decoder from the repository. I was assuming that everything will would work OK seeing at that version was released a few months ago and any problems would be found and fixed by now.. Guess not. I did want to use OGG enc for some bulk transcoding in a web project, is your plan to re-implement from_pcm() quite a trivial bit of work? Out of interest how would your short-term solution work? Would you convert the source file to another file format before sending it to oggenc or is the segmentation something separate from the source file format itself? Do you think me removing vorbis-tools-1.4.0-1ubuntu3 and installing the previous version would work if that's possible in 12.10? |
I'm not sure installing vorbis-tools from a previous version would help since installing them from source has the same error. There's either a bug in some library oggenc is using under Ubuntu 12.10, or it has some longstanding bug that just hasn't happened to be fatal until now. The short-term solution works by decoding to a temporary .wav file on disk, then running oggenc on that file before deleting it. Its progress display will look funny, but it should work okay. The patch looks like:
|
OK cool thanks. Will try that out and let you know how it goes. Also I've filed a bug in the Ubuntu repository. Not sure how quickly they respond to bug reports mind.. https://bugs.launchpad.net/ubuntu/+source/vorbis-tools/+bug/1096037 |
just tried this patch and i get this error: error: patch failed: audiotools/vorbis.py:256 I tried this with the latest code in on the master branch. Do I need to use another branch at all? |
The patch was made against v2.19 commit 2cca95d. I was able to patch it okay from the audiotools root directory via "patch -p1 < vorbis.patch" |
Aah I was using git apply rather than patch.. Yep, thanks that worked a treat. Vorbis encoding is working as expected. Cheers! |
A strange error occurred ( unable to encode file with oggenc ) when running some tests converting a FLAC file to the following formats:
.mp3/libmp3
.m4a/neroaac
.ogga/vorbis
All formats work apart from the OGG/Vorbis format which fails.
I searched the source code for PAT and found that inside the Vorbis.from_pcm() method (Vorbis.py: line 352) the code is expecting sub.wait() == 0 whilst it is equal to -11.
Searching for oggenc return codes, I found that minus codes indicate that the process has been terminated, but not sure why that might be.
I have all of the binaries installed for all formats so OGG/Vorbis should work.
Any ideas what could be causing this??
The text was updated successfully, but these errors were encountered: