Closed tomberek closed 4 years ago
I've tracked this down to this check: https://github.com/notedit/media-server-go/blob/master/mediaframemultiplexer.go#L43
This seems to assume H264, or doesn't really check it correctly. Removing the annexbConvert (or adjusting the if condition to be false) makes VP8/9 work correctly. Is there another way to make that condition go the other way?
you can check your sdp.
Starting to explore the media-server-go examples and got it working nicely with H264. Then I tried to adapt it to use VP8, (perhaps eventually to support both several incoming offered formats) and came across this panic during a buffer conversion.
Code below, note the "continue" on line 151 that skips the OnMediaFrame callback registration. It seems that this code allows one to loopback VP8, but as soon as you may want to register something on frames, likely to feed it to a modified gstreamer pipeline, the OnMediaFrame call fails. The gstreamer/HLS portions of the gist can be removed with the same result.
https://gist.github.com/tomberek/c5dcdb1199e08c33ca2be46d5da08a3f
The OnMediaFrame call seems to work without any problems when using H264.
Sidenote: I've created a Nix expression that handles creating and installing media-server-go-native. With some cleanup and making it more idiomatic, this may be useful for any Nix users. https://gist.github.com/tomberek/f0b56c0754b55b20e7c881f98ab872b7