【问题标题】:Ffmpeg - Codec 'mp2' (86016) is not supported by the bitstream filter 'aac_adtstoasc'Ffmpeg - 比特流过滤器“aac_adtstoasc”不支持编解码器“mp2”(86016)
【发布时间】:2019-10-28 11:03:13
【问题描述】:

我正在尝试使用以下语法将视频流转储到本地文件:

ffmpeg -i "http://test.com/videoxxx" -c copy -bsf:v aac_adtstoasc -t 10 c:\\temp\\out.mp4 -loglevel debug

它工作得很好,但最近我遇到了特定错误:

[mpegts @ 00000232c9568f40] DTS 165134700 < 165199500 out of order
[mpegts @ 00000232c9568f40] Non-increasing DTS in stream 0: packet 249 with DTS 165199500, packet 250 with DTS 165134700
[mpegts @ 00000232c9568f40] Continuity check failed for pid 0 expected 12 got 11
[mpegts @ 00000232c9568f40] Continuity check failed for pid 4096 expected 12 got 11
[h264 @ 00000232c9571980] ct_type:0 pic_struct:1
[mpegts @ 00000232c9568f40] Continuity check failed for pid 256 expected 8 got 10
[mpegts @ 00000232c9568f40] Continuity check failed for pid 17 expected 10 got 5
[mpegts @ 00000232c9568f40] Continuity check failed for pid 257 expected 2 got 12
[mpegts @ 00000232c9568f40] PES packet size mismatch
[mpegts @ 00000232c9568f40] Non-increasing DTS in stream 1: packet 207 with DTS 165121380, packet 208 with DTS 164212020
[mpegts @ 00000232c9568f40] max_analyze_duration 5000000 reached at 5016000 microseconds st:1
[mpegts @ 00000232c9568f40] After avformat_find_stream_info() pos: 799667 bytes read:822628 seeks:0 frames:463
Input #0, mpegts, from 'http://test.com/videoxxx':
  Duration: N/A, start: 1824.578000, bitrate: N/A
  Program 1 
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100], 252, 1/90000: Video: h264 (High), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg, top first, left), 720x576 [SAR 16:11 DAR 20:11], 0/1, 25 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101](pol), 211, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 192 kb/s
Successfully opened the file.
Parsing a group of options: output url c:\temp\out.mp4.
Applying option c (codec name) with argument copy.
Applying option bsf:a (A comma-separated list of bitstream filters) with argument aac_adtstoasc.
Applying option t (record or transcode "duration" seconds of audio/video) with argument 30.
Successfully parsed a group of options.
Opening an output file: c:\temp\out.mp4.
[file @ 00000232ca120e80] Setting default whitelist 'file,crypto'
Successfully opened the file.
[AVBSFContext @ 00000232ca6e5780] Codec 'mp2' (86016) is not supported by the bitstream filter 'aac_adtstoasc'. Supported codecs are: aac (86018) 
Error initializing bitstream filter: aac_adtstoasc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
    Last message repeated 1 times
[AVIOContext @ 00000232c95ecfc0] Statistics: 0 seeks, 0 writeouts
[AVIOContext @ 00000232c9574780] Statistics: 822628 bytes read, 0 seeks

是否可以使用特定的 FFMPEG 命令来避免比特流过滤器问题? 我试过了:

-vcodec copy -t 20 c:\\temp\\out.mp4 -loglevel debug

和:

c:a copy -t 10 c:\\temp\\out.mp4 -loglevel debug

但我可以在 1/2 秒后创建具有 1 帧和音频剪辑的剪辑 mp4。

也是调试源码的一种方式吗? 谢谢

【问题讨论】:

    标签: ffmpeg bitstream


    【解决方案1】:

    顾名思义,aac_adtstoasc 仅用于带有 ADTS 标头的 AAC 音频流,例如 MPEG-2 TS 容器中的 AAC 或原始 ADTS AAC。预先探测输入格式以决定是否添加过滤器。它也应该是-bsf:a 而不是v

    【讨论】:

    • 除非禁用*,复用器将自动插入相关的 BSF。 *或使用tee。所以不需要手动指定。
    • 嗨@gyan,你所说的“tee”到底是什么意思?我可以在命令行中插入任何特定语法吗?谢谢
    • 你不需要设置-bsf:a aac_adtstoasc。 ffmpeg 会在适用时为您完成。
    猜你喜欢
    • 1970-01-01
    • 2021-10-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-03
    • 1970-01-01
    • 1970-01-01
    • 2019-05-21
    相关资源
    最近更新 更多