[gst-devel] FAAC bitrate
Mike Dyer
mike.dyer at provision-comm.com
Fri Jan 8 11:22:36 CET 2010
On Fri, 2010-01-08 at 11:03 +0200, Stefan Kost wrote:
> Mike Dyer wrote:
> > Hi all,
> >
> > I'm trying to capture and encode some live audio/video to an mpeg-ts.
> > The audio is compressed using faac. However I've noticed that whatever
> > bitrate I request from faac, its always 128kbps.
> >
> > I can replicate using an audio-only pipeline:
> >
> > gst-launch alsasrc device=hw:0 !
> > audio/x-raw-int,channels=2,rate=44100,width=16 ! audioconvert ! faac
> > outputformat=1 profile=2 bitrate=8000 ! ffmux_mpegts ! filesink
> > location=faac.ts
> >
>
> hat looks correct, also the plugin code itself does not show anything
> obviously wrong. How did you verify the bitrate?
>
> Stefan
I used an mpeg ts analyser and checked the payload rate (in bps) for the
audio stream.
As a sanity check:
gst-launch -v audiotestsrc is-live=true wave=9 do-timestamp=true
num-buffers=450 ! audio/x-raw-int,channels=2,rate=44100,width=16 !
audioconvert ! faac outputformat=1 profile=2 bitrate=8000 !
ffmux_mpegts ! filesink location=8mbps.ts
gst-launch -v audiotestsrc is-live=true wave=9 do-timestamp=true
num-buffers=450 ! audio/x-raw-int,channels=2,rate=44100,width=16 !
audioconvert ! faac outputformat=1 profile=2 bitrate=128000 !
ffmux_mpegts ! filesink location=128mbps.ts
ls -l *.ts gives:
-rw-rw-r--. 1 mike mike 234436 2010-01-08 10:13 128mbps.ts
-rw-rw-r--. 1 mike mike 232556 2010-01-08 10:13 8mbps.ts
Two files of about the same size, for two very different 'bitrates'.
Mike
>
> > gst-launch -v gives:
> >
> > Setting pipeline to PAUSED ...
> > /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-buffer-time = 200000
> > /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-latency-time = 10000
> > /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0.GstPad:src: caps =
> > audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
> > width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
> > Pipeline is live and does not need PREROLL ...
> > Setting pipeline to PLAYING ...
> > New clock: GstAudioSrcClock
> > /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps =
> > audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
> > width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
> > /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps =
> > audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
> > width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
> > /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps =
> > audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
> > width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
> > /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps =
> > audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
> > width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
> > /GstPipeline:pipeline0/GstFaac:faac0.GstPad:src: caps = audio/mpeg,
> > mpegversion=(int)4, channels=(int)2, rate=(int)44100,
> > codec_data=(buffer)1210
> > /GstPipeline:pipeline0/GstFaac:faac0.GstPad:sink: caps =
> > audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
> > width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
> > /GstPipeline:pipeline0/ffmux_mpegts:ffmux_mpegts0.GstPad:audio_0: caps =
> > audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)44100,
> > codec_data=(buffer)1210
> > /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps =
> > video/mpegts, systemstream=(boolean)true
> >
> > How do I make faac listen to the bitrate setting?
> >
> >
More information about the gstreamer-devel
mailing list