Missing H.264 decoder but it isn't?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Missing H.264 decoder but it isn't?

Adams, Bruce (KMLWG)
The decodebin element seems to be claiming the I don't have a H264 decoder available (see below).
But gst-inspect-1.0 avdec_h264 says it is.
What might be going on here?

Could it be something similar to this old issue?
 http://gstreamer-devel.966125.n4.nabble.com/Missing-element-H-264-decoder-sometimes-for-Raspberry-Pi-td4662003.html

or is my installation genuinely broken somehow?
This is on Debian 9 with good, bad and ugly plugins installed.

GST_DEBUG=3 gst-launch-1.0 -v filesrc location=multi.ts ! tsparse ! tsdemux program_number=17540 ! decodebin caps=audio/x-raw ! audioconvert ! audioresample ! audio/x-raw, rate=8000, channels=1 ! wavenc ! filesink location=cbbc.wav  2>&1 | tee err
Setting pipeline to PAUSED ...
0:00:00.087246734 18349 0x557f3e5cb990 WARN                 basesrc gstbasesrc.c:3491:gst_base_src_start_complete:<filesrc0> pad not activated yet
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/MpegTSParse2:mpegtsparse2-0.GstPad:src: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/GstTSDemux:tsdemux0.GstPad:sink: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
0:00:00.094903539 18349 0x557f3e597680 FIXME             mpegtsbase mpegtsbase.c:416:mpegts_base_add_program: Refcounting. Setting twice a PID (0x0010) as known PSI
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal, parsed=(boolean)true
0:00:00.127770575 18349 0x557f3e597680 ERROR                 bcmdec gstbcmdec.c:875:gst_bcm_dec_change_state:<bcmdec0> dev open failed -1
0:00:00.129039704 18349 0x557f3e597680 ERROR                 bcmdec gstbcmdec.c:876:gst_bcm_dec_change_state:<bcmdec0> dev open failed...ret GST_STATE_CHANGE_FAILURE
0:00:00.129498419 18349 0x557f3e597680 WARN               decodebin gstdecodebin2.c:2306:connect_pad:<decodebin0> Couldn't set bcmdec0 to READY
0:00:00.130062166 18349 0x557f3e597680 ERROR                 bcmdec gstbcmdec.c:2374:bcmdec_del_shmem:<bcmdec0> bcmdec_del_shmem:deleted shmem segment ...
DtsGetHWFeatures: Create File Failed
DtsGetHWFeatures: Create File Failed
Running DIL (3.22.0) Version
DtsDeviceOpen: Opening HW in mode 0
DtsDeviceOpen: Create File Failed
Missing element: H.264 decoder
0:00:00.131375083 18349 0x557f3e597680 WARN               decodebin gstdecodebin2.c:4592:gst_decode_bin_expose:<decodebin0> error: no suitable plugins found:
Couldn't set bcmdec0 to READY

ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0: Your GStreamer installation is missing a plug-in.
Additional debug info:
gstdecodebin2.c(4592): gst_decode_bin_expose (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0:
no suitable plugins found:
Couldn't set bcmdec0 to READY

ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

-----Original Message-----
From: gstreamer-devel [mailto:[hidden email]] On Behalf Of Adams, Bruce (KMLWG)
Sent: 23 May 2018 14:37
To: Discussion of the development of and with GStreamer
Subject: RE: correct way to decode AAC?

The decodebin element is perhaps a bit of overkill here.
Consider this pipeline:

gst-launch-1.0 -v filesrc location=multi.ts ! tsparse ! tsdemux program_number=17540 ! decodebin ! audioconvert ! audioresample ! audio/x-raw, rate=8000, channels=1 ! wavenc ! filesink location=cbbc.wav

I get the error:

Missing element: H.264 decoder
ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0: Your GStreamer installation is missing a plug-in.
Additional debug info:
gstdecodebin2.c(4592): gst_decode_bin_expose (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0:

There are patent issues with H264 but yes it would be nice to fix my install.

My point though is that I don't care about the video in this pipeline.
I really just want an "OR" element

Try decoding using A or B
E.g.

Src = audio/mpeg
Sink = audio/x-raw

If src=AAC use avdec_aac
If src=MPEG use faad

Of course the decodebin element gives us that and more
but is there a standard way of doing this or a case for something leaner?

Regards,

Bruce.

-----Original Message-----
From: gstreamer-devel [mailto:[hidden email]] On Behalf Of Adams, Bruce (KMLWG)
Sent: 23 May 2018 12:57
To: Discussion of the development of and with GStreamer
Subject: RE: correct way to decode AAC?

What is the purpose of the queue in that pipeline?

-----Original Message-----
From: gstreamer-devel [mailto:[hidden email]] On Behalf Of new baby
Sent: 23 May 2018 12:54
To: [hidden email]
Subject: RE: correct way to decode AAC?

Found the BEST way Directly convert .ts to .wav file like this ...
Hope it solves all your worries



*gst-launch-1.0 filesrc location=Transformers1080p.ts ! queue ! decodebin  !
audioconvert ! wavenc ! filesink location=file.wav *





-----
adi
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


Kantar Disclaimer<http://www.kantar.com/disclaimer.html>
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Missing H.264 decoder but it isn't?

Gst-Geek
Hi Adams,

decodebin is picking hardware decoder "bcmdec" to decode h264 stream. bcmdec
Plugin is not able to open the device and pipeline closed with error.

To use avdec_h264 you have have 2 options.
1. Remove "bcmdec" plugin
2. Change avdec_h264 rank so that decodebin autoplug picks avdec_h264 over
bcmdec. Check plugin writer guides to check how alter the plugins rank.

Check if this is usefull for you.
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPluginFeature.html

Here bcmdec is Broadcom hardware decoder. This is not there in mainstream
Gstreamer plugin.
https://github.com/agx/gst-plugins-bad/blob/master/ext/bcmdec/gstbcmdec.c




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

RE: Missing H.264 decoder but it isn't?

Adams, Bruce (KMLWG)
Hi,
     Thanks. That definitely moves things along. It seems I had bmcdec installed because I installed crystalhd.

show install:
 gst-inspect-1.0 bcmdec                            

show what to uninstall (Debian):

 dpkg --search /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstbcmdec.so - And

uninstall it:
 sudo apt-get remove gstreamer1.0-crystalhd

Presumably I could have blacklisted it instead but I don't know how.
It also looks like increasing the rank would be straightforward in code.

I had a follow up problem, decodebin and tsdemux seemed intent on supplying video when I want audio. The solution was a caps filter or two. A working pipeline for me is:

GST_DEBUG=0 gst-launch-1.0 -v filesrc location=multi.ts ! tsparse ! tsdemux program_number=17540 ! audio/mpeg ! decodebin ! audio/x-raw ! audioresample ! audioconvert ! audio/x-raw, rate=8000, channels=1 ! wavenc ! filesink location=cbbc.wav

Thanks for the advice.

Regards,

Bruce.


-----Original Message-----
From: gstreamer-devel [mailto:[hidden email]] On Behalf Of Vinod Kesti
Sent: 24 May 2018 06:13
To: [hidden email]
Subject: Re: Missing H.264 decoder but it isn't?

Hi Adams,

decodebin is picking hardware decoder "bcmdec" to decode h264 stream. bcmdec
Plugin is not able to open the device and pipeline closed with error.

To use avdec_h264 you have have 2 options.
1. Remove "bcmdec" plugin
2. Change avdec_h264 rank so that decodebin autoplug picks avdec_h264 over
bcmdec. Check plugin writer guides to check how alter the plugins rank.

Check if this is usefull for you.
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPluginFeature.html

Here bcmdec is Broadcom hardware decoder. This is not there in mainstream
Gstreamer plugin.
https://github.com/agx/gst-plugins-bad/blob/master/ext/bcmdec/gstbcmdec.c




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel