Xaymar
Active Member
I've started working on a AMF (AMD Media SDK Framework) based VCE implementation for OBS Studio, but I'm having a hard time with the OBS Studio plugin interface for encoders. There are some differences between how I need things and how OBS delivers them.
- 'encode' receives a 'struct encoder_frame*', however I don't see a pointer to continuous memory in it. Do I have to create it myself?
- AMF supports DX11 and OpenGL source surfaces for encoding, how would I go about getting these? Is this even possible?
- How do I tell if the incoming frame is the last one that is to be encoded? AMF allows me to hint the hardware encoder that this is the last frame.
- AMF may create multiple packets for a single frame, yet I don't see a way to return multiple, which means that eventually the output queue is going to be full and the plugin will have to set received_packet to false. Does that drop frames or will OBS buffer them until the plugin can handle them?
- AMF also supports many more color formats than just NV12, how would I be able to tell what format encoder_frame will be in apart? (Supported Formats without conversion: NV12, YV12, BGRA, ARGB, RGBA, GRAY8, YUV420P, U8V8, YUY2)
Last edited: