A question about h264 encoder
张若
zr92zr at gmail.com
Thu Oct 13 12:09:44 UTC 2016
I found the solution myself. But still not understand the reason thoroughly.
The problem is with the videorate, it needs to be set with drop-only=true,
especially for the board. Otherwise, it seems to duplicate several frames
and cause a large delay as well.
But I still don't why does this happen? and why there is no problem while
using imxvpuenc_h264?
Hope somebody could explain that!
Thanks!
2016-10-13 11:32 GMT+02:00 张若 <zr92zr at gmail.com>:
> 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/9c3dc321/attachment.html>
More information about the gstreamer-devel
mailing list