GNOME Bugzilla – Bug 763336
mpegtsmux: subtitle stream is always selected for PCR
Last modified: 2018-11-03 13:47:36 UTC
Created attachment 323423 [details] [review] avoid using a sparse stream in PCR selection When using mpegtsmux, it appears that the subtitle pad is almost always chosen by the element as a PCR reference which is not really a good idea (audio or video stream would be a better idea to avoid latencies when muxing live streams). This bug is reproducible with gst-launch-1.0 on git/master (+ patch from #759807) with a pipeline such as : filesrc ! tsdemux name=d mpegtsmux name=m ! filesink d.video_0078 ! queue ! mpegvideoparse ! avdec_mpeg2video ! deinterlace ! videoscale ! video/x-raw,width=320,height=240 ! x264enc bitrate=1024 ! h264parse ! m. d.audio_0082 ! queue ! mpegaudioparse ! avdec_mp2float ! audioconvert ! voaacenc ! aacparse ! m. d.subpicture_008d ! queue ! subpicture/x-dvb ! m. d.subpicture_008e ! queue ! subpicture/x-dvb ! m When using GST_DEBUG=mpegtsmux:5, we can see in the logs : mpegtsmux.c:1188:mpegtsmux_collected_buffer:<m> Pads collected mpegtsmux.c:598:mpegtsmux_create_stream:<m:sink_65> Creating stream with PID 0x0041 for caps video/x-h264, [...] mpegtsmux.c:598:mpegtsmux_create_stream:<m:sink_66> Creating stream with PID 0x0042 for caps audio/mpeg, [...] mpegtsmux.c:598:mpegtsmux_create_stream:<m:sink_67> Creating stream with PID 0x0043 for caps audio/mpeg, [...] mpegtsmux.c:598:mpegtsmux_create_stream:<m:sink_68> Creating stream with PID 0x0044 for caps audio/mpeg, [...] mpegtsmux.c:598:mpegtsmux_create_stream:<m:sink_69> Creating stream with PID 0x0045 for caps subpicture/x-dvb mpegtsmux.c:598:mpegtsmux_create_stream:<m:sink_70> Creating stream with PID 0x0046 for caps subpicture/x-dvb mpegtsmux.c:1271:mpegtsmux_collected_buffer:<m:sink_69> Use stream (pid=69) from pad as PCR for program (prog_id = 0) -> see latest log line choosing sink_69 with caps subpicture/x-dvb The proposed patch delay the PCR selection until the stream is not sparse.
I think this makes sense, but what happens in case there's only a sparse stream?
Muxing only subtitles tracks works (it generates data that vlc can read without complain). Note: gst-launch is displaying this errors twice : (gst-launch-1.0:9489): GStreamer-CRITICAL **: gst_segment_to_running_time: assertion 'segment->format == format' failed (it is also the case on the original master branch)
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/358.