cutter with vorbis or opus: not-negotiated error

Antoine Martin antoine at nagafix.co.uk
Tue Sep 12 14:55:41 UTC 2017


On 11/09/17 09:15, Yasushi SHOJI wrote:
> Hi,
> 
> On Fri, Sep 8, 2017 at 7:05 PM, Antoine Martin <antoine at nagafix.co.uk> wrote:
>> I'm trying to use the cutter element before either vorbisenc or opusenc
>> but I consistently get the "not-negotiated" error.
>> The same pipeline works just fine with most other audio encoders.
>>
>> Examples that work fine:
>> gst-launch-1.0 audiotestsrc ! cutter ! lamemp3enc ! fakesink
>> Same pipeline also works with flacenc, wavenc, speexenc, faac..
> 
> those encoders supports
> 
>       audio/x-raw
>                  format: { (string)S8, (string)S16LE }
> 
> which is the format cutter's src pad supports.  You can check that
> with
> 
>     $ gst-inspect-1.0 cutter
> 
>> Now the more detailed output with the ones that don't work:
>> gst-launch-1.0 -vtm audiotestsrc ! cutter ! vorbisenc  ! fakesink
>> WARNING: erroneous pipeline: could not link cutter0 to vorbisenc0
>>
>> gst-launch-1.0 -vtm audiotestsrc ! cutter ! wavpackenc ! fakesink
>> WARNING: erroneous pipeline: could not link cutter0 to wavpackenc0
> 
> These encoders don't supports S8 nor S16LE, but F32LE or S32LE.
> You need to convert the format with 'audioconvert'
> 
>     $ gst-launch-1.0  audiotestsrc ! cutter ! audioconvert ! fakesink
> 
Thanks!
I swear that adding audioconvert was the first thing I had tried.
It must have been in the wrong place, or with opus:
$ gst-launch-1.0  audiotestsrc ! cutter ! audioconvert ! opusenc ! fakesink
ERROR: from element
/GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0: Internal data
stream error.

That's because opus needs an "audioresample" element instead:
$ gst-launch-1.0  audiotestsrc ! cutter ! audioresample ! opusenc ! fakesink

Now I wished I could say that the problem is completely solved with the
other codecs (vorbis, wavpack, etc) but unfortunately I am seeing a
different issue when adding a muxer to the pipeline (could be related to
our use of appsink + appsrc in between) - which I will ignore for now
since I have at least one decent codec that works well.

Thanks again,
Antoine


More information about the gstreamer-devel mailing list