简体   繁体   English

使用 cat 命令合并 2 个 MP4 文件

[英]Merging 2 MP4 Files With the cat Command

I am on OS X 10.10 and I am trying to merge 2 MP4 files using the cat command.我在 OS X 10.10 上,我正在尝试使用cat命令合并 2 个 MP4 文件。 I thought that I could do this using the cat command, but it seems not to be working.我以为我可以使用cat命令来做到这一点,但它似乎不起作用。 When I merge the two files together and wrote it to a 3rd file, the 3rd file simply had the contents of the first file (when I opened it up using QuickTime).当我将两个文件合并在一起并将其写入第三个文件时,第三个文件仅包含第一个文件的内容(当我使用 QuickTime 打开它时)。 From what I understand, the cat command is simply copying and pasting the plain text from the first file to the third file then the plain text from the second file to the third file (appending it), but QuickTime only will recognize the first part of this.据我了解, cat命令只是将纯文本从第一个文件复制并粘贴到第三个文件,然后将纯文本从第二个文件复制并粘贴到第三个文件(附加它),但 QuickTime 只会识别这个。 Is there any way to use the cat command to get around this?有没有办法使用cat命令来解决这个问题?

I think you're getting confused with mp4box 's -cat option, using which you can execute the following:我认为您对mp4box-cat选项感到困惑,使用它您可以执行以下操作:

mp4box -add 1.mp4 -cat 2.mp4 -cat 3.mp4 merged.mp4

In order to merge 1.mp4 , 2.mp4 and 3.mp4 to merged.mp4为了将1.mp42.mp43.mp4合并到merge.mp4

Otherwise, cat - concatenate files and print on the standard output does not support this kind of behavior.否则, cat - concatenate files and print on the standard outputcat - concatenate files and print on the standard output不支持这种行为。

不。 cat根本不操作文件的元数据,因此无法使用它将非文本文件合并在一起,除非文件格式已经设计为使用简单的连接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM