artclarke / humble-video

Humble Video: Demuxing, Decoding, Filtering, Encoding and Muxing of 100's of video and audio formats and Codecs from the JVM
GNU Affero General Public License v3.0
557 stars 115 forks source link

gif support? #119

Open mandrachek opened 6 years ago

mandrachek commented 6 years ago

I'm trying to write out an animated gif, using code based on the RecordAndEncodeVideo example, and I'm getting a crash when attempting to open the encoder:

java.lang.IllegalArgumentException: could not open codec: Invalid argument (-22)
    at io.humble.video.VideoJNI.Encoder_open(Native Method)
    at io.humble.video.Encoder.open(Encoder.java:154)

Any hint as to what the problem might be?

mandrachek commented 6 years ago

I changed my BufferedImage types to TYPE_INT_RGB, and my pixel format to PIX_FMT_RGB8 So the encoder opens successfully now, but I get an error calling MediaPicture.make() -

could not fill image with data
java.lang.RuntimeException: could not fill image with data
    at io.humble.video.VideoJNI.MediaPicture_make__SWIG_0(Native Method)
    at io.humble.video.MediaPicture.make(MediaPicture.java:153)