bytedeco/javacv

Constructing FFmpeg Frame Grabber with an InputStream

Open

#1.856 aberto em 1 de ago. de 2022

Ver no GitHub
 (4 comments) (0 reactions) (0 assignees)Java (1.583 forks)batch import
help wantedquestion

Métricas do repositório

Stars
 (6.985 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 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.

Guia do colaborador