[gst-devel] h264 and aac stream recording

Terry Leung terry83 at gmail.com
Tue Nov 11 03:46:14 CET 2008


Hi all,

After I make some change in my pipeline, all the element connect together
However, it still dont work as expected
When I start the send pipeline, error come out from the receive pipeline

Got Message from element "mux" (error): GstMessageError,
gerror=(GstGError)(NULL), debug=(string)"gstffmpegmux.c\(476\):\
gst_ffmpegmux_collected\ \(\):\ /pipeline0/mux:\012Failed\ to\ write\
file\ header\ -\ check\ codec\ settings";
ERROR: from element /pipeline0/mux: Could not configure supporting library.
Additional debug info:
gstffmpegmux.c(476): gst_ffmpegmux_collected (): /pipeline0/mux:
Failed to write file header - check codec settings


What's the problem of that? I have already put those caps for them.

Here is the pipeline I am using now

send pipeline:

gst-launch -m -v filesrc location=/home/video/1.mp4 !  qtdemux name=demuxer \
                             demuxer.!queue! rtpmp4gpay name=audiopay
pt=98 ! udpsink host=172.20.122.9 port=23456 \
                             demuxer.!queue! rtph264pay name=videopay
pt=97 ! udpsink host=172.20.122.9 port=23458

receive pipeline:

gst-launch -m -v  ffmux_mp4 name=mux ! filesink name=filesink
location=/home/video/receive.mp4 \
{ udpsrc name=audioudp port=23456 num-buffers=1000
caps="application/x-rtp, media=(string)audio, clock-rate=(int)22050,
encoding-name=(string)MPEG4-GENERIC, encoding-params=(string)2,
streamtype=(string)5, profile-level-id=(string)2,
mode=(string)AAC-hbr, config=(string)1390, sizelength=(string)13,
indexlength=(string)3, indexdeltalength=(string)3" !
gstrtpjitterbuffer name=audiojitter !  rtpmp4gdepay queue-delay=0
name=audiodepay ! queue name=audioqueue } ! mux.audio_0  \
{ udpsrc name=videoudp port=23458 num-buffers=1000
caps="application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, profile-level-id=(string)42c00d,
sprop-parameter-sets=(string)\"Z0LADZp0Cg/YCIAAAAMAgAAAD0eKFVA\\=\\,aM48gA\\=\\=\""
! gstrtpjitterbuffer name=videojitter ! rtph264depay queue-delay=0
name=videodepay ! queue name=videoqueue } ! mux.video_0;

anyone could help?

Terry


On Mon, Nov 10, 2008 at 4:00 PM, Terry Leung <terry83 at gmail.com> wrote:
> Hi all,
>
> I am trying to make a pipeline to support receiving aac stream and
> h264 stream and then reconstruct them as a mp4 file
>
> The send pipeline I used which i found it no problem on generating rtp stream:
>
> gst-launch -m -v filesrc location=/home/video/1.mp4 !  qtdemux name=demuxer \
>                             demuxer.!queue! rtpmp4gpay name=audiopay
> pt=98 ! udpsink host=172.20.122.9 port=23456 \
>                             demuxer.!queue! rtph264pay name=videopay
> pt=97 ! udpsink host=172.20.122.9 port=23458
>
> The problem is from the receive pipeline
>
> gst-launch -m -v  ffmux_mp4 name=mux ! filesink name=filesink
> location=/home/video/receive.mp4 \
> { udpsrc name=audioudp port=23456 num-buffers=100
> caps="application/x-rtp, media=(string)audio, clock-rate=(int)22050,
> encoding-name=(string)MPEG4-GENERIC, encoding-params=(string)2,
> streamtype=(string)5, profile-level-id=(string)2,
> mode=(string)AAC-hbr, config=(string)1390, sizelength=(string)13,
> indexlength=(string)3, indexdeltalength=(string)3, payload=(int)98" !
> gstrtpjitterbuffer name=audiojitter !  rtpmp4gdepay queue-delay=0
> name=audiodepay ! queue name=audioqueue } ! mux.audio_0 \
> { udpsrc name=videoudp port=23458 num-buffers=100
> caps="application/x-rtp, media=(string)video, clock-rate=(int)90000,
> encoding-name=(string)H264, profile-level-id=(string)42c00d,
> sprop-parameter-sets=(string)\"Z0LADZp0Cg/YCIAAAAMAgAAAD0eKFVA\\=\\,aM48gA\\=\\=\",
> payload=(int)34" ! gstrtpjitterbuffer name=videojitter ! rtph264depay
> queue-delay=0 name=videodepay ! queue name=videoqueue } ! mux.video_0;
>
> When I have the sprop-parameter-sets in the h264 rtp caps, it fails to
> connect gstrtpjitterbuffer and rtph264depay together
> I wonder if it is related to those \" or \\ in the caps line
>
> Then I remove the sprop-parameter-sets in the caps, they connect
> together but I got error when i start to send media stream to the
> ports
> Here is the error
> Got Message from element "mux" (error): GstMessageError,
> gerror=(GstGError)(NULL), debug=(string)"gstffmpegmux.c\(476\):\
> gst_ffmpegmux_collected\ \(\):\ /pipeline0/mux:\012Failed\ to\ write\
> file\ header\ -\ check\ codec\ settings";
> ERROR: from element /pipeline0/mux: Could not configure supporting library.
>
> Any one know how to correct it?
>
> Terry
>




More information about the gstreamer-devel mailing list