Firefly Open Source Community

   Login   |   Register   |
New_Topic
12
New Topic
Print Previous Topic Next Topic

Using Gstreamer to decode 4K video to 1080p

66

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
66
Posted at 8/17/2017 18:58:49        Only Author  11#
Thank you,

this is what I am using. But then mppvideodec and mpph264enc are not enabled.
Reply

Use props Report

176

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
176
Posted at 1/16/2018 14:15:26        Only Author  12#
Have there been any more developments on this?  I've been hoping for hardware encoding on the RK3399 since the Kickstarter.
Reply

Use props Report

176

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
176
Posted at 1/19/2018 06:59:50        Only Author  13#
It took a while, but I managed to compile mpp & gstreamer-rockchip on a fresh version of gstreamer.  The trick on ubuntu was to track down all of the dependencies for gstreamer1.0 and its plugins, install those separately, then do everything from git source.  However, I'm completely new to gstreamer, which seems far more complex than ffmpeg.  Does anyone know how to use streamer for say transcoding to h.264 from an mpeg-2 transport stream?  I'd appreciate any pointers.
  -Karl
Reply

Use props Report

176

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
176
Posted at 1/21/2018 09:21:21        Only Author  14#
I managed to construct a gst-launch-1.0 pipeline to test the mpph264enc plugin to gstreamer, but unfortunately hit a wall.  Perhaps something is wrong in the kernel?  Any suggestions?

xxxxxxxx@firefly:/mnt/dvr/tmp$ gst-launch-1.0 videotestsrc ! mpph264enc ! h264parse ! mp4mux ! filesink location=test.mp4 -e
Setting pipeline to PAUSED ...
mpi: mpp version: 1a795b0 author: Herman Chen [mpp_dec]: Fix mpp_frame memory leak on reset
hal_h264e_api: vcodec type 00000000 can not find H.264 encoder device
mpp_hal: mpp_hal_init hal h264e_rkvenc init failed ret -1
mpp_hal: mpp_hal_init could not found coding type 7
mpp_enc: mpp_enc_init could not init hal
mpp_rt: NOT found ion allocator
mpp_rt: found drm allocator
mpp: error found on mpp initialization
Pipeline is PREROLLING ...
mpp: Assertion mEnc failed at control_enc:756
mpp_enc: mpp_enc_control found NULL input enc (nil) cmd 320005 param -1706913328
mpp: command 320005 param 0x7f9a4291d0 ret -3
mpp: Assertion mEnc failed at control_enc:756
mpp_enc: mpp_enc_control found NULL input enc (nil) cmd 320005 param -1706913264
mpp: command 320005 param 0x7f9a429210 ret -3
mpp: Assertion mEnc failed at control_enc:756
mpp_enc: mpp_enc_control found NULL input enc (nil) cmd 320005 param -1706913184
mpp: command 320005 param 0x7f9a429260 ret -3
mpp: Assertion mEnc failed at control_enc:756
mpp_enc: mpp_enc_control found NULL input enc (nil) cmd 320005 param -1706913344
mpp: command 320005 param 0x7f9a4291c0 ret -3
mpp: Assertion mEnc failed at control_enc:756
mpp_enc: mpp_enc_control found NULL input enc (nil) cmd 320005 param -1706913184
mpp: command 320005 param 0x7f9a429260 ret -3
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
mpp: Assertion mEnc failed at control_enc:756
mpp_enc: mpp_enc_control found NULL input enc (nil) cmd 320005 param -1706913408
mpp: command 320005 param 0x7f9a429180 ret -3
mpp: Assertion mEnc failed at control_enc:756
mpp_enc: mpp_enc_control found NULL input enc (nil) cmd 320005 param -1706913408
mpp: command 320005 param 0x7f9a429180 ret -3
Freeing pipeline ...
Reply

Use props Report

176

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
176
Posted at 2/2/2018 00:16:34        Only Author  15#
This seems to be the critical line:

  1. hal_h264e_api: vcodec type 00000000 can not find H.264 encoder device
Copy the code


Are there any kernel requirements?  This is what I'm running:

  1. mitchekl@firefly:~$ cat /proc/version
  2. Linux version 4.4.16 (firefly@tchip-server) (gcc version 4.9.x-google 20140827 (prerelease) (GCC) ) #20 SMP PREEMPT Sat Mar 18 15:19:16 CST 2017
Copy the code


Thanks!
Reply

Use props Report

Return to List
12
You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list