GStreamer-fakesink0:sink)(4096字节,dts:无,pts:无,持续时间:无 [英] GStreamer - fakesink0:sink) (4096 bytes, dts: none, pts: none, duration: none for first text lines read by filesrc from srt file
问题描述
为什么在下面的管道中,从带有字幕的.srt文件读取文本开始时没有时间戳?
Why in following pipeline I have None timestamp at beginning of reading text from .srt file with subtitles?
这对我来说是个问题,因为我想稍后与其他src的h264视频进行多路复用,但由于多路复用器的"Buffer has no PTS"而失败.
Its a problem for me as I want to mux it later with h264 video from other src, and that fails due to "Buffer has no PTS" from muxer.
GStreamer版本1.14.5
GStreamer version 1.14.5
gst-launch-1.0 filesrc do-timestamp=true location=English.srt ! queue ! fakesink silent=false -v
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event ******* (fakesink0:sink) E (type: stream-start (10254), GstEventStreamStart, stream-id=(string)a02d40ac74fcf80941cc61947d76a1e054212aa98d213ab8cf403f1634f3abb0, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)1;) 0x563e90b389e0
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event ******* (fakesink0:sink) E (type: segment (17934), GstEventSegment, segment=(GstSegment)"GstSegment, flags=(GstSegmentFlags)GST_SEGMENT_FLAG_NONE, rate=(double)1, applied-rate=(double)1, format=(GstFormat)GST_FORMAT_TIME, base=(guint64)0, offset=(guint64)0, start=(guint64)0, stop=(guint64)18446744073709551615, time=(guint64)0, position=(guint64)0, duration=(guint64)18446744073709551615;";) 0x563e90b38a50
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = preroll *******
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (4096 bytes, dts: none, pts: none, duration: none, offset: -1, offset_end: 4095, flags: 00000040 discont , meta: none) 0x7f35f0008060
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (4096 bytes, dts: none, pts: none, duration: none, offset: -1, offset_end: 4095, flags: 00000000 , meta: none) 0x7f35f0008170
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (4096 bytes, dts: none, pts: none, duration: none, offset: -1, offset_end: 4095, flags: 00000000 , meta: none) 0x7f35f0008280
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (4096 bytes, dts: none, pts: none, duration: none, offset: -1, offset_end: 4095, flags: 00000000 , meta: none) 0x7f35f0008390
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (4096 bytes, dts: 0:00:00.001037500, pts: 0:00:00.001037500, duration: none, offset: -1, offset_end: 4095, flags: 00000000 , meta: none) 0x7f35f00084a0
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (4096 bytes, dts: 0:00:00.001103400, pts: 0:00:00.001103400, duration: none, offset: -1, offset_end: 4095, flags: 00000000 , meta: none) 0x7f35f00085b0
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (4096 bytes, dts: 0:00:00.001135300, pts: 0:00:00.001135300, duration: none, offset: -1, offset_end: 4095, flags: 00000000 , meta: none) 0x7f35f00086c0
要读取的文件的一部分:
Part of file to read:
1
00:00:00,900 --> 00:00:37,690
Flesh and sin die.
2
00:00:42,530 --> 00:00:46,410
Die with Christ, that's it.
Rise with Christ.
3
00:00:46,620 --> 00:00:50,660
That's it. Holy Spirit, come.
Holy Spirit come, set her free.
4
00:00:51,120 --> 00:00:53,080
Die with Christ.
推荐答案
您的管道中绝对没有逻辑.除了文件的扩展名.srt
之外,没人知道我们在这里处理什么样的数据.您可能想要类似subparse
的东西.
You have absolute no logic in your pipeline. Other than the file has the extension .srt
no one knows with what kind of data we deal with here. You probably want something like subparse
.
gst-launch-1.0 filesrc do-timestamp=true location=English.srt ! subparse ! queue ! fakesink silent=false -v
这篇关于GStreamer-fakesink0:sink)(4096字节,dts:无,pts:无,持续时间:无的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!