Ffmpeg - 比特流过滤器 'aac_adtstoasc' 不支持编解码器 'mp2' (86016)

Ffmpeg - Codec 'mp2' (86016) is not supported by the bitstream filter 'aac_adtstoasc'

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

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

但我能够创建一个剪切的 mp4,其中包含 1 帧和 1/2 秒后的音频剪切。

难道调试源码也是一种方式? 谢谢

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