Skip to content
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

.ogg not exporting when using single channel #35

Open
JableSoHo opened this issue Jul 1, 2015 · 5 comments
Open

.ogg not exporting when using single channel #35

JableSoHo opened this issue Jul 1, 2015 · 5 comments

Comments

@JableSoHo
Copy link

Im trying to export an ogg using single channel, but it breaks on the following command :
debug: Start export format=ogg
debug: Spawn cmd=ffmpeg -y -ar 22050 -ac 1 -f s16le -i /var/folders/2g/mnz3cs295mx9hrx7l9y3c3640000gp/T/audiosprite.3490381531883031 -acodec libvorbis -f ogg -ab 128k baseGameSound.ogg

It does however work when I do not use single channel.

@tonistiigi
Copy link
Owner

What is the error message when you just manually run the ffmpeg command?

@JableSoHo
Copy link
Author

This is what I am getting :
Input #0, s16le, from '/var/folders/2g/mnz3cs295mx9hrx7l9y3c3640000gp/T/audiosprite.3490381531883031':
Duration: 00:01:57.20, bitrate: 352 kb/s
Stream #0:0: Audio: pcm_s16le, 22050 Hz, 1 channels, s16, 352 kb/s
[libvorbis @ 0x7f8a53845400] encoder setup failed
Output #0, ogg, to 'baseGameSound.ogg':
Stream #0:0: Audio: vorbis, 0 channels, 128 kb/s
Metadata:
encoder : Lavc56.26.100 libvorbis
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16le (native) -> vorbis (libvorbis))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

@JableSoHo
Copy link
Author

Does this help at all?

@tonistiigi
Copy link
Owner

I'm not quite sure what may be the issue here. Can you also post your platform and ffmpeg and libvorbis version.

This thread https://stackoverflow.com/questions/28626506/error-while-converting-mp4-to-ogg-usr-bin-ffmpeg-invalid-argument (very last comment from LordNeckbeard) suggests its a difference between vorbis and libvorbis. That may be the case because when I run your example I get Stream #0:0 -> #0:0 (pcm_s16le -> libvorbis) where you get Stream #0:0 -> #0:0 (pcm_s16le (native) -> vorbis (libvorbis))

@ottokart
Copy link

Adding "-ac 2" solved a similar problem for me.
This was suggested in a comment "That's not the same error at all?! Your new error is telling you that the Vorbis encoder only supports audio with 2 channels, but your input file only has a mono audio stream. You need to convert the mono channel to stereo, using -ac 2. – DarkDust Feb 20 '15 at 10:39" from the linked stackoverflow question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants