gpt4 book ai didi

ffmpeg - 使用 ffmpeg 流式传输到 youtube

转载 作者:行者123 更新时间:2023-12-04 23:11:53 26 4
gpt4 key购买 nike

我正在尝试流式传输到 youtube,但流式运行状况显示没有数据。

ffmpeg -threads:v 2 -threads:a 8 -filter_threads 2 -thread_queue_size 512 \
-i /tmp/thumbs/thumbnail.jpg \
-stream_loop -1 \
-i /tmp/audio/tracks.mp3 \
-filter:v "crop=in_w/2:in_h/2:1920:1280" \
-pix_fmt yuv420p -c:v libx264 -qp:v 19 -profile:v high -rc:v cbr_ld_hq -level:v 4.2 -r:v 60 -g:v 120 -bf:v 3 -refs:v 16 -preset fast -f flv rtmp://a.rtmp.youtube.com/live2/xxx
ffmpeg 显示如下渲染帧:
frame=    1 fps=0.0 q=0.0 size=  236220kB time=04:02:50.73 bitrate= 132.8kbits/s speed=67.3x   
frame= 1 fps=0.0 q=0.0 size= 236872kB time=04:03:30.90 bitrate= 132.8kbits/s speed=67.3x
frame= 1 fps=0.0 q=0.0 size= 237539kB time=04:04:12.02 bitrate= 132.8kbits/s speed=67.3x
frame= 1 fps=0.0 q=0.0 size= 238215kB time=04:04:53.69 bitrate= 132.8kbits/s speed=67.4x
frame= 1 fps=0.0 q=0.0 size= 238869kB time=04:05:34.05 bitrate= 132.8kbits/s speed=67.4x
frame= 1 fps=0.0 q=0.0 size= 239515kB time=04:06:13.83 bitrate= 132.8kbits/s speed=67.4x
frame= 1 fps=0.0 q=0.0 size= 240153kB time=04:06:53.14 bitrate= 132.8kbits/s speed=67.5x
但就 youtube 而言,没有数据被发送过来。
是什么导致这失败?

最佳答案

实时循环读取图像( -loop 1 )( -re ),而不是尽可能快:

-loop 1 -re -i /tmp/thumbs/thumbnail.jpg \

关于ffmpeg - 使用 ffmpeg 流式传输到 youtube,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65602716/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com