我需要将视频帧和KLV数据从一个MPEG-TS流中同步、逐帧地显示出来.下面的命令用于解析KLV数据并输出带有KLV数据的文本文件。
gst-launch-1.0 filesrc location="some_file.ts" ! tsdemux name=demux \
demux. ! queue ! meta/x-klv ! filesink location="some_file-KLV.txt"下面的命令可以显示视频并输出一个视频文件。
gst-launch-1.0 filesrc location="some_file.ts" ! tsdemux name=demux \
demux. ! queue ! decodebin ! videorate ! videoscale ! x264enc ! mp4mux ! filesink location="some_file-video.mp4" 关于将上述两者结合起来:
gst-launch-1.0 filesrc location="some_file.ts" ! tsdemux name=demux \
demux. ! queue ! decodebin ! videorate ! videoscale ! x264enc ! mp4mux ! filesink location="some_file-video.mp4"
demux. ! queue ! meta/x-klv ! filesink location="some_file.txt"命令不起作用。它只是在终端上的以下消息之后卡住了;
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...并且,文本和视频文件的大小为0字节。
可以在以下站点找到一个示例.ts文件(该文件尚未由我上传和创建,它是github(https://gist.github.com/All4Gis/509fbe06ce53a0885744d16595811e6f)上某些代码的数据的一部分):https://drive.google.com/drive/folders/1AIbCGTqjk8NgA4R818pGSvU1UCcm-lib?usp=sharing
谢谢你的帮助!干杯。:)
编辑:
我意识到可能会有一些混乱。上面链接中的文件只是用来创建.ts文件。
我正在使用的.ts文件可以直接在下面的链接中获得:
https://drive.google.com/drive/folders/1t-u8rnEE2MftWQkS1q3UB-J3ogXBr3p9?usp=sharing
发布于 2022-12-01 09:07:00
如果我们使用的是Gstreamer的multiqueue元素,而不是queue,那么文件就被创建了。
我根据另一个网站上的一位评论者的建议,尝试了以上的问题。
但是,KLV数据和帧仍然不同步。这就是我现在想要做的。
致以问候。
https://stackoverflow.com/questions/74603250
复制相似问题