1

I need to demux the video frames and KLV data from an MPEG-TS stream in sync, frame-by-frame. The following command to demux the KLV data and outputs a text file with the KLV data.

gst-launch-1.0 filesrc location="some_file.ts" ! tsdemux name=demux \
demux. ! queue ! meta/x-klv ! filesink location="some_file-KLV.txt"

The following command to demux the video and outputs a video file.

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" 

On combining the above two:

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"

The command doesn't work. It just gets stuck after the following message on the terminal;

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...

and, the size text and video files is 0 bytes.

The .ts file I am using, is available directly in either of the links below:

https://drive.google.com/drive/folders/1t-u8rnEE2MftWQkS1q3UB-J3ogXBr3p9?usp=sharing

https://easyupload.io/xufeny

Thank you for helping! Cheers. :)

2
  • What have you tried to resolve the issue? Commented Nov 29, 2022 at 23:52
  • I had posted the same question on another forum also, and based on a suggestion, I tried the following: gst-launch-1.0 filesrc location="MISB.ts" ! tsdemux name=demux demux. ! multiqueue name=mq ! decodebin ! videorate ! videoscale ! x264enc tune=zerolatency ! mp4mux ! filesink location="some_file-video.mp4" demux. ! mq. mq. ! meta/x-klv ! filesink location="some_file-KLV.txt" This command creates the files. Now, I am trying to make it so that I get each frame and its KLV data in sync. Regards.
    – 9friday
    Commented Nov 30, 2022 at 7:08

0

You must log in to answer this question.

Browse other questions tagged .