kazuko.nakamura
Posts: 27
Joined: Sun May 29, 2016 7:14 am

ffmpeg can't decode with h264_mmal codec

Sat Oct 07, 2017 8:51 pm

Hi,

I'm trying to use ffmpeg for testing with encoding. I've compiled ffmpeg with this configuration:

Code: Select all

--enable-gpl --enable-nonfree --enable-mmal --enable-omx --enable-omx-rpi --enable-decoder=h264_mmal --enable-decoder=mpeg2_mmal --enable-encoder=h264_omx --enable-encoder=h264_omx
ffmpeg -decoders | grep h264 shows:

Code: Select all

ffmpeg version git-2017-10-07-123f6dc Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.9.2 (Raspbian 4.9.2-10)
  configuration: --enable-gpl --enable-nonfree --enable-mmal --enable-omx --enable-omx-rpi --enable-decoder=h264_mmal --enable-decoder=mpeg2_mmal --enable-encoder=h264_omx --enable-encoder=h264_omx
  libavutil      55. 77.101 / 55. 77.101
  libavcodec     57.106.104 / 57.106.104
  libavformat    57. 82.102 / 57. 82.102
  libavdevice    57.  9.101 / 57.  9.101
  libavfilter     6.106.101 /  6.106.101
  libswscale      4.  7.103 /  4.  7.103
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
 VFS..D h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
 V..... h264_mmal            h264 (mmal) (codec h264)
 V....D h264_vdpau           H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration) (codec h264)
Looks that h264 decoder is installed. But when I try to use ffmpeg with this command

Code: Select all

ffmpeg -vcodec h264_mmal -i video.ts -c:v h264_omx -c:a copy -b:v 1500k example.mp4
ffmpeg stops with:

Code: Select all

h264_mmal @ 0x2efad90] Did not get output frame from MMAL.
Error while decoding stream #0:0: Unknown error occurred
[h264_mmal @ 0x2efad90] Did not get output frame from MMAL.
Error while decoding stream #0:0: Unknown error occurred
[h264_omx @ 0x2c5df90] Using OMX.broadcom.video_encode
[h264_omx @ 0x2c5df90] OMX error 80001000
[h264_omx @ 0x2c5df90] err 80001018 (-2147479528) 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
Conversion failed!
Is possible to fix this?

kazuko.nakamura
Posts: 27
Joined: Sun May 29, 2016 7:14 am

Re: ffmpeg can't decode with h264_mmal codec

Sat Oct 07, 2017 11:44 pm

Ok, looks that is working

I've installed ffmpeg again, but this time that:

Code: Select all

sudo git clone https://github.com/FFmpeg/FFmpeg.git
cd FFmpeg/
sudo ./configure --arch=armel --target-os=linux --enable-gpl --enable-mmal --enable-omx --enable-omx-rpi --enable-nonfree
sudo make -j4
sudo make install
Before I was use this commands and looks that was not right:

Code: Select all

git clone https://github.com/ffmpeg/FFMpeg --depth 1
cd FFMpeg
./configure --enable-gpl --enable-nonfree --enable-mmal --enable-omx --enable-omx-rpi
make -j4 
sudo make install

Return to “Graphics programming”

Who is online

Users browsing this forum: No registered users and 2 guests