如何将多节目传输流(MPTS)文件重新复用为单个TS? [英] How to re-multiplex Multiple Program Transport Stream (MPTS) files into a single TS?

查看:801
本文介绍了如何将多节目传输流(MPTS)文件重新复用为单个TS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有从卫星接收机录制的多个MPTS文件,我需要从每个文件中挑选程序/服务/ PIDS将它们重新复用到一个MPTS文件中。或者,我可以从每个文件中获取所有服务,并将其添加到最终的MPTS中(如果有人知道不允许我选择程序的复用器)



有没有人知道如何使用开源或免费软件(如VLC或ffmpeg)在windows或linux下执行此操作?

解决方案

我最终使用了Oskar Schirmer的多路复用器包@ scara .com ,这是我可以找到的唯一一个开源解决方案,我甚至不确定这个项目是否被维护,但它是有效的。



在MPTS ts文件(到另一个文件)中选择一个PID的确切命令是:

  iso13818ts -F 500  - -file 1 source.ts --ts 1 2 13> destination.ts 

其中:




  • -F 500是发送PSI表(PAT& PMT)的时间(以ms为单位)

  • - 文件1 source.ts指定一个输入文件(来源)。 ts)并给它一个引用id(1)

  • - ts 1 2 13告诉命令文件1是一个ts,采取程序2并将其重新映射到程序13的输出

  • 标准输出是最终的ts,所以需要重定向到一个文件或管道



使用同样的命令,您可以一次重新复用多个MPTS流(只要您的系统可以跟上),那么一个简短的例子就是:

  iso13818ts -F 500 --file 1 source1.ts --file 2 source2.ts --ts 1 2 13 --ts 2 1 10> dest.ts 

哪个从文件1中获取程序2,并将其编程为13,程序1从文件2并使其程序10并将结果TS放入dest.ts


I have multiple MPTS files recorded from satellite receivers, I need to cherry pick programs/services/PIDS from each file re-multiplex them into a single MPTS file. Optionally I might be able to get away with taking all the services from every file and adding them to the final MPTS (In case anyone knows about a multiplexer that wouldn't allow me to cherry pick programs)

Does anybody know how to do this with open source or free software (like VLC or ffmpeg for example) under either windows or linux?

解决方案

I ended up using the multiplexer package from Oskar Schirmer @ scara.com, which was the only one open source solution I could find, I'm not even sure if this project is being maintained, but it works.

The exact command to cherry pick a PID in a MPTS ts file (to another file) is:

iso13818ts -F 500 --file 1 source.ts --ts 1 2 13 > destination.ts

Where:

  • -F 500 is the time in ms to send the PSI tables (PAT & PMT)
  • --file 1 source.ts specifies an input file (source.ts) and gives it a referral id (1)
  • --ts 1 2 13 tells the command file 1 is a ts, take program 2 and remap it to program 13 on the output
  • standard output is the resulting ts, so it needs to be redirected to a file or piped

With this same command you can remultiplex the multiple MPTS streams at a time (as long as your system can keep up), so a short example would be:

iso13818ts -F 500 --file 1 source1.ts --file 2 source2.ts --ts 1 2 13 --ts 2 1 10 > dest.ts

Which takes program 2 from file 1 and makes it program 13, and program 1 from file 2 and makes it program 10 and puts the resulting TS into dest.ts

这篇关于如何将多节目传输流(MPTS)文件重新复用为单个TS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆