gstreamer raspbian buster rpi4 h264 omx HD video not working

fabrizio.rinalduzzi fabrizio.rinalduzzi at fastwebnet.it
Wed May 27 15:50:44 UTC 2020


Hi,
I wrote a c program on a rpi4, O.S. raspian buster, using gtk, gstreamer
1.14.4 that plays movies chosen from a list.
I'm using the playbin element.

If I play a mpg movie with this specs :
/Topology:
  container: MPEG-1 System Stream
    audio: MPEG-1 Layer 2 (MP2)
    video: MPEG-1 Video
Properties:
  Duration: 0:00:25.280000000
  Seekable: yes
  Live: no
  Tags: 
      audio codec: MPEG-1 Audio
      has crc: false
      channel mode: stereo
      nominal bitrate: 128000
      video codec: MPEG-1 Video/
everything goes smoothly,

If I play a mp4 movie with this specs:
/Topology:
  container: Quicktime
    audio: MPEG-4 AAC
    video: H.264 (High Profile)
Properties:
  Duration: 0:01:00.010000000
  Seekable: yes
  Live: no
  Tags: 
      audio codec: MPEG-4 AAC audio
      maximum bitrate: 140304
      datetime: 2019-03-23T09:27:11Z
      container format: ISO MP4/M4A
      video codec: H.264 / AVC
      bitrate: 5574235/
it plays very badly, a lot of frames are skipped 

The same result comes out if I simply run:
/gst-launch-1.0 -v playbin uri=file:///home/pi/Videos/FullHD.mp4/
So it does not seem related to my code, I guess Hw acceleration is not
working.

Then I tried /gst-launch-1.0 -v playbin3
uri=file:///home/pi/Videos/FullHD.mp4/, it did not play and I got this
message :
*ERROR: from element
/GstPlayBin3:playbin3-0/GstURIDecodeBin3:uridecodebin3-0/GstDecodebin3:decodebin3-0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0:
Could not initialize supporting library.
Additional debug info:
gstvideodecoder.c(2535): gst_video_decoder_change_state ():
/GstPlayBin3:playbin3-0/GstURIDecodeBin3:uridecodebin3-0/GstDecodebin3:decodebin3-0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0:
Failed to open decoder*

The same error is reported if I try to play the mpg file that worked well
with playbin.

It seems that playbin3 tries to access Hw acc, but omx fails to work, even
though it seems to be installed :
/pi at raspberrypi:~ $ gst-inspect-1.0 | grep omx
libav:  avenc_h264_omx: libav OpenMAX IL H.264 video encoder encoder
omx:  omxhdmiaudiosink: OpenMAX HDMI Audio Sink
omx:  omxanalogaudiosink: OpenMAX Analog Audio Sink
omx:  omxh264enc: OpenMAX H.264 Video Encoder
omx:  omxvc1dec: OpenMAX WMV Video Decoder
omx:  omxmjpegdec: OpenMAX MJPEG Video Decoder
omx:  omxvp8dec: OpenMAX VP8 Video Decoder
omx:  omxtheoradec: OpenMAX Theora Video Decoder
omx:  omxh264dec: OpenMAX H.264 Video Decoder
omx:  omxh263dec: OpenMAX H.263 Video Decoder
omx:  omxmpeg4videodec: OpenMAX MPEG4 Video Decoder
omx:  omxmpeg2videodec: OpenMAX MPEG2 Video Decoder/

Am I missing something?

I would like to find a solution that :
- either enables hw acc. for playbin
- or allows playbin3 to use omx components.

I quickly searched topics similar to this but I didn't find, at least
related to the rapsberry pi4.
I apologise in advance if my search was not enough thorough.










--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list