【问题标题】:FFMPEG - Could not find tag for codec pcm_s16le in stream #0, codec not currently supported in containerFFMPEG - 在流 #0 中找不到编解码器 pcm_s16le 的标记,容器中当前不支持编解码器
【发布时间】:2021-10-03 00:45:57
【问题描述】:

我正在使用以下命令提取单声道 44K .M4A 音频文件的一部分;

 ffmpeg -ss 00:00:01 -i input.m4a -t 00:00:03 -c:a copy output.m4a 

但我收到以下错误;

  Trailing option(s) found in the command: may be ignored.
  Guessed Channel Layout for Input Stream #0.0 : mono
  Input #0, wav, from 'input.m4a':
  Duration: 00:00:01.95, bitrate: 705 kb/s
  Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s
  [ipod @ 00000222e439ca00] Could not find tag for codec pcm_s16le in stream #0, codec not currently supported in container
  Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
  Error initializing output stream 0:0 --
  Stream mapping:
  Stream #0:0 -> #0:0 (copy)

我注意到 FFMPEG 猜测我的文件是 wav 但这很奇怪,因为我认为它是 .M4A 。那么 FFMPEG 是否错误地猜测我的输入是 wav 文件并因此产生错误?

【问题讨论】:

    标签: audio ffmpeg wav codec m4a


    【解决方案1】:

    这似乎是解决方案;

      ffmpeg -ss 00:00:01 -i input.m4a -t 00:00:03 -c:a aac output.m4a 
    

    但我仍然想知道为什么我的 .m4a 文件被检测为 wav。

    【讨论】:

    • 因为它是 WAV,扩展名不正确。
    • 最后的-ss 00:00:03是什么意思?
    • 谢谢!这很方便知道。 M4a 文件来自似乎正在输出 WAV 文件的录音机。我想我得调查一下录音机。
    • 顺便说一句,我创建了一个新问题来解决 WAV 问题。 stackoverflow.com/questions/68542728/…
    猜你喜欢
    • 2018-05-09
    • 1970-01-01
    • 1970-01-01
    • 2021-10-24
    • 2021-03-01
    • 2019-12-23
    • 2011-11-12
    • 2017-08-24
    • 2014-05-25
    相关资源
    最近更新 更多