Raspberry pi 使用Raspbian上的avconv通过RTMP向justin.tv传输数据速度过快

Raspberry pi 使用Raspbian上的avconv通过RTMP向justin.tv传输数据速度过快,raspberry-pi,rtmp,avconv,justin.tv,Raspberry Pi,Rtmp,Avconv,Justin.tv,我想使用raspbian上的avconv将*.mp4文件流式传输到justin.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上看到我的流很短一段时间,但它的流速度太快了。因此流

我想使用raspbian上的
avconv
将*.mp4文件流式传输到justin.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上看到我的流很短一段时间,但它的流速度太快了。因此流跳转到文件的另一部分并播放这一部分,一段时间后它再次跳转,依此类推。从
avconv
的输出中可以看出,fps非常高,表示:

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

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

通过添加
-re
作为参数以本机帧速率读取输入来解决这个问题

这对我来说很有效:

#!/bin/bash
avconv  -re \
    -i ${FILE_TO_STREAM} \
    -threads 0 \
    -vcodec copy \
    -acodec copy \
    -f flv rtmp://live-fra.justin.tv/${SECRET_KEY}