This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tinkerboard hw h264 encoding

I have been trying to use h264 hw encoding on my tinkerboard using the gstreamer.
However, when i am running the below command, the board just hangs. When i am using software encoding(x264enc) everything works fine. 
This is how i build the gstreamer plugin:

Make install
Mpp installed:
linaro@tinkerboard:~/rockchip/gstreamer-rockchip$ gst-inspect-1.0 | grep h264
rockchipmpp:  mpph264enc: Rockchip Mpp H264 Encoder
typefindfunctions: video/x-h264: h264, x264, 264
libav:  avdec_h264: libav H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 decoder
libav:  avenc_h264_omx: libav OpenMAX IL H.264 video encoder encoder
uvch264:  uvch264src: UVC H264 Source
uvch264:  uvch264mjpgdemux: UVC H264 MJPG Demuxer
videoparsersbad:  h264parse: H.264 parser
rtp:  rtph264pay: RTP H264 payloader
rtp:  rtph264depay: RTP H264 depayloader

gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=NV12,width=640,height=480,framerate=30/1 ! queue ! mpph264enc ! queue ! h264parse ! matroskamux ! filesink location='hw_h264_encode.mkv' sync=false
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,width=640,height=480,framerate=15/1 ! videoconvert ! mpph264enc ! h264parse  ! mp4mux ! filesink location='hw_h264_encode.mp4' sync=false

I have taken the gstreamer plugin from here:

I have a few questions: 
1. How can i make the hardware encoding to work?
2. When will the board support HW acceleration on ffmepg?

Below command can be work by build-in gstreamer in the latest TinkerOS release image for your reference.

gst-launch-1.0 v4l2src ! video/x-raw,format=NV12,width=640,height=480,framerate=30/1 ! queue ! mpph264enc ! queue ! h264parse ! mpegtsmux ! filesink location=/home/linaro/2k.ts
The huge file is produced if the "snow" pattern (of videotestsrc plugin) is used.
I suppose mpph264enc is in CQP mode.
How to configure mpph264enc to use CBR and set the target bitrate for it?

Forum Jump:

Users browsing this thread: 1 Guest(s)