audio - 将音频作为流 0 并将视频作为流 1 可以解释为什么我的 MPG 将在 OSX QuickTime Player 上播放,而不是 Win10 影视?
问题描述
我想要的只是修剪一个视频文件......
我使用 ffmpeg 将 30 分钟的视频+音频文件修剪到我想要的 2 分钟 40 秒。
我修剪的文件在使用 QuickTime Player 的 Mac 上播放良好,但在我的 Win10 盒子上使用默认应用程序(电影和电视?),音频播放良好,但视频是黑色的。
我用ffprobe挖掘。修剪过程似乎也颠倒了流的顺序。也就是说,原始文件的流 0 为视频,流 1 为音频,但修剪后的文件流 0 为音频,流 1 为视频。 这可能是罪魁祸首吗? 这种排序是否足够不寻常,以至于并非所有玩家都可以正确使用它?
修剪前:
ffprobe -hide_banner myfile.mpg
[h264 @ 0000013931b562c0] Increasing reorder buffer to 2
[mpegts @ 0000013931b4fe00] PES packet size mismatch
[mpegts @ 0000013931b4fe00] Packet corrupt (stream = 1, dts = 8467425232).
[mpegts @ 0000013931b4fe00] Could not find codec parameters for stream 2 (Unknown: none ([151][0][0][0] / 0x0097)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'myfile.mpg':
Duration: 00:30:00.63, start: 92282.982578, bitrate: 6249 kb/s
Program 1
Stream #0:0[0x1aab]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
Stream #0:1[0x1abf]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 384 kb/s
Stream #0:2[0x1ac1]: Unknown: none ([151][0][0][0] / 0x0097)
Unsupported codec with id 0 for input stream 2
修剪后:
ffprobe -hide_banner myfile.trimmed.mpg
[h264 @ 00000170c21c69c0] Increasing reorder buffer to 2
Input #0, mpeg, from 'myfile.trimmed.mpg':
Duration: 00:02:41.09, start: 0.500000, bitrate: 6255 kb/s
Stream #0:0[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
Stream #0:1[0x1e2]: Video: h264 (High), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
解决方案
推荐阅读
- html - 如何使用多个
带角 - c - C中的后缀增量和前缀运算符
- python - OpenVPN 连接 - 通过 Python 的状态?[视窗 10]
- c# - Xamarin iOS 可用 WiFi 网络列表
- uwp - 通用 Windows 平台 (UWP) 在 Process.StandardOutput.ReadToEnd 上挂起
- node.js - 为什么我需要在 package.json 上有一个构建脚本才能在 Now 上部署一些东西?我该如何解决?
- node.js - 基于其他字段的 Mongoose 高级模式/动态“设置”字段
- reactjs - Kafka 上的反应 GUI
- c# - 在前一个异步操作完成之前,在此上下文上启动了第二个操作。使用“等待”来确保
- wordpress - 我对 WordPress 结构感到困惑