0

我想使用 raspbian 将 *.mp4 文件流式传输到avconvjustin.tv。我正在使用以下命令来执行此操作:

avconv  -i ./${FILE_TO_STREAM} \
    -vcodec copy \
    -acodec copy \
    -threads 0 \
    -r 24 \
    -f flv rtmp://live-fra.justin.tv/${SECRET_KEY}

我可以在 justin.tv 上短时间观看我的直播,但它的直播速度很快。所以流跳转到文件的另一部分并播放这部分,一段时间后它再次跳转,依此类推。正如您在输出中看到的那样,fps 非常高avconv

frame= 2673 fps=423 q=-1.0 Lsize=    4431kB time=106.58 bitrate= 340.6kbits/s

帧数和时间增长得如此之快,就像在 fps 中看到的那样。我希望我可以用-r 24命令限制 fps,但它仍然在 >200 fps。我能做些什么?

4

1 回答 1

1

通过添加-re作为参数以以本机帧速率读取输入来解决它。

所以这对我有用:

#!/bin/bash
avconv  -re \
    -i ${FILE_TO_STREAM} \
    -threads 0 \
    -vcodec copy \
    -acodec copy \
    -f flv rtmp://live-fra.justin.tv/${SECRET_KEY}
于 2014-05-29T17:28:23.450 回答