vaapi encoding requires stream-format=byte-stream on radeonsi since 1.14
Submitted by Christoph Haag
Link to original bug (#795372)
Description
RX 480, latest mesa git.
Since gstreamer 1.14 a simple vaapi encoding pipeline that has been working on 1.12.4 never starts encoding and produces a 0 byte output file when pressing ctrl+c:
$ LANG=en gst-launch-1.0 videotestsrc ! vaapih264enc ! "video/x-h264,profile=baseline" ! h264parse ! matroskamux ! filesink location=output.mkv
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Got context from element 'vaapiencodeh264-0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"(GstVaapiDisplayGLX)\ vaapidisplayglx0";
^
Chandling interrupt.
Interrupt: Stopping pipeline ...
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
^
C
I was told this is something that should be reported, so here it is.
The workaround for now is to specify stream-format=byte-stream yourself, like this:
gst-launch-1.0 videotestsrc ! vaapih264enc ! "video/x-h264,profile=baseline,stream-format=byte-stream" ! h264parse ! matroskamux ! filesink location=output.mkv
this pipeline works fine with gstreamer 1.14.
The same is true for an equivalent h.265 pipeline:
gst-launch-1.0 videotestsrc ! vaapih265enc ! "video/x-h265,stream-format=byte-stream" ! h265parse ! matroskamux ! filesink location=output.mkv
Bugzilla shows a few other issues that may be relevant, for example maybe bug 732167.
Version: 1.14.0