dimap
Posts: 6
Joined: Fri Jul 14, 2017 12:23 pm

capacity of h.264 hardware encoder

Fri Jul 14, 2017 12:39 pm

Hello,

Where a can find information about capacity of h.264 hardware encoder ? I'm using Raspberry PI 3 model B.

I try online decode-encode h.264 stream from IP cameras with FullHD resolution (1920x1080) for text timestamp apply.
Decode-encode process using ffmpeg (ffmpeg version N-86293-g781f88b Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.9.2 (Raspbian 4.9.2-10)
configuration: --enable-mmal --enable-omx --enable-omx-rpi --enable-decoder=h264_mmal --enable-encoder=h264_omx --enable-nonfree --enable-libfreetype
)
When I start decode-encode process of second stream I get error:

[h264_omx @ 0x1eb20d0] Using OMX.broadcom.video_encode
[h264_omx @ 0x1eb20d0] OMX error 80001000
[h264_omx @ 0x1eb20d0] err 80001000 (-2147479552) on line 561
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

The error is not sensitive to the settings of the FPS and bitrate

One process FullHD decode-encode working fine.
Using lower resolution (1280x720) for two processes working fine.

---
Dmitry

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5228
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: capacity of h.264 hardware encoder

Fri Jul 14, 2017 2:57 pm

Referencing error 0x80001000 back against the IL headers gives you OMX_ErrorInsufficientResources.
What have you set gpu_mem to in /boot/config.txt? 64MB is unlikely to be enough. 128MB should be sufficient.

To answer the question on spec, the codec block (common for both encode and decode) is specified for level 4.1 for encode or decode. It'll manage to decode some level 5.0 streams as long as the resolution isn't greater than 1920x1080, and likewise you can push the encode performance towards level 4.2 (1080P60) if you overclock things.
Doing both encode and decode simultaneously you'll have to scale back your expectations.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5228
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: capacity of h.264 hardware encoder

Fri Jul 14, 2017 3:00 pm

And having found the FFMPEG source code, failing an AllocateBuffer with OMX_ErrorInsufficientResources is almost certainly gpu_mem.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

dimap
Posts: 6
Joined: Fri Jul 14, 2017 12:23 pm

Re: capacity of h.264 hardware encoder

Sun Jul 16, 2017 3:43 pm

Thank you for you support !

Return to “Graphics, sound and multimedia”

Who is online

Users browsing this forum: No registered users and 5 guests