[Libav-user] How to use rkmpp decoder?

Mark Thompson sw at jkqxz.net
Sat Apr 14 02:08:26 EEST 2018


On 13/04/18 07:08, Anton Prikazchikov wrote:
>> So what is the issue? It seems to be working?
> 
> Technically it works, but not completely...
> 
> I try do decode 50 packets(i think that each contains 1 frame) and I can't receive no one decoded frame.
> 
> I looked the code of rkmppdec.c. The decoder must print to log " Received a frame. " but it doesn't do this.
> 
> If I'm changing the codec from "h264_rkmpp" to "h264" with the same code i receive all 50 decoded frames.
> 
> I ran examples from mpp with the same video file and decoding works normally, but in ffmpeg it doesn't work.

Works for me on RK3288 with the same MPP version as you have:

$ ./ffmpeg_g -v 55 -c:v h264_rkmpp -i ~/test/bbb_1080_264.mp4 -an -frames:v 100 -f null -
ffmpeg version N-90683-g37d46dc21d Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --enable-debug --enable-opencl --enable-libdrm --enable-rkmpp --enable-gpl --enable-version3 --enable-libx264 --extra-ldflags='-L/usr/local/lib -lmali-midgard-r13p0-fbdev'
...
[h264_rkmpp @ 0x80b91830] Initializing RKMPP decoder.
mpi: mpp version: 5849089 author: Herman Chen [mpp]: Add temporally patch for blocking issue
hal_h264d_api: hal_h264d_init mpp_buffer_group_get_internal used ion In
mpp_rt: NOT found ion allocator
mpp_rt: found drm allocator
[h264_rkmpp @ 0x80b91830] RKMPP decoder initialized successfully.
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_rkmpp) -> wrapped_avframe (native))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264_rkmpp @ 0x80b91830] Wrote 43 bytes to decoder
[h264_rkmpp @ 0x80b91830] Wrote 1162 bytes to decoder
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264_rkmpp @ 0x80b91830] Wrote 69 bytes to decoder
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264_rkmpp @ 0x80b91830] Wrote 11423 bytes to decoder
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264_rkmpp @ 0x80b91830] Wrote 8407 bytes to decoder
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264_rkmpp @ 0x80b91830] Wrote 18558 bytes to decoder
[h264_rkmpp @ 0x80b91830] Decoder noticed an info change (1920x1080), format=0
[h264_rkmpp @ 0x80b91830] Received a frame.
...
[h264_rkmpp @ 0x80b91830] Wrote 881 bytes to decoder
[h264_rkmpp @ 0x80b91830] Received a frame.
[h264_rkmpp @ 0x80b91830] Wrote 165 bytes to decoder
[h264_rkmpp @ 0x80b91830] Received a frame.
[h264_rkmpp @ 0x80b91830] Wrote 251 bytes to decoder
[h264_rkmpp @ 0x80b91830] Received a frame.
[h264_rkmpp @ 0x80b91830] Wrote 194 bytes to decoder
[h264_rkmpp @ 0x80b91830] Received a frame.
[h264_rkmpp @ 0x80b91830] Wrote 170 bytes to decoder
[h264_rkmpp @ 0x80b91830] Wrote 6744 bytes to decoder
[h264_rkmpp @ 0x80b91830] Wrote 1603 bytes to decoder
[h264_rkmpp @ 0x80b91830] Received a frame.
[h264_rkmpp @ 0x80b91830] Wrote 725 bytes to decoder

etc.

Can you give more detail about your setup and the input stream?

- Mark


More information about the Libav-user mailing list