nadavrub
Posts: 16
Joined: Mon Dec 07, 2015 4:27 am

omxmpeg2videodec returns "decoder not initialized"

Thu Feb 11, 2016 8:17 am

Environment
  • RPi2 B+
  • gstreamer 1.7.1
  • C++
Use-case
  • play mpeg2 video coming in from a multicast source using HW accelleration
Implementation
Play using gstreamer:
gst-launch-1.0 udpsrc uri=udp://225.1.1.1:1111 ! tsdemux program-number=8512 ! queue ! mpegvideoparse ! omxmpeg2videodec ! autovideosink
Result
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Got context from element 'autovideosink0-actual-sink-glimage': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayEGL\)\ gldisplayegl0";
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstOMXMPEG2VideoDec-omxmpeg2videodec:omxmpeg2videodec-omxmpeg2videodec0: GStreamer error: negotiation problem.
Additional debug info:
gstvideodecoder.c(2186): gst_video_decoder_chain (): /GstPipeline:pipeline0/GstOMXMPEG2VideoDec-omxmpeg2videodec:omxmpeg2videodec-omxmpeg2videodec0:
decoder not initialized
Execution ended after 0:00:00.588949010
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
Detailed result:
...
0:02:18.301945364 [333m 362[00m 0x4d49b0 [36mINFO [00m [00m baseparse gstbaseparse.c:4718:gst_base_parse_set_upstream_tags:<pes_parse>[00m upstream tags: taglist, video-codec=(string)"MPEG-2\ Video";
0:02:18.304161823 [333m 362[00m 0x4d49b0 [36mINFO [00m [00m baseparse gstbaseparse.c:3945:gst_base_parse_set_latency:<pes_parse>[00m min/max latency 0:00:00.040000000, 0:00:00.040000000
0:02:18.304779948 [333m 362[00m 0x4d49b0 [36mINFO [00m [00;01;34m GST_EVENT gstevent.c:679:gst_event_new_caps:[00m creating caps event video/mpeg, mpegversion=(int)2, systemstream=(boolean)false, parsed=(boolean)true, width=(int)720, height=(int)576, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)64/45, codec_data=(buffer)000001b32d024033186a226910111112121213131313141414141415151515151516161616161616171717171717171718181819181818191a1a1a1a191b1b1b1b1b1c1c1c1c1e1e1e1f1f21000001b5148200010000000001b24454473141f8, profile=(string)main, level=(string)main, interlace-mode=(string)mixed
0:02:18.310172968 [333m 362[00m 0x4d4920 [36mINFO [00m [00m omx gstomx.c:1928:gst_omx_port_set_enabled_unlocked:<video_dec>[00m Setting video_decode port 131 to disabled
0:02:18.311903541 [333m 362[00m 0x4d4920 [36mINFO [00m [00m omx gstomx.c:1974:gst_omx_port_set_enabled_unlocked:<video_dec>[00m Set video_decode port 131 to disabled: None (0x00000000)
0:02:18.312397916 [333m 362[00m 0x4d4920 [36mINFO [00m [00m omx gstomx.c:2215:gst_omx_port_wait_enabled_unlocked:<video_dec>[00m Waiting for video_decode port 131 to be disabled
0:02:18.313226510 [333m 362[00m 0x4d4920 [36mINFO [00m [00m omx gstomx.c:2290:gst_omx_port_wait_enabled_unlocked:<video_dec>[00m video_decode port 131 is disabled: None (0x00000000)
0:02:18.313455104 [333m 362[00m 0x4d4920 [36mINFO [00m [00m omx gstomx.c:788:gst_omx_component_set_state:<video_dec>[00m Setting video_decode state from Loaded to Idle
0:02:18.313886406 [333m 362[00m 0x6ae97ec0 [31;01mERROR [00m [00;34m omxcallbacks gstomx.c:505:EventHandler:<video_dec>[00m video_decode got error: Unsupported setting (0x80001019)
0:02:18.314599843 [333m 362[00m 0x4d4920 [31;01mERROR [00m [00m omx gstomx.c:276:gst_omx_component_handle_messages:<video_dec>[00m video_decode got error: Unsupported setting (0x80001019)
0:02:18.314830989 [333m 362[00m 0x4d4920 [31;01mERROR [00m [00m omx gstomx.c:1674:gst_omx_port_allocate_buffers_unlocked:<video_dec>[00m Component video_decode in error state: Unsupported setting (0x80001019)
0:02:18.315392968 [333m 362[00m 0x4d4920 [36mINFO [00m [00m omx gstomx.c:1752:gst_omx_port_allocate_buffers_unlocked:<video_dec>[00m Allocated buffers for video_decode port 130: Unsupported setting (0x80001019)
0:02:18.315624010 [333m 362[00m 0x4d4920 [33;01mWARN [00m [00m videodecoder gstvideodecoder.c:820:gst_video_decoder_setcaps:<video_dec>[00m Subclass refused caps
0:02:18.315793541 [333m 362[00m 0x4d4920 [33;01mWARN [00m [00m videodecoder gstvideodecoder.c:2186:gst_video_decoder_chain:<video_dec>[00m error: decoder not initialized
0:02:18.316100416 [333m 362[00m 0x4d4920 [36mINFO [00m [00;01;31;47m GST_ERROR_SYSTEM gstelement.c:1857:gst_element_message_full:<video_dec>[00m posting message: GStreamer error: negotiation problem.
78>> Bus Event, src:video_dec, type:GST_MESSAGE_ERROR Error: GStreamer error: negotiation problem.
Problem at hand
Reading the above, it seems like the "omxmpeg2videodec" element doesn't like the incoming Caps, having that said:
  • Is there any way to make the above gst pipeline work?
  • Is the omxmpeg2videodec source-code open? can I compile it and then have this debugged through? what is the open-source URL?

dickon
Posts: 233
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: omxmpeg2videodec returns "decoder not initialized"

Thu Feb 11, 2016 8:49 am

Obvious question: you have bought an MPEG 2 codec licence and installed it correctly, haven't you?

nadavrub
Posts: 16
Joined: Mon Dec 07, 2015 4:27 am

Re: omxmpeg2videodec returns "decoder not initialized"

Thu Feb 11, 2016 9:01 am

I have bought a License, though I am not sure how to apply it on my device.. ( If needed at all... )

Does a lic needed to be registered on the device for omxmpeg2videodec to work ???
Last edited by nadavrub on Thu Feb 11, 2016 9:18 am, edited 1 time in total.

dickon
Posts: 233
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: omxmpeg2videodec returns "decoder not initialized"

Thu Feb 11, 2016 9:17 am

There's your problem, then. No licence => no MPEG 2 hardware decode. Buy one at http://www.raspberrypi.com/mpeg-2-license-key/ for the princely sum of £2.40.

nadavrub
Posts: 16
Joined: Mon Dec 07, 2015 4:27 am

Re: omxmpeg2videodec returns "decoder not initialized"

Thu Feb 11, 2016 9:19 am

Just did, let's see...

Return to “OpenMAX”