[gst-devel] record h264 rtp to a mp4 file

Terry Leung terry83 at gmail.com
Mon May 11 11:05:41 CEST 2009


Hi all,

I just checked the source code of rtph264depay
I found the following comment

/* FIXME, non-bytestream handling is freaking out ffmpeg. Apparently we need to
 * group all NAL units belonging to one frame together */

I also found that there is no mechanism to group NAL unit of a frame
together (just like what it describe in the comment)
Is this the reason for my pipeline not working correctly?
Also anyone know how to group the NAL unit of the same frame together?

I have also written something like a h264depay, I use the rtp
timestamp to know if it is the same frame
However, I dont see any timestamp related stuff in the rtph264depay
source code. Anyone know how to do that in gstreamer?

Terry

On Mon, May 11, 2009 at 4:06 PM, Terry Leung <terry83 at gmail.com> wrote:
> Hi all,
>
> I create a pipeline to record the h264 rtp stream into a mp4 file like below:
>
> gst-launch -m -v ffmux_mp4 name=mux ! filesink location = /home/video/test.mp4 \
> { udpsrc name=videoudp num-buffers=1000 port=23456
> 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)96" !  rtph264depay ! video/x-h264,width=352,height=240 !
> ffdec_h264 ! videorate ! x264enc } ! mux.
>
>
> The pipeline work nicely without error, but the file is not good
> It can be played, but nothing can be seen(the recorded file is attached)
>
> Anyone know what's missed in the pipeline??
>
> version: gstreamer-0.10.22 (other plugin are the source package
> downloaded in the website)
>
> Regards,
> Terry
>




More information about the gstreamer-devel mailing list