Unix 服务器(ffmpeg)和 Windows 客户端(vlc)之间的视频流传输顺利完成。
服务器端:
ffmpeg -f v4l2 -r 25 -i /dev/video0 http://192.168.1.114:27018/feed1.ffm
客户端:
vlc 播放器:媒体 -> 打开网络流:http://192.168.1.114:27018/test.swf
但是,视频流大约有 10 秒的延迟。因此,我尝试使用 rtp 代替 http,但没有结果。具体来说,在服务器端我运行:
ffmpeg -f v4l2 -r 25 -i /dev/video0 rtp://192.168.1.114:27018/feed1.ffm
流开始后,我在客户端输入:rtp://@:27018
但它没有响应。
我遗漏了什么?还有其他方法可以避免延误吗?
编辑:
vlc 播放器的消息(详细程度:2 调试)(新使用的端口:27020):
main debug: adding item `rtp://:27020' ( rtp://@:27020 )
qt4 debug: Adding a new MRL to recent ones: rtp://@:27020
main debug: processing request item: rtp://:27020, node: null, skip: 0
main debug: rebuilding array of current - root Playlist
main debug: rebuild done - 1 items, index 0
main debug: starting playback of the new playlist item
main debug: resyncing on rtp://:27020
main debug: rtp://:27020 is at 0
main debug: creating new input thread
main debug: Creating an input for 'rtp://:27020'
main debug: meta ok for (null), need to fetch art
main debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua scripts in C:\Users\Demetres\AppData\Roaming\vlc\lua\meta\fetcher
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
main debug: using timeshift granularity of 50 MiB, in path 'C:\Users\Demetres\AppData\Local\Temp'
main debug: `rtp://@:27020' gives access `rtp' demux `' path `@:27020'
main debug: using meta fetcher module "lua"
main debug: creating demux: access='rtp' demux='' location='@:27020' file='\\@:27020'
main debug: removing module "lua"
main debug: searching art for rtp://:27020
main debug: looking for access_demux module matching "rtp": 12 candidates
main debug: looking for art finder module matching "any": 2 candidates
main debug: net: opening any datagram port 27020
lua debug: Trying Lua scripts in C:\Users\Demetres\AppData\Roaming\vlc\lua\meta\art
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
main debug: using access_demux module "rtp"
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
main debug: looking for meta reader module matching "any": 2 candidates
lua debug: Trying Lua scripts in C:\Users\Demetres\AppData\Roaming\vlc\lua\meta\reader
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\reader
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\reader\filename.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
main debug: no meta reader modules matched
main debug: `rtp://@:27020' successfully opened
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
main debug: no art finder modules matched
main debug: art not found for rtp://:27020
qt4 debug: IM: Setting an input