I have been unable to get mfxh264enc to work on Windows #169
Description
Update: I'm on Windows 10, 64-bit. The processor is an Intel Core i7-6700K @ 4Ghz.
I successfully built and installed the gstreamer plugins following the instructions laid out here. When I try any of the examples from https://github.com/intel/gstreamer-media-SDK/blob/topic_linux_and_window/README.USAGE that involve mfxh264enc, however, they fail. I'm able to get the following to play just fine:
.\gst-launch-1.0.exe videotestsrc ! mfxsink
And I'm able to get the following (and many other non-Media-SDK-based things) to work (notice how I'm not using media sdk):
.\gst-launch-1.0.exe videotestsrc is-live=true ! openh264enc ! rtph264pay ! rtph264depay ! decodebin ! autovideosink
Replacing the encoder in the above command like this:
.\gst-launch-1.0.exe videotestsrc is-live=true ! mfxh264enc ! rtph264pay ! rtph264depay ! decodebin ! autovideosink
Fails. I notice the following when I set the GST_DEBUG level to 4 or higher:
0:00:00.243975000 8740 000001EC81B1F140 ERROR mfx gstmfxencoder.c:1202:gst_mfx_encoder_prepare: Unsupported video params -3
0:00:00.253680000 8740 000001EC81B1F140 ERROR mfx gstmfxencoder.c:1304:gst_mfx_encoder_start: Error initializing the MFX video encoder -15
0:00:00.280482000 8740 000001EC81B1F140 ERROR mfxencode gstmfxenc.c:436:gst_mfxenc_handle_frame: failed to encode frame 0 (status -3)
0:00:00.290568000 8740 000001EC81B1F140 WARN basesrc gstbasesrc.c:3064:gst_base_src_loop: error: Internal data stream error.
0:00:00.300483000 8740 000001EC81B1F140 WARN basesrc gstbasesrc.c:3064:gst_base_src_loop: error: streaming stopped, reason error (-5)
0:00:00.312413000 8740 000001EC81B1F140 WARN typefind gsttypefindelement.c:988:gst_type_find_element_chain_do_typefinding: error: Stream doesn't contain enough data.
This error presents itself time and time again (the same output). For example, if I try a sample from the Wiki (adapted to work for videotestsrc):
.\gst-launch-1.0.exe videotestsrc ! mfxh264enc ! 'video/x-h264, stream-format=byte-stream, profile=baseline' ! rtph264pay pt=96 ! udpsink port=3001
Same or similar output is noticed, and it fails:
0:00:09.932835000 7740 000002B930BBDE00 ERROR mfx gstmfxencoder.c:1202:gst_mfx_encoder_prepare: Unsupported video params -3
0:00:09.942275000 7740 000002B930BBDE00 ERROR mfx gstmfxencoder.c:1304:gst_mfx_encoder_start: Error initializing the MFX video encoder -15
0:00:09.950899000 7740 000002B930BBDE00 ERROR mfxencode gstmfxenc.c:436:gst_mfxenc_handle_frame: failed to encode frame 0 (status -3)
0:00:09.966414000 7740 000002B930BBDE00 WARN basesrc gstbasesrc.c:3064:gst_base_src_loop: error: Internal data stream error.
0:00:09.992535000 7740 000002B930BBDE00 WARN basesrc gstbasesrc.c:3064:gst_base_src_loop: error: streaming stopped, reason error (-5)
Any thoughts? We would really like to use this framework to optimize gstreamer, but we are using Windows and thus far have been unable to get the encoder we need to work.