Transcoding a PCMA stream into MP4
Mike Mitchell
mike.mitchell at panometric.net
Wed Sep 7 03:00:53 PDT 2011
Greetings,
I'm struggling with what should be simple, transcoding a PCMA stream into
MP4. My chain runs but produces nothing. The rtsp source is a video encoder
where I am discarding the video part of the stream. I plan on muxing back
with a different video stream after I get it to save in the mp4. I've also
shown how I can listen to the stream just fine. I tried lots of simpler
methods with lesser reults, but perhaps I'm off on a tangent now.
If someone would straighten me out I'd be very grateful.
Thanks.
+ gst-launch -ev rtspsrc location=rtsp://10.111.1.101/0/trackID=1 name=mic
'!' 'application/x-rtp, media=(string)audio, payload=(int)8,
clock-rate=(int)8000, encoding-name=(string)PCMA, a-ptime=(string)20,
npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1' '!'
rtppcmadepay '!' audioparse '!' audioresample '!' ffenc_aac '!' queue2
name=qa '!' mp4mux name=mux faststart=true moov-recovery-file=test.moov '!'
filesink location=test.mp4
Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstRTSPSrc:mic/GstRtpBin:rtpbin0: latency = 2000
/GstPipeline:pipeline0/GstRTSPSrc:mic/GstRtpBin:rtpbin0: buffer-mode = slave
(1)
/GstPipeline:pipeline0/GstRTSPSrc:mic/GstUDPSrc:udpsrc1: timeout = 5000000
/GstPipeline:pipeline0/GstRTSPSrc:mic/GstUDPSrc:udpsrc4: timeout = 5000000
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstRTSPSrc:mic/GstUDPSrc:udpsrc1: timeout = 0
/GstPipeline:pipeline0/GstRTSPSrc:mic/GstUDPSrc:udpsrc4: timeout = 0
/GstPipeline:pipeline0/GstRTSPSrc:mic/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_0:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:mic/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0.GstPad:send_rtcp_src:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:mic/GstUDPSink:udpsink1.GstPad:sink: caps
= application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:mic/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_0.GstProxyPad:proxypad2:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:mic/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_1:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:mic/GstRtpBin:rtpbin0/GstRtpSession:rtpsession1.GstPad:send_rtcp_src:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:mic/GstUDPSink:udpsink3.GstPad:sink: caps
= application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:mic/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_1.GstProxyPad:proxypad5:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1: caps = application/x-rtp,
media=(string)audio, payload=(int)8, clock-rate=(int)8000,
encoding-name=(string)PCMA, a-ptime=(string)20, npt-start=(guint64)0,
play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps =
application/x-rtp, media=(string)audio, payload=(int)8,
clock-rate=(int)8000, encoding-name=(string)PCMA, a-ptime=(string)20,
npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps =
application/x-rtp, media=(string)audio, payload=(int)8,
clock-rate=(int)8000, encoding-name=(string)PCMA, a-ptime=(string)20,
npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:mic.GstGhostPad:recv_rtp_src_1_89829216_8:
caps = application/x-rtp, media=(string)audio, payload=(int)8,
clock-rate=(int)8000, encoding-name=(string)PCMA, a-ptime=(string)20,
npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:mic.GstGhostPad:recv_rtp_src_1_89829216_8.GstProxyPad:proxypad7:
caps = application/x-rtp, media=(string)audio, payload=(int)8,
clock-rate=(int)8000, encoding-name=(string)PCMA, a-ptime=(string)20,
npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:mic/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_src_1_89829216_8.GstProxyPad:proxypad6:
caps = application/x-rtp, media=(string)audio, payload=(int)8,
clock-rate=(int)8000, encoding-name=(string)PCMA, a-ptime=(string)20,
npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstRtpPcmaDepay:rtppcmadepay0.GstPad:src: caps =
audio/x-alaw, channels=(int)1, rate=(int)8000
/GstPipeline:pipeline0/GstRtpPcmaDepay:rtppcmadepay0.GstPad:sink: caps =
application/x-rtp, media=(string)audio, payload=(int)8,
clock-rate=(int)8000, encoding-name=(string)PCMA, a-ptime=(string)20,
npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstAudioParse:audioparse0.GstPad:sink: caps =
audio/x-alaw, channels=(int)1, rate=(int)8000
/GstPipeline:pipeline0/GstAudioParse:audioparse0.GstPad:src: caps =
audio/x-raw-int, rate=(int)44100, channels=(int)2, width=(int)16,
depth=(int)16, signed=(boolean)true, endianness=(int)1234
/GstPipeline:pipeline0/GstAudioResample:audioresample0.GstPad:src: caps =
audio/x-raw-int, rate=(int)44100, channels=(int)2, width=(int)16,
depth=(int)16, signed=(boolean)true, endianness=(int)1234
/GstPipeline:pipeline0/GstAudioResample:audioresample0.GstPad:sink: caps =
audio/x-raw-int, rate=(int)44100, channels=(int)2, width=(int)16,
depth=(int)16, signed=(boolean)true, endianness=(int)1234
/GstPipeline:pipeline0/ffenc_aac:ffenc_aac0.GstPad:src: caps = audio/mpeg,
channels=(int)2, rate=(int)44100, mpegversion=(int)4,
stream-format=(string)raw, codec_data=(buffer)1210
/GstPipeline:pipeline0/ffenc_aac:ffenc_aac0.GstPad:sink: caps =
audio/x-raw-int, rate=(int)44100, channels=(int)2, width=(int)16,
depth=(int)16, signed=(boolean)true, endianness=(int)1234
/GstPipeline:pipeline0/GstRTSPSrc:mic.GstGhostPad:recv_rtp_src_0_89829088_96:
caps = application/x-rtp, media=(string)video, payload=(int)96,
clock-rate=(int)90000, encoding-name=(string)H264,
packetization-mode=(string)1,
sprop-parameter-sets=(string)\"Z0LgFNoFh8Q\\=\\,aM4wpIA\\=\",
npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:mic.GstGhostPad:recv_rtp_src_0_89829088_96.GstProxyPad:proxypad9:
caps = application/x-rtp, media=(string)video, payload=(int)96,
clock-rate=(int)90000, encoding-name=(string)H264,
packetization-mode=(string)1,
sprop-parameter-sets=(string)\"Z0LgFNoFh8Q\\=\\,aM4wpIA\\=\",
npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:mic/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_src_0_89829088_96.GstProxyPad:proxypad8:
caps = application/x-rtp, media=(string)video, payload=(int)96,
clock-rate=(int)90000, encoding-name=(string)H264,
packetization-mode=(string)1,
sprop-parameter-sets=(string)\"Z0LgFNoFh8Q\\=\\,aM4wpIA\\=\",
npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
^A
When I listen to the source it works fine: Here's the Log
+ gst-launch -ev rtspsrc location=rtsp://10.111.1.101/0/trackID=1 '!'
rtppcmadepay '!' autoaudiosink
Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0: latency = 2000
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0: buffer-mode =
slave (1)
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0: timeout =
5000000
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc3: timeout =
5000000
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0: timeout = 0
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc3: timeout = 0
/GstPipeline:pipeline0/GstRtpPcmaDepay:rtppcmadepay0.GstPad:src: caps =
audio/x-alaw, channels=(int)1, rate=(int)8000
/GstPipeline:pipeline0/GstRtpPcmaDepay:rtppcmadepay0.GstPad:sink: caps =
application/x-rtp, media=(string)audio, payload=(int)8,
clock-rate=(int)8000, encoding-name=(string)PCMA, a-ptime=(string)20,
npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0.GstGhostPad:recv_rtp_src_1_89829216_8:
caps = application/x-rtp, media=(string)audio, payload=(int)8,
clock-rate=(int)8000, encoding-name=(string)PCMA, a-ptime=(string)20,
npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0.GstGhostPad:recv_rtp_src_1_89829216_8.GstProxyPad:proxypad8:
caps = application/x-rtp, media=(string)audio, payload=(int)8,
clock-rate=(int)8000, encoding-name=(string)PCMA, a-ptime=(string)20,
npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_src_1_89829216_8.GstProxyPad:proxypad7:
caps = application/x-rtp, media=(string)audio, payload=(int)8,
clock-rate=(int)8000, encoding-name=(string)PCMA, a-ptime=(string)20,
npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstPulseSink:autoaudiosink0-actual-sink-pulse.GstPad:sink:
caps = audio/x-alaw, channels=(int)1, rate=(int)8000
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0.GstGhostPad:sink:
caps = audio/x-alaw, channels=(int)1, rate=(int)8000
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0.GstGhostPad:sink.GstProxyPad:proxypad0:
caps = audio/x-alaw, channels=(int)1, rate=(int)8000
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstPulseSink:autoaudiosink0-actual-sink-pulse:
volume = 1.000000
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstPulseSink:autoaudiosink0-actual-sink-pulse:
mute = FALSE
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_0:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0.GstPad:send_rtcp_src:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSink:udpsink1.GstPad:sink:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_0.GstProxyPad:proxypad3:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0.GstGhostPad:recv_rtp_src_0_89829088_96:
caps = application/x-rtp, media=(string)video, payload=(int)96,
clock-rate=(int)90000, encoding-name=(string)H264,
packetization-mode=(string)1,
sprop-parameter-sets=(string)\"Z0LgFNoFh8Q\\=\\,aM4wpIA\\=\",
npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0.GstGhostPad:recv_rtp_src_0_89829088_96.GstProxyPad:proxypad10:
caps = application/x-rtp, media=(string)video, payload=(int)96,
clock-rate=(int)90000, encoding-name=(string)H264,
packetization-mode=(string)1,
sprop-parameter-sets=(string)\"Z0LgFNoFh8Q\\=\\,aM4wpIA\\=\",
npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_src_0_89829088_96.GstProxyPad:proxypad9:
caps = application/x-rtp, media=(string)video, payload=(int)96,
clock-rate=(int)90000, encoding-name=(string)H264,
packetization-mode=(string)1,
sprop-parameter-sets=(string)\"Z0LgFNoFh8Q\\=\\,aM4wpIA\\=\",
npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_1:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0/GstRtpSession:rtpsession1.GstPad:send_rtcp_src:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSink:udpsink3.GstPad:sink:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_1.GstProxyPad:proxypad6:
caps = application/x-rtcp
^CCaught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
Waiting for EOS...
Got EOS from element "pipeline0".
EOS received - stopping pipeline...
Execution ended after 9881401256 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstPulseSink:autoaudiosink0-actual-sink-pulse.GstPad:sink:
caps = NULL
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0.GstGhostPad:sink:
caps = NULL
/GstPipeline:pipeline0/GstRtpPcmaDepay:rtppcmadepay0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstRtpPcmaDepay:rtppcmadepay0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0.GstGhostPad:recv_rtp_src_0_89829088_96:
caps = NULL
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0.GstGhostPad:recv_rtp_src_1_89829216_8:
caps = NULL
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_src_0_89829088_96:
caps = NULL
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_src_1_89829216_8:
caps = NULL
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_1:
caps = NULL
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_0:
caps = NULL
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0/GstRtpPtDemux:rtpptdemux1.GstPad:src_96:
caps = NULL
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0/GstRtpPtDemux:rtpptdemux0.GstPad:src_8:
caps = NULL
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0/GstRtpSession:rtpsession1.GstPad:send_rtcp_src:
caps = NULL
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0.GstPad:send_rtcp_src:
caps = NULL
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSink:udpsink1.GstPad:sink:
caps = NULL
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSink:udpsink3.GstPad:sink:
caps = NULL
Setting pipeline to NULL ...
Freeing pipeline ...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110907/52601e7f/attachment-0001.htm>
More information about the gstreamer-devel
mailing list