oggenc raw recording: Stream error: Invalid argument

Bug #1099873 reported by Tong Sun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vorbis-tools (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hi,

Seem to me it is impossible to record raw audio of 16 bit signed little endian, 2 channel 44100kHz with oggenc, under precise at least.

According to
http://unix.stackexchange.com/questions/45837/pipe-the-output-of-parec-to-sox
http://thisisabore.net/tag/CLI

it should be as simple as

oggenc --raw -o test.ogg -

However, that always gives me the following error:

Encoding standard input to
         "test.ogg"
at quality 3.00
Stream error: Invalid argument

Done encoding file "test.ogg"

        File length: 0m 00.0s
        Elapsed time: 0m 00.0s
        Rate: 0.0000
        Average bitrate: inf kb/s

It's been working before according to the listed sources, could it be a bug of oggenc in precise?

can you try it with your release please?

BTW, to get the correct MONITOR device, use this

MONITOR=$(pactl list | egrep -A2 '^(\*\*\* )?Source #' | \
Name: .*\.monitor$' | awk '{print $NF}' | tail -n1)

ref: http://www.outflux.net/blog/archives/2009/04/19/recording-from-pulseaudio/

Thanks

Revision history for this message
Martin Steghöfer (martin-steghoefer) wrote :

I don't think this is a bug of vorbis-tools, but either a bug of parec (or some underlying library) or a user error.

Both the content of the error message and the moment in which it appears suggest that the message actually comes from parec instead of oggenc. I grepped the source code of oggenc and neither the string "Invalid argument" nor "Stream error" appear anywhere. However, a web search revealed that parec does produce that message on occasion [1] [2] [3]. However, I'm not sure, if it is parec directly. Some results suggest that the message comes from pulseaudio.

Have you tried piping to something different than oggenc? Or reading from a different device?

Piping from parec to oggenc works flawlessly on my Ubuntu 14.04 system for reading from both a real input device and a monitor:
parec -d alsa_output.usb-Sennheiser_Sennheiser_USB_Headset_0000000000-00-Headset.analog-stereo.monitor | oggenc --raw -q 8 -o test.ogg -
parec -d alsa_input.usb-Sennheiser_Sennheiser_USB_Headset_0000000000-00-Headset.analog-stereo | oggenc --raw -q 8 -o test.ogg -

Cheers,
Martin

[1] http://lists.freedesktop.org/archives/pulseaudio-discuss/2010-February/006585.html
[2] https://groups.google.com/forum/#!msg/sdr-widget/RPn147OX9ak/BxlrTuNLQj4J
[3] https://github.com/mumble-voip/mumble/issues/1297

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.