<div dir="ltr">Hi<div><br></div><div>I'm working on sending prerecorded mp3 files through a WebRTC audio channel via the webrtcbin element. The time the files are played can't be determined at start time so the pipeline has to be dynamic. I have a working example, with the equivalent pipeline description being</div><div><br></div><div>audiotestsrc wave=silence ! audio/x-raw,rate=16000 ! audioresample ! input-selector name=selector ! queue ! audioconvert ! audioresample ! opusenc ! rtpopuspay ! appliation/x-rtp,media=audio,encoding-name=OPUS,payload=111,clock-rate=48000 ! queue appsrc ! decodebin ! selector.</div><div><br></div><div>When it comes to the point the file needs to be played I add the appsrc and decodebin to the pipeline and change the active pad for the input-selector. After that I leave the active pad for the input-selector unchanged and subsequent files pushed through appsrc are played correctly. </div><div><br></div><div>The problem with the above approach is that the first 2 files can't be heard on the receiving end of the WebRTC connection, but the 3rd and subsequent files do play correctly. I think the problem occurs when changing the active-pad for the input-selector element, but the active-pad is only changed once the pad added from decodebin is linked to the input-selector.</div><div><br></div><div>I've tried to remove the use of the audiotestsrc and input-selector by just "playing" a silent mp3 file through appsrc to get the negotiation working and be able to link the decodebin to the rest of the pipeline, but when I do that the pipeline just freezes.</div><div><br></div><div>The files we are playing are hosted on AWS S3 so I've also tried to use souphttpsrc and uridecodebin to just read the file remotely. I set the "location" (or equivalent) property by changing the source element to the READY state, change the location property, then set the element state back to PLAYING. This works for the first file, but as soon as the file is finished playing the pipeline becomes unresponsive and I'm unable to play subsequent files. </div><div><br></div><div>I can provide more details if necessary, but I would appreciate any ideas or guidance on how to proceed with this issue. </div><div><br></div><div>Thanks.</div></div>