AAC encoder and decoder (faac & faad) do not work in separate pipelines

jmz jmzheng at gmail.com
Wed Oct 24 08:55:39 UTC 2018


Hi,

I use faac (AAC encoder) and faad (AAC decoder) in one pipeline and it works
well:
  gst-launch-1.0 audiotestsrc num-buffers=50 ! faac ! faad ! alsasink

The caps between faac and faad is
/GstPipeline:pipeline0/GstFaac:faac0.GstPad:src: caps = "audio/mpeg\,\
mpegversion\=\(int\)2\,\ channels\=\(int\)1\,\ rate\=\(int\)44100\,\
stream-format\=\(string\)raw\,\ framed\=\(boolean\)true\,\
profile\=\(string\)lc"
/GstPipeline:pipeline0/GstFaad:faad0.GstPad:sink: caps = "audio/mpeg\,\
mpegversion\=\(int\)2\,\ channels\=\(int\)1\,\ rate\=\(int\)44100\,\
stream-format\=\(string\)raw\,\ framed\=\(boolean\)true\,\
profile\=\(string\)lc"

It also works if caps "audio/mpeg,mpegversion=4" is set instead:
  gst-launch-1.0 audiotestsrc num-buffers=50 ! faac !
'audio/mpeg,mpegversion=4' ! faad ! alsasink

Then, I save the encoded audio stream into a file:
  gst-launch-1.0 audiotestsrc num-buffers=50 ! faac ! filesink
location=test.aac

The caps between faac and filesink is
/GstPipeline:pipeline0/GstFaac:faac0.GstPad:src: caps = "audio/mpeg\,\
mpegversion\=\(int\)4\,\ channels\=\(int\)1\,\ rate\=\(int\)44100\,\
stream-format\=\(string\)raw\,\ framed\=\(boolean\)true\,\
level\=\(string\)2\,\ base-profile\=\(string\)lc\,\ profile\=\(string\)lc\,\
codec_data\=\(buffer\)1208"
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps =
"audio/mpeg\,\ mpegversion\=\(int\)4\,\ channels\=\(int\)1\,\
rate\=\(int\)44100\,\ stream-format\=\(string\)raw\,\
framed\=\(boolean\)true\,\ level\=\(string\)2\,\
base-profile\=\(string\)lc\,\ profile\=\(string\)lc\,\
codec_data\=\(buffer\)1208"

But I can't play the file using faad:
  gst-launch-1.0 filesrc location=test.aac !
'audio/mpeg,mpegversion=4,channels=1,rate=44100,stream-format=raw' ! faad !
alsasink

ERROR: from element /GstPipeline:pipeline0/GstFaad:faad0: No valid frames
decoded before end of stream
Additional debug info:
gstaudiodecoder.c(2315): gst_audio_decoder_sink_eventfunc ():
/GstPipeline:pipeline0/GstFaad:faad0:
no valid frames found
ERROR: pipeline doesn't want to preroll.

How to let the faad pipeline work?

Thanks for help



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list