Constructing FFmpeg Frame Grabber with an InputStream
#1,856 opened on Aug 1, 2022
Repository metrics
- Stars
- (6,985 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
Hello,
We are trying to construct an FFmpegFrameGrabber object with an InputStream instead of a URL in Android. Here is what we are doing now: grabber = new FFmpegFrameGrabber("rtsp://192.168.42.1/live");. Unfortunately, since our application uses both Wifi and LTE, we need to explicitly bind the sockets that the FFmpegFrameGrabber uses to Wifi. We thought the easiest way to do that would be to create a Wifi socket to our RTSP URL, then get an InputStream from this socket and pass it into the constructor for the grabber. However, we aren't sure how to convert a UDP socket object into an InputStream that the grabber can consume. Do you know any way to do this (or any other methods to achieve what we want)? Thanks in advance for your help.