Opus audio encode & decode with gstreamer

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Opus audio encode & decode with gstreamer

Jump to solution
2,955 Views
r_trivedi123
Contributor IV

Hi

I am using gstreramer1.0 with imx8 evk board with yocto build system.  

I had build a image with gstreamer plugin for that and  able to use it with video H264 & audio.

Now, i would like to use Opus encoder and decoder with gstreamer but some how this components are not available in image. 

Other Opus components like rtpopuspay , rtpopusdepay are available in image, I have checked it with gst-inspect component. 

I try some work around but not able to get it in image.

Can I get any help in this. any help will be helpfull.

Regards,

 

 

  

 

Tags (1)
0 Kudos
1 Solution
2,874 Views
r_trivedi123
Contributor IV

I am able to resolve the issue. Thanks for the support.

View solution in original post

0 Kudos
9 Replies
1,639 Views
Anton_K
Contributor III

Hello!
Can someone update information for me does IMX8 on Yocto supports opus audio codec on latest build?

1,640 Views
Anton_K
Contributor III

Hello!
Can someone update information for me does IMX8 on yocto supports opus audio codec on latest build?

0 Kudos
1,533 Views
himanshu_bhavani
Contributor I

Hi @Anton_K ,

I have enabled Opus enc and dec in yocto image. 

Kernel : 5.10, Yocto : Hardknott, Hardware : imx8m mini

You can add below in you local.conf file

PACKAGECONFIG_append_pn-gstreamer1.0-plugins-bad = " opus opusparse "

0 Kudos
1,528 Views
Anton_K
Contributor III

Thanks for reply, on my side I have:
Yocto Kirkstone, kernel 5.15
And "opus" codec should be enabled on the gstreamer1.0-plugins-base
And option "opusparse" on the gstreamer1.0-plugins-bad

On the image gstreamer inspect shows:

gst-inspect-1.0 |grep opus
libav:  avdec_cllc: libav Canopus Lossless Codec decoder
libav:  avdec_hq_hqa: libav Canopus HQ/HQA decoder
libav:  avdec_hqx: libav Canopus HQX decoder
libav:  avdec_opus: libav Opus decoder
libav:  avenc_opus: libav Opus encoder
libav:  avmux_opus: libav Ogg Opus muxer
opus:  opusdec: Opus audio decoder
opus:  opusenc: Opus audio encoder
opusparse:  opusparse: Opus audio parser
rtp:  rtpopusdepay: RTP Opus packet depayloader
rtp:  rtpopuspay: RTP Opus payloader

But on the runtime the opus codec doesn't work.
Best regards, Anton

0 Kudos
2,947 Views
joanxie
NXP TechSupport
NXP TechSupport

I don't think current image supports this, did you use rtpopuspay successfully?

 

0 Kudos
1,561 Views
Anton_K
Contributor III

No, I've not, anyway thanks for reply.
Probably you can help me? Do you know any guide to run gst webrtc on imx8 (audio + video), I mean actually

0 Kudos
2,940 Views
r_trivedi123
Contributor IV

@joanxie,

Thanks for your response.

Can you please elaborate your statement "I don't think current image supports this". ?

Next,

Regarding rtpopuspay, below it the working pipeline on my pc.

gst-launch-1.0 alsasrc device="hw:2,0" ! audioconvert ! audioresample ! opusenc ! rtpopuspay ! queue max-size-bytes=0 max-size-buffers=0 ! udpsink host=[] port=[]

On board (imx8m mini) I have the below plugins.

root@imx8mm-lpddr4-evk:~# gst-inspect-1.0 | grep -i opus
rtp: rtpopusdepay: RTP Opus packet depayloader
rtp: rtpopuspay: RTP Opus payloader

Other plugins related to opus are not there in image.

But without opusenc this pipline will not work and rtpopuspay will not work here. So, How can I get opusenc and opusdec in my image?

 

And we need opus because we have to use it in webrtc.

Thanks.

0 Kudos
2,924 Views
joanxie
NXP TechSupport
NXP TechSupport

I mean that current bsp doesn't support opusenc or opusdec, for webRTC, pls refer to

"https://developer.ridgerun.com/wiki/index.php?title=GstWebRTC_-_Video_Examples_-_iMX8"

 

0 Kudos
2,875 Views
r_trivedi123
Contributor IV

I am able to resolve the issue. Thanks for the support.

0 Kudos