传输流& mpeg文件fromat [英] transport stream & mpeg file fromat

查看:235
本文介绍了传输流& mpeg文件fromat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将一个TS文件转换为mpeg文件。有没有描述这种过程的文件?
我知道TS架构,但我不知道mpeg的文件架构。

I would like to convert a TS file to mpeg file. Is there any documents describing such process? I know the TS architecture, but I don't know mpeg's file architecture. Any info on this subject will highly appreciated.

谢谢。

推荐答案

p>你可能想做的是从MPEG-TS(传输流)转换为MPEG-PS(节目流)。 MPEG-PS是标准.mpg文件的格式以及DVD视频使用的格式。

What you are probably wanting to do is convert from MPEG-TS (Transport Stream) to MPEG-PS (Program Stream). MPEG-PS is the format of a standard .mpg file as well as the format DVD video uses.

您可能应该保留ISO / IEC 13818-1标准。该标准包含所有的MPEG-TS和MPEG-PS容器细节(它不包括ISO / IEC 13818-2中涵盖的编码视频)。

You probably should get a hold on the standard which is ISO/IEC 13818-1. This standard contains all of the MPEG-TS and MPEG-PS container details (it does not cover the coded video which is covered in ISO/IEC 13818-2).

幸运的是,这种转换相当简单,因为大多数整个MPEG-PS结构都包含在MPEG-TS格式中。传输流包含一系列188字节的数据包,每个数据包都有一个头。 PES(节目基本流)分组包含在分组有效载荷内。 PES分组包含实际的视频或音频有效载荷。 PES分组可以是任何长度,并且大多数时间它们跨越几个TS分组。从传输流解复用PES分组实际上只涉及去除TS头部并正确地连接有效载荷数据以形成PES分组。

Luckily, this conversion is rather simple since most of the entire MPEG-PS structure is contained within the MPEG-TS format. The transport stream contains a series of 188 byte packets that each have a header. PES (Program Elementary Stream) packets are contained within the packet payloads. PES packets contain the actual video or audio payload. A PES packet can be any length and most of the time they span several TS packets. Demuxing the PES packets from the transport stream really just involves removing the TS headers and concatenating the payload data correctly to form the PES packets.

一旦你有PES分组流,您将其复用到标准中所述的程序流格式。所以基本上,你不需要解析PES包或它们的内容,你可以从一种格式提取它们并将它们插入到另一种格式。

Once you have a stream of PES packets, you will multiplex them into the Program Stream format as laid out in the standard. So basically, you don't need to parse the PES packets or their content, you can just lift them from one format and insert them into the other.

转换相当简单,它仍然需要相当多的工作,因为你将需要变得非常熟悉的容器标准,并仔细地解析比特流来得到正确的东西。因此,即使我说转换很简单,但这只是在其他格式转换,而你可能需要进一步深入视频数据。

Even though the conversion is fairly simple, it still requires quite a bit of work since you will need to become pretty familiar with the container standard and be meticulous with your parsing of the bitstream to get things right. So even though I say the conversion is simple, that is only in the sense that it is simple compared to other format conversions where you might have to dig down further into the video data.

这篇关于传输流& mpeg文件fromat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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