For the actual application pipeline I’m replacing the ! decodebin ! autovideosink with an appsink. All work fine for the ts file with main profile but for the other file with baseline profile the pipeline fails to play - just stays in current state ASYNC - I do get mpegtspacketizer warnings saying No groups, can't calculate timestamp.
So my question is - what does autovideosink add that enables the pipeline to play? And how can I create the same effect when using an appsink?
That is a bit of a mystery, because removing the decodebin ! autovideosink here shouldn’t really affect the tsdemux part of the pipeline at all.
Are you saying you don’t get these warnings with the autovideosink in the pipeline, or you get them in both cases, but they don’t seem to have any negative effect in the first case?
You could try x264enc tune=zerolatency to see if it changes anything for you (but it doesn’t sound like that’s your problem).
% GST_DEBUG=3 gst-launch-1.0 filesrc location=file1.ts ! tsdemux ! queue ! h264parse ! avdec_h264 ! x264enc ! decodebin ! autovideosink
Setting pipeline to PAUSED ...
0:00:00.066906250 95337 0x149534450 FIXME glcontext gstglcontext.c:1956:gst_gl_context_request_config:<glcontextcocoa1> does not support requesting a config
0:00:00.066926417 95337 0x149534450 WARN glcontext gstglcontext.c:1299:gst_gl_context_create_thread:<glcontextcocoa1> failed to request config gst-gl-context-config, platform=(GstGLPlatform)GST_GL_PLATFORM_CGL, alpha-size=(int)8, depth-size=(int)0, stencil-size=(int)0, red-size=(int)8, green-size=(int)8, blue-size=(int)8, samples=(int)0, sample-buffers=(int)0;
Pipeline is PREROLLING ...
Got context from element 'autovideosink0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayCocoa\)\ gldisplaycocoa0";
0:00:00.073675625 95337 0x1495225c0 WARN mpegtspacketizer mpegtspacketizer.c:2375:mpegts_packetizer_pts_to_ts_internal: No groups, can't calculate timestamp
0:00:00.073696667 95337 0x1495225c0 WARN mpegtspacketizer mpegtspacketizer.c:2375:mpegts_packetizer_pts_to_ts_internal: No groups, can't calculate timestamp
Redistribute latency...
Redistribute latency...
Redistribute latency...
Redistribute latency...
0:00:00.099586875 95337 0x149015750 ERROR glcaopengllayer gstglcaopengllayer.m:161:-[GstGLCAOpenGLLayer copyCGLContextForPixelFormat:]: failed to retrieve GStreamer GL context in CAOpenGLLayer
Redistribute latency...
0:00:00.496631584 95337 0x10a3dda30 FIXME videodecoder gstvideodecoder.c:1193:gst_video_decoder_drain_out:<vtdechw0> Sub-class should implement drain()
Redistribute latency...
0:00:00.616695459 95337 0x10a3dda30 FIXME videodecoder gstvideodecoder.c:1193:gst_video_decoder_drain_out:<vtdechw0> Sub-class should implement drain()
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
With the main profile file I get:
% GST_DEBUG=3 gst-launch-1.0 filesrc location=file2.ts ! tsdemux ! queue ! h264parse ! avdec_h264 ! x264enc ! decodebin ! autovideosink
Setting pipeline to PAUSED ...
0:00:00.193841792 97846 0x1260b4a60 FIXME glcontext gstglcontext.c:1956:gst_gl_context_request_config:<glcontextcocoa1> does not support requesting a config
0:00:00.193865084 97846 0x1260b4a60 WARN glcontext gstglcontext.c:1299:gst_gl_context_create_thread:<glcontextcocoa1> failed to request config gst-gl-context-config, platform=(GstGLPlatform)GST_GL_PLATFORM_CGL, alpha-size=(int)8, depth-size=(int)0, stencil-size=(int)0, red-size=(int)8, green-size=(int)8, blue-size=(int)8, samples=(int)0, sample-buffers=(int)0;
Pipeline is PREROLLING ...
Got context from element 'autovideosink0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayCocoa\)\ gldisplaycocoa0";
0:00:00.201677417 97846 0x1260b0a60 WARN tsdemux tsdemux.c:2540:check_pending_buffers: Don't have a last DTS/PTS to use for offset recalculation
Redistribute latency...
Redistribute latency...
0:00:00.232318334 97846 0x14619fb70 ERROR glcaopengllayer gstglcaopengllayer.m:161:-[GstGLCAOpenGLLayer copyCGLContextForPixelFormat:]: failed to retrieve GStreamer GL context in CAOpenGLLayer
Redistribute latency...
Redistribute latency...
Redistribute latency...
0:00:00.722941875 97846 0x1260b0190 FIXME videodecoder gstvideodecoder.c:1193:gst_video_decoder_drain_out:<vtdechw0> Sub-class should implement drain()
Redistribute latency...
0:00:00.847556250 97846 0x1260b0190 FIXME videodecoder gstvideodecoder.c:1193:gst_video_decoder_drain_out:<vtdechw0> Sub-class should implement drain()
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
So both raising timestamp warnings but different issues in each case. Both play quite happily with the pipeline as configured above.
When I switch to the appsink pipeline I still see the tsdemux happily detect and add output pads for the streams. In the case of the baseline profile file I never see the pad-added signal for the decoder.
@tpm - x264enc tune=zerolatency did the trick I missed an error in my previous attempt to set it. Thanks for pointing me in the right direction, very much appreciated.