I am doing rtp h264 payloading correctly?
pfarmer
flacone at gmx.de
Tue Feb 14 08:07:52 PST 2012
Hello I wanted to compare some of the codecs provided by GStreamer. Therefore
I need the videos in raw format and with the same amount of frames. Somehow
it appeared that the with some codecs some frames are dropped. In this case
here with the h264 codec. What I am doing wrong? Is it some time-syncing
problem?
I made a short test video with this launch line:
gst-launch videotestsrc horizontal-speed=32 num-buffers=12 !
video/x-raw-yuv, format=\(fourcc\)I420 ! filesink location=testvideo.yuv
With H264 coding and RTP packeting it does not render the last frame.
gst-launch filesrc location=testvideo.yuv ! videoparse format=1 width=320
height=240 framerate=10/1 ! x264enc ! rtph264pay timestamp-offset=0
seqnum-offset=0 ssrc=1 ! rtph264depay ! ffdec_h264 ! video/x-raw-yuv !
filesink location=testvideo_coded.yuv
The resulting file sizes are:
1324800 testvideo_coded.yuv
1382400 testvideo.yuv
(If the number of frames is greater equal 30 the second last frame is not
the rendered correctly.)
Instead with THEORA coding it works fine:
gst-launch filesrc location=testvideo.yuv ! videoparse format=1 width=320
height=240 framerate=10/1 ! theoraenc ! rtptheorapay timestamp-offset=0
seqnum-offset=0 ssrc=1 ! rtptheoradepay ! theoradec ! video/x-raw-yuv !
filesink location=testvideo_coded.yuv
And H264 coding works also fine without RTP packeting:
gst-launch filesrc location=testvideo.yuv ! videoparse format=1 width=320
height=120 framerate=10/1 ! x264enc ! ffdec_h264 ! video/x-raw-yuv !
filesink location=testvideo_coded.yuv
For a quick comparison i made a comparing video:
gst-launch filesrc location=testvideo_coded.yuv ! videoparse format=1
width=320 height=240 framerate=1/1 ! videorate ! videobox border-alpha=0
top=-240 ! videomixer name=mixer ! ffmpegcolorspace ! ffenc_huffyuv !
matroskamux ! filesink location=testvideo_comp.mkv filesrc
location=testvideo.yuv ! videoparse format=1 width=320 height=240
framerate=1/1 ! videorate ! videobox bottom=-240 ! mixer.
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/I-am-doing-rtp-h264-payloading-correctly-tp4387508p4387508.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list