【发布时间】:2022-01-10 14:41:33
【问题描述】:
我正在使用以下命令在多个输出上进行流式传输,直到 2 个输出都可以正常工作,但是当我添加第三个输出时,它给出了错误-
2 个输出的命令-
ffmpeg_stream = 'ffmpeg -thread_queue_size 1024 -f x11grab -draw_mouse 0 -s 1920x1080 -i :122 -f alsa -i pulse -ac 2 -c:a aac -b:a 64k -threads 0 -flags +global_header -c:v libx264 -pix_fmt yuv420p -s 1920x1080 -threads 0 -f tee -map 0:0 -map 1:0 "[f=flv]rtmps://live-api-s.facebook.com:443/rtmp/stream_key|[f=flv]rtmp://a.rtmp.youtube.com/live2/stream_key"'
3 个输出的命令-
ffmpeg_stream = 'ffmpeg -thread_queue_size 1024 -f x11grab -draw_mouse 0 -s 1920x1080 -i :122 -f alsa -i pulse -ac 2 -c:a aac -b:a 64k -threads 0 -flags +global_header -c:v libx264 -pix_fmt yuv420p -s 1920x1080 -threads 0 -f tee -map 0:0 -map 1:0 -map 2:0 "[f=flv]rtmps://live-api-s.facebook.com:443/rtmp/stream_key|[f=flv]rtmp://a.rtmp.youtube.com/live2/stream_key|[f=flv]rtmp://play.stream.some_domain/stream/i48b-rdq0-jwme-2yj0"'
错误-
liveStreaming | Invalid input file index: 2.
仅自定义 rtmp url 出错-
liveStreaming | [rtmp @ 0x55af7e7f8280] Server error: Already
publishing
liveStreaming | [tee @ 0x55af7e12f540] Slave '[f=flv]rtmp://stream.domain/stream/i48b-rdq0-jwme-2yj0': error opening: Operation not permitted
liveStreaming | [tee @ 0x55af7e12f540] Slave muxer #1 failed, aborting.
liveStreaming | [flv @ 0x55af7e4d1880] Failed to update header with correct duration.
liveStreaming | [flv @ 0x55af7e4d1880] Failed to update header with correct filesize.
liveStreaming | Could not write header for output file #0 (incorrect codec parameters ?): Operation not permitted
liveStreaming | Error initializing output stream 0:1 --
liveStreaming | [aac @ 0x55af7e1346c0] Qavg: -nan
liveStreaming | [alsa @ 0x55af7e111dc0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
liveStreaming | Conversion failed!
谢谢
【问题讨论】:
标签: python-3.x ffmpeg