gpt4 book ai didi

ffmpeg 产生空的 MP4 文件

转载 作者:行者123 更新时间:2023-12-04 23:26:41 25 4
gpt4 key购买 nike

我正在尝试使用 ffmpeg 将 MTS 文件转换为 MP4 文件。似乎该命令运行正确,但生成的文件最终为空。

joshua@joshua-VirtualBox:~$ ffmpeg -i /media/sf_2017-04/SD_044/00007.MTS /media/sf_2017-04/SD_04/000007.mp4
ffmpeg version 0.8.17-4:0.8.17-0ubuntu0.12.04.2, Copyright (c) 2000-2014 the Libav developers
built on Apr 1 2016 14:28:02 with gcc 4.6.3
The ffmpeg program is only provided for script compatibility and will be removed
in a future release. It has been deprecated in the Libav project to allow for
incompatible command line syntax improvements in its replacement called avconv
(see Changelog for details). Please use avconv instead.
Input #0, mpegts, from '/media/sf_2017-04/SD_044/00007.MTS':
Duration: 00:01:17.07, start: 1.927822, bitrate: 25053 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 59.96 fps, 59.94 tbr, 90k tbn, 119.88 tbc
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, stereo, s16, 256 kb/s
Stream #0.2[0x1200]: Data: [144][0][0][0] / 0x0090
File '/media/sf_2017-04/SD_04/000007.mp4' already exists. Overwrite ? [y/N] y
[buffer @ 0x88772a0] w:1920 h:1080 pixfmt:yuv420p
ffmpeg -i /media/sf_2017-04/SD_044/00007.MTS /media/sf_2017-04/SD_04/000007.mp4
ffmpeg version 0.8.17-4:0.8.17-0ubuntu0.12.04.2, Copyright (c) 2000-2014 the Libav developers
built on Apr 1 2016 14:28:02 with gcc 4.6.3
The ffmpeg program is only provided for script compatibility and will be removed
in a future release. It has been deprecated in the Libav project to allow for
incompatible command line syntax improvements in its replacement called avconv
(see Changelog for details). Please use avconv instead.
Input #0, mpegts, from '/media/sf_2017-04/SD_044/00007.MTS':
Duration: 00:01:17.07, start: 1.927822, bitrate: 25053 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 59.96 fps, 59.94 tbr, 90k tbn, 119.88 tbc
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, stereo, s16, 256 kb/s
Stream #0.2[0x1200]: Data: [144][0][0][0] / 0x0090
File '/media/sf_2017-04/SD_04/000007.mp4' already exists. Overwrite ? [y/N] y
[buffer @ 0x88772a0] w:1920 h:1080 pixfmt:yuv420p
encoder 'aac' is experimental and might produce bad results.
Add '-strict experimental' if you want to use it.

最佳答案

在你的 ffmpeg 版本中,ffmpeg 中的 aac 编解码器仍然是实验性的,ffmpeg 自动选择 aac用于输出编解码器,因为您没有使用 -c:a 指定.但是您需要手动启用它。

如输出信息所说,添加额外参数-strict -2-strict experimental将工作。

关于ffmpeg 产生空的 MP4 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43749716/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com