FFMPEG:转换失败尝试从图像和音频创建facebook流时出错? [英] FFMPEG : Conversion Failed Error when trying trying to create facebook stream from image and audio?

查看:612
本文介绍了FFMPEG:转换失败尝试从图像和音频创建facebook流时出错?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目标是从图像和音频文件创建Facebook的流。

Goal is to create stream for facebook from image and audio file.

这是我的命令:

ffmpeg \
-re -y \
-loop 1 \
-f image2 \
-i ./maxresdefault.jpg \
-i ./audio-loop.mp3 \
-ar 44100 \
-b:a 128k \
-vcodec libx264 \
-vf scale=800:600 \
-b:v 1000k -minrate 1000k -maxrate 1000k -bufsize 500k \
-f flv 'rtmp://rtmp-api.facebook.com:80/rtmp/...'

我收到错误,如:

Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
  Stream #1:0 -> #0:1 (mp3 (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[flv @ 0x1637d00] Packets are not in the proper order with respect to DTSkbits/s    
av_interleaved_write_frame(): Invalid argument   <<< --------
[flv @ 0x1637d00] Failed to update header with correct duration.
[flv @ 0x1637d00] Failed to update header with correct filesize.
frame=   57 fps= 22 q=-1.0 Lsize=    1325kB time=00:01:21.60 bitrate= 133.0kbits/s    
video:26kB audio:1276kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.749549%
[libx264 @ 0x1644760] frame I:1     Avg QP:17.89  size: 26318
[libx264 @ 0x1644760] frame P:14    Avg QP:10.39  size:  7242
[libx264 @ 0x1644760] frame B:42    Avg QP:13.38  size:   118
[libx264 @ 0x1644760] consecutive B-frames:  1.8%  0.0%  0.0% 98.2%
[libx264 @ 0x1644760] mb I  I16..4:  6.7% 61.2% 32.1%
[libx264 @ 0x1644760] mb P  I16..4:  0.2%  0.1%  0.3%  P16..4: 29.3%  2.3%  4.9%  0.0%  0.0%    skip:62.9%
[libx264 @ 0x1644760] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  8.3%  0.0%  0.0%  direct: 0.0%  skip:91.7%  L0: 5.1% L1:94.9% BI: 0.0%
[libx264 @ 0x1644760] 8x8 transform intra:58.0% inter:41.3%
[libx264 @ 0x1644760] coded y,uvDC,uvAC intra: 69.4% 65.4% 52.4% inter: 4.5% 4.2% 2.9%
[libx264 @ 0x1644760] i16 v,h,dc,p: 13% 57% 11% 18%
[libx264 @ 0x1644760] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 27% 10%  4%  6%  7%  7%  6%  8%
[libx264 @ 0x1644760] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 40% 28%  9%  3%  5%  4%  4%  3%  3%
[libx264 @ 0x1644760] i8c dc,h,v,p: 58% 24% 16%  3%
[libx264 @ 0x1644760] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x1644760] ref P L0: 93.5%  0.6%  4.8%  1.1%
[libx264 @ 0x1644760] ref B L0: 69.3% 29.3%  1.5%
[libx264 @ 0x1644760] ref B L1: 95.5%  4.5%
[libx264 @ 0x1644760] kb/s:465.47
Conversion failed!

我一直在搜索约4个小时。我相信这是与声音有关的。

I've been searching for about 4 hours. I believe it's something to do with Sound.

推荐答案

我有同样的问题,最终将我的音频编码切换到libvo_aacenc的libmp3lame ...

I was having the same problem, ended up switching my audio encoding to libvo_aacenc instead of libmp3lame...

我还没有测试音频是否仍然有效,但流不再死亡。

I have not tested if the audio still works however the stream is no longer dying.

这篇关于FFMPEG:转换失败尝试从图像和音频创建facebook流时出错?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆