Wowza Community

Updating my module from WMS 3.6 to Wowza Streaming Engine

Hi everyone,

I am trying to update my custom module (that worked well with Wowza Media Server 3.x) to Wowza Streaming Engine.

Most of my code still works with Wowza Streaming Engine except the thumbnail generator :frowning:

BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(new File(filePath), false));
FLVUtils.writeHeader(out, 0, null);
AMFPacket codecConfig = thestream.getVideoCodecConfigPacket(packet.getAbsTimecode());
if (codecConfig != null)
        FLVUtils.writeChunk(out, codecConfig.getDataBuffer(), codecConfig.getSize(), 0, (byte)codecConfig.getType());
...

Related error with Wowza Streaming Engine log :

java.lang.NoSuchMethodError: com.wowza.util.FLVUtils.writeChunk(Ljava/io/OutputStream;Ljava/nio/ByteBuffer;IJB)V

So I checked the difference between the API :

// From Wowza Media Server 3 API : 
static void writeChunk(java.io.OutputStream ds, java.nio.ByteBuffer data, int size, long timecode, byte type)

// From Wowza Streaming Engine API
public static com.wowza.wms.mediawriter.MediaWriterStatus writeChunk(java.io.OutputStream ds,java.nio.ByteBuffer data,int size, long timecode,byte type)

So from what I can see, the only difference is this return type “com.wowza.wms.mediawriter.MediaWriterStatus” that my IDE doesn’t want to import. I feel I need some library upgrade or something but I can’t find any documentation about it - I Have an 1 year old version of Wowza IDE 2.

Any help would be appreciated,

Best regards,

Hane

Is your project in eclipse referencing the Wowza 3 libraries at compile time? If so, you can import the new Wowza 4 jar files into to your java build path->libraries.

Great, glad you got it working. Thanks for the update.

Uhh forgot that these .jar were under the WowzaStreamingEngine/lib directory (i’m not very good with eclipse&java). I removed these old .jar and added the new one and now it works like a charm !

Thank you !!