ffmpeg tee muxer failing with error: Tag avc1 incompatible with output codec id '28'

ffmpeg tee muxer failing with error: Tag avc1 incompatible with output codec id '28'

我可以使用 ffmpeg 将带有 h264 编码视频和 aac 编码音频的 mp4 文件流式传输到 flash flv 输出。我使用的命令是:

ffmpeg -re -i bigbuckbunny_HD_60fps.mp4 -c copy -f flv rtmp://192.168.3.64:1935/main/stream0

当我尝试使用 tee 选项复制输出时,我失败了并出现错误。这是我使用的命令:

ffmpeg -re -i bigbuckbunny_HD_60fps.mp4 -map 0 -c copy -f tee "[f=flv]rtmp://192.168.3.64:1935/main/stream0|[f=flv]rtmp://192.168.3.64:1935/main/stream1"

然而,它失败了。我缺少什么?我从 ffmpeg 得到的输出是:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bigbuckbunny_HD_60fps.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf54.29.104
  Duration: 00:10:34.58, start: 0.000000, bitrate: 4279 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 4141 kb/s, 60 fps, 60 tbr, 90k tbn, 120 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[flv @ 0x24607a0] Tag avc1 incompatible with output codec id '28' ([7][0][0][0])
[tee @ 0x2365260] Slave '[f=flv]rtmp://192.168.3.64:1935/mainconcept/stream0': error writing header: Invalid data found when processing input
[tee @ 0x2365260] Slave muxer #0 failed, aborting.
Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
    Last message repeated 1 times

根据ffmpeg -f tee refuses to do anything useful添加-tag:v 7(或-vtag 7,相同):

ffmpeg -re -i bigbuckbunny_HD_60fps.mp4 -map 0 -c copy -tag:v 7 -f tee "[f=flv]rtmp://192.168.3.64:1935/main/stream0|[f=flv]rtmp://192.168.3.64:1935/main/stream1"

如果出现错误 Tag mp4a incompatible with output codec id '86018' 添加 -tag:a 10 / -atag 10:

ffmpeg -re -i bigbuckbunny_HD_60fps.mp4 -map 0 -c copy -tag:v 7 -tag:a 10 -f tee "[f=flv]rtmp://192.168.3.64:1935/main/stream0|[f=flv]rtmp://192.168.3.64:1935/main/stream1"

相关错误报告是 #6258: tee muxer fails on stream copy