vbence / stream-m

An HTML5-compatible live streaming server supporting the WebM and H.264 formats.
MIT License
689 stars 141 forks source link

Unable to serialize filed #11

Closed Kandru closed 6 years ago

Kandru commented 9 years ago

Hey,

first of all thanks for your wonderful open source streaming plugin. I tried to get this working with XSPLIT and OBS (the "new" one, latest official build for Windows). But I'm not very successful. On XSPLIT the rtmp does not work at all. I also tried OBS and had luck - the stream seems to work until the first client connects. I can see and hear 1 or 2 seconds of the video, after that it will freeze. If I reload the /consume/first URL directly in my browser, I see the same video snippet again. After that it stopped.

I got an error after the first client connected. Please have a look :)

server@1:~$ java -jar stream-m.jar server.properties
metadata: [@setDataFrame, onMetaData, {audiocodecid=mp4a, audiosamplerate=44100.0, width=1280.0, audiochannels=2.0, videodatarate=3500.0, videocodecid=avc1, fileSize=0.0, duration=0.0, height=720.0, audiodatarate=160.0, stereo=true, audiosamplesize=16.0, encoder=obs-output module (libobs version 0.10.1), framerate=30.0}]
Exception in thread "Thread-2" java.lang.RuntimeException: Unable to serialize filed [org.czentral.format.mp4.MovieDataBox#content].
        at org.czentral.data.binary.serializer.AnnotatedClass.serializeWithType(AnnotatedClass.java:116)
        at org.czentral.data.binary.serializer.AnnotatedClass.serialize(AnnotatedClass.java:66)
        at org.czentral.data.binary.serializer.GeneralSerializer.serializeWithType(GeneralSerializer.java:93)
        at org.czentral.data.binary.serializer.GeneralSerializer.serializeSingle(GeneralSerializer.java:70)
        at org.czentral.data.binary.serializer.GeneralSerializer.serialize(GeneralSerializer.java:59)
        at org.czentral.incubator.streamm.Mp4FragmentBuilder.build(Mp4FragmentBuilder.java:219)
        at org.czentral.incubator.streamm.PublisherAppInstance.mediaChunk(PublisherAppInstance.java:363)
        at org.czentral.minirtmp.ApplicationContext.processMessage(ApplicationContext.java:179)
        at org.czentral.minirtmp.ApplicationContext.processChunk(ApplicationContext.java:122)
        at org.czentral.minirtmp.RTMPStreamProcessor.processPacket(RTMPStreamProcessor.java:206)
        at org.czentral.minirtmp.RTMPStreamProcessor.process(RTMPStreamProcessor.java:75)
        at org.czentral.util.stream.Feeder.feedTo(Feeder.java:56)
        at org.czentral.minirtmp.MiniRTMP$Worker.run(MiniRTMP.java:95)
Caused by: java.lang.ArrayIndexOutOfBoundsException
        at java.lang.System.arraycopy(Native Method)
        at org.czentral.data.binary.serializer.ByteArraySliceSerializer.serialize(ByteArraySliceSerializer.java:41)
        at org.czentral.data.binary.serializer.GeneralSerializer.serializeWithType(GeneralSerializer.java:93)
        at org.czentral.data.binary.serializer.GeneralSerializer.serializeSingle(GeneralSerializer.java:70)
        at org.czentral.data.binary.serializer.GeneralSerializer.serialize(GeneralSerializer.java:54)
        at org.czentral.data.binary.serializer.AnnotatedClass.serializeWithType(AnnotatedClass.java:114)
        ... 12 more

Thanks for your help!

vbence commented 9 years ago

Hi, thanks for the feedback.

For OBS: please check what key frame interval are you using. This seems like a limit-issue. You can find this in the h.264 settings. Try to set it to 60 (or maybe even 30) and see what happens.

For XSPLIT: I am trying things now...