Playing Video ads(local MP4 files) while RTMP streaming is in progress.
Thanks @pedroSG94 for Great Library. We are implementing video ads feature when RTMP streaming is in progess by "SurfaceRenderFilter" for Video packets And AudioFileSource for sending Audio Packets.
Issue when audio sample rate changes with different local video files(mp4) getting Error "Audio file sample rate 44100 is different than the configured: 22050"
Can we change audio sample rate on the fly without stopping stream.
Thanks
Hello,
No, it is not possible. The only way is use a file with the same sample rate or develop a method to resample the audio. If you can do a method to resample the audio I can implement it to avoid this error.
Hello,
Need to add library for resampling Link: https://github.com/google/oboe/blob/main/src/flowgraph/resampler/README.md#building-the-resampler
Thanks
Hello,
If you can compile the library, you can create your own AudioFileSource (you can copy the code) and instead of throw the fail, resample each buffer before send it to the encoder.
Thanks @pedroSG94 will try your suggestion.