artclarke / xuggle-xuggler

Xuggle's Xuggler Java API for Video -- DEPRECATED
GNU Lesser General Public License v3.0
360 stars 226 forks source link

Getting snapshots from RTMP stream #19

Open yev opened 10 years ago

yev commented 10 years ago

Hello,

I'm using the last xuggler lib on Java 7 (MacOs Maverix). I need to get a png snapshot from a live rtmp stream served by wowza.

For this I'm using the default com.xuggle.xuggler.demos.DecodeAndCaptureFrames. There are some problems:

  1. reader.readPacket() has a delay of ~5 minutes (it seems xuggler tries to buffer or guess the format, difficult to explain)
  2. After this delay, some external process starts (I guess it's ffmpeg) and my CPU usage is 100%.
  3. In parallel with high CPU load, I see the png files created correctly, but after 2-3 minutes I get always the following exception

14:40:35.785 [main] ERROR org.ffmpeg - WriteN, RTMP send error 32 (14 bytes) 14:40:35.790 [main] ERROR org.ffmpeg - WriteN, RTMP send error 32 (42 bytes)

Any idea?