amf encoding will delay one frame, I added the option but it doesn't work.
av_opt_set(codec_ctx->priv_data, "usage", "ultralowlatency", 0)
doc of AMF Video Encode SDK
says:
In the Transcoding mode the encoder needs to accept at least 3 input frames before any output is produced. In low latency modes output becomes available as soon as the first submitted frame is encoded.