nareix / joy4

Golang audio/video library and streaming server
MIT License
2.68k stars 500 forks source link

Get the one frame from the stream #59

Open sttyru opened 6 years ago

sttyru commented 6 years ago

Hello!

Thank you for awesome library!

I have a trivial question, maybe. I want to write very easy monitoring tool for IP-cameras (above 50 devices). The main criteria of avalability of devices is an ability of getting an image. I mean that I need more than simple check by ICMP or TCP/UDP. In this case I want to fetch (programmly) of the frame and checking that this image is non-empty, e.g. Can I do that using of your library? I found sources of RTSP-client software but I don't know how fetch the frame.

thenrich commented 6 years ago

@sttyru I do something like this:

jpegImg := encodeImg(frame.Image)

sttyru commented 6 years ago

@thenrich, very thank you!

niklaskorz commented 5 years ago

As this issue is still open, I have one question: Does a packet only contain a single frame? If not, why does the video decoder only return one frame for a whole packet instead of, e.g., a channel or array of frames?