1

首先我会告诉你我的要求,然后我会告诉你我做了什么。

我是媒体流的菜鸟,我正在学习,我对此感到非常困惑。

基本上我想做以下事情

1:移动应用程序将通过 URL(在我的笔记本电脑上)在服务器上流式传输视频 2:我的笔记本电脑应该运行 ffserver/ffmpeg,它存储来自移动应用程序的视频流并允许其他客户端观看(这里我在谈论VLC 作为客户端)。

所以这是我的要求。

我在笔记本电脑上运行 ffserver

我的 ff 服务器配置如下:

HTTPPort 8090
HTTPBindAddress 0.0.0.0

RTSPPort 8091
RTSPBindAddress 0.0.0.0


MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000
CustomLog -

#NoDaemon

<Feed feed1.ffm>
    File /tmp/feed1.ffm
    FileMaxSize 200K
    ACL allow 127.0.0.1
</Feed>

# if you want to use mpegts format instead of flv
# then change "live.flv" to "live.ts"
# and also change "Format flv" to "Format mpegts"
<Stream live.flv>
    Format flv
    Feed feed1.ffm

    VideoCodec libx264
    VideoFrameRate 30
    VideoBitRate 512
    VideoSize 320x240
    AVOptionVideo crf 23
    AVOptionVideo preset medium
    # for more info on crf/preset options, type: x264 --help
    AVOptionVideo flags +global_header

    AudioCodec aac
    Strict -2
    AudioBitRate 128
    AudioChannels 2
    AudioSampleRate 44100
    AVOptionAudio flags +global_header
</Stream>

##################################################################
# Special streams
##################################################################
<Stream stat.html>
    Format status
    # Only allow local people to get the status
    ACL allow localhost
    ACL allow 192.168.0.0 192.168.255.255
</Stream>

# Redirect index.html to the appropriate site
<Redirect index.html>
    URL http://www.ffmpeg.org/
</Redirect>
##################################################################

比我将以下网址添加到我的移动应用程序来流式传输视频。rtsp://:8091/feed1.ffm 我的移动应用程序开始流式传输我的移动开发团队说。但是我在 ffserver 上没有任何日志,当我弯腰流式传输 TEARDOWN 请求时

[TEARDOWN] "rtsp://192.168.1.57:8091/feed1.ffm RTSP/1.0" 200 7034

到目前为止,我已经这样做了,我不知道如何将 ffmpeg 与实时流媒体一起使用。请告诉我一些例子。

我无法在 VLC 客户端上观看直播。还告诉我应该在 VLC 中输入什么 URL 进行流式传输,我几乎尝试了所有 url 组合。

还有一件事我想用 RTSP 协议做。

我认为此信息将帮助您了解我的要求。

4

0 回答 0