We have tried playing two songs at the same time using interleave plugin.
> gst-launch
filesrc location=/home/test.mp3
! decodebin ! audioconvert ! "audio/x-raw-int,channels=2"
! alsasink
filesrc location=/home/song.mp3
! decodebin ! audioconvert ! audio/x-raw-int,channels=2
! deinterleave name=d
interleave name=i ! audioconvert ! alsasink
d.src0 ! queue ! audioconvert ! i.sink1
d.src1 ! queue ! audioconvert ! i.sink0
i can hear two song together on both left and right earplugs.but i want test.mp3 to be played in right channel and song.mp3 to be played in left channel.
If in above pipeline I change channels=1 instead of 2 it says
Setting pipeline to PAUSED …
Pipeline is PREROLLING …
And i can hear nothing.
can anyone suggest me the correct pipeline structure for this?
Before interleaving two songs you need to convert them to mono. It’s possible to do this with audioconvert. Just set channels to 1.
Then just
interleavethem into one stream:Upd: Oh, my! It’s almost the same pipeline on the
interleavepage here. Try to read some docs before asking next time. It’s not that hard.