A question about h264 encoder

张若 zr92zr at gmail.com
Thu Oct 13 09:32:59 UTC 2016


Hi,

I am working on the imx6 board. There are two h264/x264 encoder, HW encoder
named imxvpuenc_h264 and SW encoder named x264enc. I tried both of them.
But problem appears.

The pipeline looks like this: (the video camera capture is 720p)

imxv4l2videosrc -> capsfilter1 -> videoscale -> videorate -> videoconvert
-> capsfilter2 -> imxvpuenc_h264 (or x264enc) -> queue -> h264parse ->
mpegtsmux -> rtpmp2tpay -> udpsink

While using imxvpuenc_h264, there is no large latency, but using x264enc
will cause a really large latency (sometimes around 10s and frame stucks).

When I set "capsfilter2" to lower resolution such as 320x240, the latency
comes much shorter for x264enc. On the other hand, if I remove the
"videoscale -> videorate -> videoconvert" part while using x264enc, there
almost no latency for the streaming.

For x264enc, I set "tune=zerolatency, key-int-max=32, bframes=0,
speed-preset=1, bitrate=4000 (may changes from 1000 to 10000)".

I don't know the reason why it happens and how can I deal with that. Please
help!

Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161013/9890a6e7/attachment.html>


More information about the gstreamer-devel mailing list