FFMPEG tries to use H264_MMAL Codec

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
kwambs
Posts: 3
Joined: Tue Jan 07, 2020 10:44 pm

FFMPEG tries to use H264_MMAL Codec

Post by kwambs »

Hi,

I have research this for days and have not been able to resolve it.

My previous system was ZoneMinder 1.29 built from source.
It worked well, until ZM Ninja decided to pgrade and would no longer work plus I needed to update from SUSE Leap 13.2 to Leap 15.1.
This time I decided to use SUSE Leap 15.1 repository for ZoneMinder 1.32.3.

uname -a
Linux wambs-server 4.12.14-lp151.28.36-default #1 SMP Fri Dec 6 13:50:27 UTC 2019 (8f4a495) x86_64 x86_64 x86_64 GNU/Linux.

I can use FFMPEG from the command line to stream to a series of jpegs and it seems to work fine.
ffmpeg -rtsp_transport tcp -i rtsp://admin:mypasswd@192.168.0.180:824/Streaming/Channels/1 video%.jpg

However, when I select FFMPEG as the Source type in ZoneMinder, I get an error that the H264_MMAL Codec could not be found.

In the FFMPEG list of Codecs, MMAL of course is not listed, because MMAL is for Raspberry Pi. I don't have a Raspberry Pi.
I have a Asus x86_64 base system.
Some ZoneMinder settings are:
- PATH_FFMPEG: /usr/bin/ffmpeg
- FFMPEG_INPUT_OPTIONS: -rtsp_transport tcp -c h264 , also tried -rtsp_transport tcp
- FFMPEG_OUTPUT_OPTIONS is empty

If I set the source type to Libvlc, it sorta works, but the colors are all wrong, blue is red, red is blue for example.

So, does anyone know why ZoneMinder is instructing FFMPEG is use this H264_MMAL Codec?
I'm out of ideas.

Thanks,
Kevin
User avatar
iconnor
Posts: 3128
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: FFMPEG tries to use H264_MMAL Codec

Post by iconnor »

That message should just be a warning, the capture should still work.

In fact, upon looking at the code, it is a debug level log statement....
kwambs
Posts: 3
Joined: Tue Jan 07, 2020 10:44 pm

Re: FFMPEG tries to use H264_MMAL Codec

Post by kwambs »

Hi,

I was able to fix my Ffmpeg issue. I had tried two version 3.4 and 4.2, neither work in Zoneminder.

So, I remove both and as much of the supporting libs as I could, without removing zoneminder itself.
I reinstalled ffmpeg 3.4, and during installation there was a vendor change request to PackMan for supporting files.
So, I set all packages to come from Packman, and ffmpeg now works.

So, the lesson learn make sure you get ffmpeg and as much of the supporting libs from the same repository/source.
I think I had incompatible libs with ffmpeg.

You check the libs a executable uses by using the ldd command. For example, ldd ffmpeg will display the libs it uses.

Kevin
kwambs
Posts: 3
Joined: Tue Jan 07, 2020 10:44 pm

Re: FFMPEG tries to use H264_MMAL Codec - Solved

Post by kwambs »

Solved
JasinSwift
Posts: 3
Joined: Mon Oct 07, 2019 12:33 pm

Re: FFMPEG tries to use H264_MMAL Codec

Post by JasinSwift »

"I need a jpeg encoder. I know about the pic jpg decoder, but I need an encoder. Is this doable? has this been done? is there a codebase? Should I use special services as Fastvideo company provides?
IntellectualFool
Posts: 2
Joined: Wed Jul 24, 2024 11:37 am

Re: FFMPEG tries to use H264_MMAL Codec

Post by IntellectualFool »

Thank you for sharing your experience on the ZoneMinder forum, your post helped me to fix my problem in ZoneMinder 1.36.

After an upgrade to ffmpeg version 6, ZoneMinder could not decode the stream from my Amcrest camera even though I had passthrough enabled, the camera refused to connect, and I was unable to capture the video stream. After turning on debug logging, I also observed the unrelated h264_mmal debug message and that led me to your post in which you resolved your issue by reinstalling ffmpeg. I had upgraded to ffmpeg 6 from packman during a system upgrade, and that version usually worked with ffplay from the command line to view my camera's rtsp stream, only rarely failing, but it always failed to decode under ZoneMinder.

After reading your post, I tried ffmpeg 7, but that did not work either, demonstrating the same symptoms as version 6. I reverted back to ffmpeg 4 given ffmpeg 5 was not listed in my package manager (packman repo for openSUSE leap 15.5), and that fixed the ZoneMinder issue. I suspect ffmpeg was not properly determining the decoder for the camera's rtsp stream, and ZoneMinder may have then tried to connect via ONVIF but I did not have ONVIF username/password configured in ZoneMinder, so the connection was refused by the camera. Downgrading to ffmpeg 4 fixed the decoder problem, and stream capture starting working again.

I put about a day into isolating the problem, trying many different things given ffplay worked and I consequently failed to recognize that ffmpeg was the problem. Your post was instrumental in coaxing me to twiddle with ffmpeg versions, and that was all I needed to resolve my issue.
Post Reply