我正在尝试创建两个流:一个是mpegts流,另一个是从rtmp到Twitch的流。
此命令工作如下:
ffmpeg -threads:v 2 -threads:a 16 -filter_threads 2 -thread_queue_size 16 -y \
-f dshow -video_size 1920x1080 -pixel_format uyvy422 -framerate 25 -rtbufsize 500M -i video="Decklink Video Capture" \
-f dshow -rtbufsize 100M -i audio="Decklink Audio Capture" \
-preset ultrafast -c:v libx264 -tune zerolatency -b:v 900k -map 0:v:0 -f mpegts udp://127.0.0.1:5555 \
-pix_fmt yuv420p -c:v libx264 -crf 20 -tune zerolatency -f flv rtmp://live-fra05.twitch.tv/app/stream_key但它需要双倍的编码CPU能力。
因此,在这之后,我重写了如下命令:
ffmpeg -threads:v 2 -threads:a 16 -filter_threads 2 -thread_queue_size 16 -y \
-f dshow -video_size 1920x1080 -pixel_format uyvy422 -framerate 25 -rtbufsize 500M -i video="Decklink Video Capture" \
-f dshow -rtbufsize 100M -i audio="Decklink Audio Capture" \
-preset ultrafast -c:v libx264 -tune zerolatency -b:v 900k \
-f tee "[select=\'0:v:0\':f=mpegts]udp://127.0.0.1:5555|[select=\'0:v:0,1:a:0\':f=flv]rtmp://live-fra05.twitch.tv/app/stream_key"写-f tee "[select=\'0:v:0\':f=mpegts]udp://127.0.0.1:5555|[select=\'0:v:0,1:a:0\':f=flv]rtmp://live-fra05.twitch.tv/app/stream_key"的意思是:
我得到了错误消息:
Output file #0 does not contain any stream我该怎么解决这个问题?我想我在命令上犯了个错误。
发布于 2020-08-31 11:09:59
如链接所示,必须映射流。
ffmpeg -thread_queue_size 16 -y \
-f dshow -video_size 1920x1080 -pixel_format uyvy422 -framerate 25 -rtbufsize 500M -i video="Decklink Video Capture" \
-f dshow -rtbufsize 100M -i audio="Decklink Audio Capture" \
-map 0:v -map 1:a \
-preset ultrafast -c:v libx264 -tune zerolatency -b:v 900k \
-f tee "[select=\'v:0\':f=mpegts]udp://127.0.0.1:5555|[select=\'v:0,a:0\':f=flv]rtmp://live-fra05.twitch.tv/app/stream_key"在http://ffmpeg.org/ffmpeg-formats.html#tee-1查看tee的完整官方文档
https://stackoverflow.com/questions/63668462
复制相似问题