【发布时间】:2015-03-26 02:54:35
【问题描述】:
我有许多 AAC 文件,想将它们连接成一个 AAC 文件。当我在命令行中使用 AVCONV 执行此操作并且我对文件名有所了解时,它可以工作。当我尝试使用包含文件列表的文本文件执行此操作时,它会失败。让我来到这里的是Concatenating media files 的 FFMPEG 教程页面。根据我的尝试,我会得到各种结果,但我找不到任何关于我在语法上做错了什么的信息。
我的文件列表(list.txt在同一目录)...
file 'sr_program_2015_03_23_05_44_01.aac'
file 'sr_program_2015_03_23_07_44_58.aac'
当我按照上面提到的页面上的示例进行操作时,出现错误。我包括了 ffmpeg 和 avconv 的使用,但结果是一样的。
ffmpeg...
ffmpeg -f concat -i list.txt -c copy output
ffmpeg version 0.8.17-6:0.8.17-1, Copyright (c) 2000-2014 the Libav developers
built on Mar 15 2015 17:00:31 with gcc 4.7.2
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.
Unknown input format: 'concat'
avconv...
avconv -f concat -i list.txt -c copy output
avconv version 0.8.17-6:0.8.17-1, Copyright (c) 2000-2014 the Libav developers
built on Mar 15 2015 17:00:31 with gcc 4.7.2
Unknown input format: 'concat'
当我删除“-f”并直接使用文件名时,它可以工作。我不知道为什么。生成的文件也会按预期播放。
avconv -i concat:sr_program_2015_03_23_05_44_01.aac\|sr_program_2015_03_23_07_44_58.aac -c copy output.aac
avconv version 0.8.17-6:0.8.17-1, Copyright (c) 2000-2014 the Libav developers
built on Mar 15 2015 17:00:31 with gcc 4.7.2
[aac @ 0xcb6cc0] channel element 3.5 is not allocated
[aac @ 0xcb4b20] max_analyze_duration reached
[aac @ 0xcb4b20] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from 'concat:sr_program_2015_03_23_05_44_01.aac|sr_program_2015_03_23_07_44_58.aac':
Duration: 01:58:34.29, bitrate: 65 kb/s
Stream #0.0: Audio: aac, 44100 Hz, stereo, s16, 65 kb/s
Output #0, adts, to 'output.aac':
Metadata:
encoder : Lavf53.21.1
Stream #0.0: Audio: aac, 44100 Hz, stereo, 65 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press ctrl-c to stop encoding
size= 57148kB time=7315.03 bitrate= 64.0kbits/s
video:0kB audio:57148kB global headers:0kB muxing overhead 0.000000%
注意到工作方法不使用“-f”选项,我在第一次尝试时再次尝试,得到了一个完全不同的错误。
avconv concat -i list.txt -c copy output.aac
avconv version 0.8.17-6:0.8.17-1, Copyright (c) 2000-2014 the Libav developers
built on Mar 15 2015 17:00:31 with gcc 4.7.2
Unable to find a suitable output format for 'concat'
我想从文件中的文件列表中处理这些“中断流”aac 文件的原因是因为我想从脚本/代码创建列表,然后将其作为日常自动化流程的一部分进行处理。当流中断时,有许多具有相同日期的文件。当一切顺利时,只有一个文件。它每隔一周左右发生一次。我想自动化我通常手动进行的修复。具有讽刺意味的是,当我遇到这种奇怪的行为时,我已经从上面提到的同一页面上的示例中创建了目标文件列表。
我也想知道我做错了什么。我到处都能看到我第一次使用的例子。我已经在运行 debian 但不同架构(arm 和 x86)的两台不同机器上进行了尝试,并收到了相同的结果。
另外,为了确保我拥有最新的 ffmeg,我使用此页面在每个系统上编译它...Compile FFmpeg on Ubuntu, Debian, or Mint
感谢您的宝贵时间。
【问题讨论】:
标签: linux ffmpeg concat aac avconv