我仍在尝试根据http://www.csee.umbc.edu/~pmundur/courses/CMSC691C/lab5-kurose-ross.html中的示例在 Java 中实现 RTSP
现在我已经解决了那里提到的问题:RTSP server java implementation questions :(
我想对此进行更多解释。我使用上面的示例结合 jlibrtp ( http://sourceforge.net/projects/jlibrtp/files/jlibrtp/ ) 来回答 RTSP 请求并启动 RTP/RTCP seccion 并传输数据。
当我将 MJPEG 的有效负载格式设置为 26(如所有工作表所述)或 96(如 gstreamer rtsp 服务器示例在此示例中流式传输 avi-packed mjpeg 时我如何将 mjpeg 文件流式传输为 rtsp)。实际上,有效载荷就像 jpeg 字节一样简单,与数据包分开。https://www.rfc-editor.org/rfc/rfc2435没有实现,所以我发送了可能错误的数据包。由于 VLC 对调试非常友好,我的期望是在日志中的每一帧上看到令人惊讶的正确编码或一些错误消息。但是,什么也没有发生。
请看vlc的输出日志:
vlc rtsp://localhost:6666/autostream -vvv
VLC media player 2.0.3 Twoflower (revision 2.0.2-93-g77aa89e)
[0x652108] main libvlc debug: VLC media player - 2.0.3 Twoflower
[0x652108] main libvlc debug: Copyright © 1996-2012 VLC authors and VideoLAN
[0x652108] main libvlc debug: revision 2.0.2-93-g77aa89e
[0x652108] main libvlc debug: configured with ./configure '--enable-static' '-- build=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security' 'LDFLAGS=-Wl,-z,relro' '--config-cache' '--disable-maintainer-mode' '--disable-silent-rules' '--disable-update-check' '--enable-fast-install' '--prefix=/usr' '--docdir=/usr/share/doc/vlc-nox' '--sysconfdir=/etc' '--with-binary-version=4' '--enable-a52' '--enable-aa' '--enable-bluray' '--enable-bonjour' '--enable-caca' '--enable-dbus' '--enable-dca' '--enable-dirac' '--enable-directfb' '--enable-dvbpsi' '--enable-dvdnav' '--enable-faad' '--enable-flac' '--enable-fluidsynth' '--enable-freetype' '--enable-fribidi' '--enable-gnutls' '--enable-jack' '--enable-kate' '--enable-libass' '--enable-libmpeg2' '--enable-libproxy' '--enable-libxml2' '--enable-lirc' '--enable-live555' '--enable-mad' '--enable-mkv' '--enable-mod' '--enable-mpc' '--enable-mtp' '--enable-mux_ogg' '--enable-ncurses' '--enable-notify' '--enable-ogg' '--enable-oss' '--enable-pulse' '--enable-qt4' '--enable-realrtsp' '--enable-samplerate' '--enable-schroedinger' '--enable-sdl' '--enable-shout' '--enable-skins2' '--enable-smb' '--enable-speex' '--enable-svg' '--enable-taglib' '--enable-theora' '--enable-twolame' '--enable-upnp' '--enable-vcd' '--enable-vcdx' '--enable-vorbis' '--enable-x264' '--enable-zvbi' '--with-kde-solid=/usr/share/kde4/apps/solid/actions/' '--disable-dxva2' '--disable-gnomevfs' '--disable-goom' '--disable-portaudio' '--disable-projectm' '--disable-sqlite' '--disable-telx' '--enable-alsa' '--enable-atmo' '--enable-dc1394' '--enable-dv' '--enable-fbosd' '--enable-libva' '--enable-linsys' '--enable-omxil' '--enable-pvr' '--enable-udev' '--enable-v4l2' '--enable-crystalhd' '--enable-mmx' '--enable-sse' '--disable-neon' '--disable-altivec' 'build_alias=x86_64-linux-gnu'
[0x652108] main libvlc debug: searching plug-in modules
[0x652108] main libvlc debug: loading plugins cache file /usr/lib/vlc/plugins/plugins.dat
[0x652108] main libvlc warning: This doesn't look like a valid plugins cache
[0x652108] main libvlc debug: recursively browsing `/usr/lib/vlc/plugins'
[0x652108] main libvlc debug: saving plugins cache /usr/lib/vlc/plugins/plugins.dat
[0x652108] main libvlc debug: plug-ins loaded: 422 modules
[0x652108] main libvlc debug: opening config file (/home/ilya/.config/vlc/vlcrc)
[0x652108] main libvlc debug: translation test: code is "ru"
[0x652108] main libvlc debug: CPU has capabilities MMX MMXEXT SSE SSE2 SSE3 FPU
[0x652108] main libvlc debug: looking for memcpy module: 4 candidates
[0x652108] main libvlc debug: using memcpy module "memcpymmxext"
[0x688a58] main input debug: Creating an input for 'Медиатека'
[0x688a58] main input debug: Input is a meta file: disabling unneeded options
[0x688a58] main input debug: using timeshift granularity of 50 MiB, in path '/tmp'
[0x688a58] main input debug: `file/xspf-open:///home/ilya/.local/share/vlc/ml.xspf' gives access `file' demux `xspf-open' path `/home/ilya/.local/share/vlc/ml.xspf'
[0x688a58] main input debug: creating demux: access='file' demux='xspf-open' location='/home/ilya/.local/share/vlc/ml.xspf' file='/home/ilya/.local/share/vlc/ml.xspf'
[0x68e978] main demux debug: looking for access_demux module: 3 candidates
[0x68e978] main demux debug: no access_demux module matching "file" could be loaded
[0x68e978] main demux debug: TIMER module_need() : 2.410 ms - Total 2.410 ms / 1 intvls (Avg 2.410 ms)
[0x688a58] main input debug: creating access 'file' location='/home/ilya/.local/share/vlc/ml.xspf', path='/home/ilya/.local/share/vlc/ml.xspf'
[0x6929a8] main access debug: looking for access module: 2 candidates
[0x6929a8] filesystem access debug: opening file `/home/ilya/.local/share/vlc/ml.xspf'
[0x6929a8] main access debug: using access module "filesystem"
[0x6929a8] main access debug: TIMER module_need() : 1.149 ms - Total 1.149 ms / 1 intvls (Avg 1.149 ms)
[0x68f928] main stream debug: Using stream method for AStream*
[0x68f928] main stream debug: starting pre-buffering
[0x68f928] main stream debug: received first data after 25 ms
[0x68f928] main stream debug: pre-buffering done 301 bytes in 0s - 11 KiB/s
[0x68fbb8] main stream debug: looking for stream_filter module: 7 candidates
[0x68fbb8] main stream debug: no stream_filter module matching "any" could be loaded
[0x68fbb8] main stream debug: TIMER module_need() : 1.755 ms - Total 1.755 ms / 1 intvls (Avg 1.755 ms)
[0x68fbb8] main stream debug: looking for stream_filter module: 1 candidate
[0x68fbb8] main stream debug: using stream_filter module "stream_filter_record"
[0x68fbb8] main stream debug: TIMER module_need() : 0.659 ms - Total 0.659 ms / 1 intvls (Avg 0.659 ms)
[0x688a58] main input debug: creating demux: access='file' demux='xspf-open' location='/home/ilya/.local/share/vlc/ml.xspf' file='/home/ilya/.local/share/vlc/ml.xspf'
[0x7f6c18] main demux debug: looking for demux module: 1 candidate
[0x7f6c18] playlist demux debug: using XSPF playlist reader
[0x7f6c18] main demux debug: using demux module "playlist"
[0x7f6c18] main demux debug: TIMER module_need() : 0.905 ms - Total 0.905 ms / 1 intvls (Avg 0.905 ms)
[0x7f74b8] main demux meta debug: looking for meta reader module: 2 candidates
[0x7f74b8] lua demux meta debug: Trying Lua scripts in /home/ilya/.local/share/vlc/lua/meta/reader
[0x7f74b8] lua demux meta debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/reader
[0x7f74b8] lua demux meta debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/reader/filename.luac
[0x7f74b8] lua demux meta debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader
[0x7f74b8] main demux meta debug: no meta reader module matching "any" could be loaded
[0x7f74b8] main demux meta debug: TIMER module_need() : 37.475 ms - Total 37.475 ms / 1 intvls (Avg 37.475 ms)
[0x688a58] main input debug: `file/xspf-open:///home/ilya/.local/share/vlc/ml.xspf' successfully opened
[0x805418] main xml reader debug: looking for xml reader module: 1 candidate
[0x805418] main xml reader debug: using xml reader module "xml"
[0x805418] main xml reader debug: TIMER module_need() : 39.262 ms - Total 39.262 ms / 1 intvls (Avg 39.262 ms)
[0x7f6c18] playlist demux debug: parsed 0 tracks successfully
[0x688a58] main input debug: EOF reached
[0x7f6c18] main demux debug: removing module "playlist"
[0x68fbb8] main stream debug: removing module "stream_filter_record"
[0x6929a8] main access debug: removing module "filesystem"
[0x688a58] main input debug: TIMER input launching for 'Медиатека' : 73.195 ms - Total 73.195 ms / 1 intvls (Avg 73.195 ms)
[0x68e668] main interface debug: looking for interface module: 1 candidate
[0x68e668] main interface debug: using interface module "hotkeys"
[0x68e668] main interface debug: TIMER module_need() : 0.444 ms - Total 0.444 ms / 1 intvls (Avg 0.444 ms)
[0x689f58] main interface debug: looking for interface module: 1 candidate
[0x7f4a98] main playlist debug: playlist threads correctly activated
[0x689f58] main interface debug: using interface module "inhibit"
[0x689f58] main interface debug: TIMER module_need() : 43.720 ms - Total 43.720 ms / 1 intvls (Avg 43.720 ms)
[0x7f4a98] main playlist debug: adding item `rtsp://localhost:6666/autostream' ( rtsp://localhost:6666/autostream )
[0x68b0a8] main interface debug: looking for interface module: 1 candidate
[0x7f4a98] main playlist debug: meta ok for (null), need to fetch art
[0x7f4a98] main playlist debug: rebuilding array of current - root Плейлист
[0x7f4a98] main playlist debug: rebuild done - 1 items, index -1
[0x7f2218000b78] main demux meta debug: looking for meta fetcher module: 1 candidate
[0x7f2218000b78] lua demux meta debug: Trying Lua scripts in /home/ilya/.local/share/vlc/lua/meta/fetcher
[0x7f2218000b78] lua demux meta debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/fetcher
[0x7f2218000b78] lua demux meta debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/fetcher/tvrage.luac
[0x7f2218000b78] main demux meta debug: using meta fetcher module "lua"
[0x7f2218000b78] main demux meta debug: TIMER module_need() : 33.783 ms - Total 33.783 ms / 1 intvls (Avg 33.783 ms)
[0x7f2218000b78] main demux meta debug: removing module "lua"
[0x7f4a98] main playlist debug: searching art for rtsp://localhost:6666/autostream
[0x7f2218005948] main art finder debug: looking for art finder module: 2 candidates
[0x7f2218005948] lua art finder debug: Trying Lua scripts in /home/ilya/.local/share/vlc/lua/meta/art
[0x7f2218005948] lua art finder debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/art
[0x7f2218005948] lua art finder debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/00_musicbrainz.luac
[0x7f2218005948] lua art finder debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/01_googleimage.luac
[0x7f2218005948] lua art finder debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/02_frenchtv.luac
[0x7f2218005948] lua art finder debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/03_lastfm.luac
[0x7f2218005948] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
[0x7f2218005948] main art finder debug: no art finder module matching "any" could be loaded
[0x7f2218005948] main art finder debug: TIMER module_need() : 17.852 ms - Total 17.852 ms / 1 intvls (Avg 17.852 ms)
[0x7f4a98] main playlist debug: art not found for rtsp://localhost:6666/autostream
[0x68b0a8] main interface debug: using interface module "globalhotkeys"
[0x68b0a8] main interface debug: TIMER module_need() : 53.552 ms - Total 53.552 ms / 1 intvls (Avg 53.552 ms)
[0x652108] main libvlc: Запуск vlc с интерфейсом по умолчанию. Используйте 'cvlc' для запуска vlc без интерфейса.
[0x68ba18] main interface debug: looking for interface module: 6 candidates
Fontconfig warning: "/etc/fonts/conf.d/65-droid-sans-fonts.conf", line 103: Having multiple values in <test> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/65-droid-sans-fonts.conf", line 138: Having multiple values in <test> isn't supported and may not work as expected
[0x7f221823c6a8] main generic debug: looking for extension module: 1 candidate
[0x7f221823c6a8] lua generic debug: Opening Lua Extension module
[0x7f221823c6a8] lua generic debug: Trying Lua scripts in /home/ilya/.local/share/vlc/lua/extensions
[0x7f221823c6a8] lua generic debug: Trying Lua scripts in /usr/lib/vlc/lua/extensions
[0x7f221823c6a8] lua generic debug: Trying Lua scripts in /usr/share/vlc/lua/extensions
[0x7f221823c6a8] main generic debug: using extension module "lua"
[0x7f221823c6a8] main generic debug: TIMER module_need() : 0.972 ms - Total 0.972 ms / 1 intvls (Avg 0.972 ms)
[0x68ba18] main interface debug: using interface module "qt4"
[0x68ba18] main interface debug: TIMER module_need() : 10383.488 ms - Total 10383.488 ms / 1 intvls (Avg 10383.488 ms)
[0x7f4a98] main playlist debug: processing request item: null, node: Плейлист, skip: 0
[0x7f4a98] main playlist debug: starting playback of the new playlist item
[0x7f4a98] main playlist debug: resyncing on rtsp://localhost:6666/autostream
[0x7f4a98] main playlist debug: rtsp://localhost:6666/autostream is at 0
[0x7f4a98] main playlist debug: creating new input thread
[0x7f2220000b78] main input debug: Creating an input for 'rtsp://localhost:6666/autostream'
[0x68ba18] qt4 interface debug: IM: Setting an input
[0x7f2220000b78] main input debug: using timeshift granularity of 50 MiB, in path '/tmp'
[0x7f2220000b78] main input debug: `rtsp://localhost:6666/autostream' gives access `rtsp' demux `' path `localhost:6666/autostream'
[0x7f2220000b78] main input debug: creating demux: access='rtsp' demux='' location='localhost:6666/autostream' file='(null)'
[0x7f220c001178] main demux debug: looking for access_demux module: 1 candidate
[0x7f220c001178] live555 demux debug: version 2013.04.30
Opening connection to 127.0.0.1, port 6666...
...remote connection opened
Sending request: OPTIONS rtsp://localhost:6666/autostream RTSP/1.0
CSeq: 2
User-Agent: LibVLC/2.0.8 (LIVE555 Streaming Media v2013.04.30)
Received 158 new bytes of response data.
Received a complete OPTIONS response:
RTSP/1.0 200 OK
CSeq: 2
Public: OPTIONS, PAUSE, PLAY, SETUP, SET_PARAMETER, TEARDOWN
Server: GStreamer RTSP server
Date: Sun, 15 Sep 2013 16:34:40 GMT
Sending request: DESCRIBE rtsp://localhost:6666/autostream RTSP/1.0
CSeq: 3
User-Agent: LibVLC/2.0.8 (LIVE555 Streaming Media v2013.04.30)
Accept: application/sdp
Received 445 new bytes of response data.
Received a complete DESCRIBE response:
RTSP/1.0 200 OK
CSeq: 3
Content-Type: application/sdp
Content-Base: rtsp://localhost:6666/autostream/
Server: GStreamer RTSP server
Date: Sun, 15 Sep 2013 16:34:40 GMT
Content-Length: 248
v=0
o=- 123456 1 IN IP4 127.0.0.1
s=123456
i=rtsp-server
e=NONE
t=0 0
a=tool:GStreamer
a=type:broadcast
a=control:*
a=range:npt=0,000000-119,961667
m=video 59722 RTP/AVP 26
c=IN IP4 127.0.0.1
a=rtpmap:26 JPEG/90000
a=control:stream=0
[0x7f220c001178] live555 demux debug: RTP subsession 'video/JPEG'
Sending request: SETUP rtsp://localhost:6666/autostream/stream=0 RTSP/1.0
CSeq: 4
User-Agent: LibVLC/2.0.8 (LIVE555 Streaming Media v2013.04.30)
Transport: RTP/AVP;unicast;client_port=59722-59723
Received 215 new bytes of response data.
Received a complete SETUP response:
RTSP/1.0 200 OK
CSeq: 4
Transport: RTP/AVP;unicast;client_port=59722-59723;server_port=59721-59722;ssrc=11111111;mode="PLAY"
Server: GStreamer RTSP server
Date: Sun, 15 Sep 2013 16:34:40 GMT
Session: 123456
[0x7f2220000b78] main input debug: selecting program id=0
[0x7f220c001178] live555 demux debug: setup start: 0.000000 stop:119.961670
Sending request: PLAY rtsp://localhost:6666/autostream/ RTSP/1.0
CSeq: 5
User-Agent: LibVLC/2.0.8 (LIVE555 Streaming Media v2013.04.30)
Session: 123456
Range: npt=0.000-
Received 224 new bytes of response data.
Received a complete PLAY response:
RTSP/1.0 200 OK
CSeq: 5
RTP-Info: url=rtsp://localhost:6666/autostream/stream=0;seq=101;rtptime=101
Range: npt=119,961667-119,961667
Server: GStreamer RTSP server
Session: 123456
Date: Sun, 15 Sep 2013 16:34:44 GMT
[0x7f220c001178] live555 demux debug: play start: 119.000000 stop:119.961670
[0x7f220c001178] main demux debug: using access_demux module "live555"
[0x7f220c001178] main demux debug: TIMER module_need() : 5498.564 ms - Total 5498.564 ms / 1 intvls (Avg 5498.564 ms)
[0x7f220c0021f8] main decoder debug: looking for decoder module: 31 candidates
[0x7f220c0021f8] avcodec decoder debug: libavcodec initialized (interface 0x362300)
[0x7f220c0021f8] avcodec decoder debug: trying to use direct rendering
[0x7f220c0021f8] avcodec decoder debug: allowing 3 thread(s) for decoding
[0x7f220c0021f8] avcodec decoder debug: ffmpeg codec (Motion JPEG Video) started
[0x7f220c0021f8] main decoder debug: using decoder module "avcodec"
[0x7f220c0021f8] main decoder debug: TIMER module_need() : 839.572 ms - Total 839.572 ms / 1 intvls (Avg 839.572 ms)
[0x7f220c030e98] main demux meta debug: looking for meta reader module: 2 candidates
[0x7f220c030e98] lua demux meta debug: Trying Lua scripts in /home/ilya/.local/share/vlc/lua/meta/reader
[0x7f220c030e98] lua demux meta debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/reader
[0x7f220c030e98] lua demux meta debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/reader/filename.luac
[0x7f220c030e98] lua demux meta debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader
[0x7f220c030e98] main demux meta debug: no meta reader module matching "any" could be loaded
[0x7f220c030e98] main demux meta debug: TIMER module_need() : 27.457 ms - Total 27.457 ms / 1 intvls (Avg 27.457 ms)
[0x7f2220000b78] main input debug: `rtsp://localhost:6666/autostream' successfully opened
[0x7f220c001178] live555 demux warning: no data received in 10s. Switching to TCP
Sending request: TEARDOWN rtsp://localhost:6666/autostream/ RTSP/1.0
CSeq: 6
User-Agent: LibVLC/2.0.8 (LIVE555 Streaming Media v2013.04.30)
Session: 123456
[0x7f220c0021f8] main decoder debug: removing module "avcodec"
[0x7f220c0021f8] avcodec decoder debug: ffmpeg codec (Motion JPEG Video) stopped
[0x7f220c0021f8] main decoder debug: killing decoder fourcc `MJPG', 0 PES in FIFO
[0x7f2220000b78] main input debug: Program doesn't contain anymore ES
Opening connection to 127.0.0.1, port 6666...
...Connection to server failed: В соединении отказано
Opening connection to 127.0.0.1, port 6666...
...Connection to server failed: В соединении отказано
[0x7f220c001178] live555 demux debug: connection error -115
[0x7f220c001178] live555 demux error: Failed to connect with rtsp://localhost:6666/autostream
[0x7f220c001178] live555 demux error: TCP rollover failed, aborting
[0x7f2220000b78] main input debug: EOF reached
[0x7f220c001178] main demux debug: removing module "live555"
[0x7f4a98] main playlist debug: dead input
[0x7f4a98] main playlist debug: changing item without a request (current 0/1)
[0x7f4a98] main playlist debug: nothing to play
[0x68ba18] qt4 interface debug: IM: Deleting the input
[0x652108] main libvlc debug: exiting
[0x652108] main libvlc debug: deactivating the playlist
[0x7f4a98] main playlist debug: deactivating the playlist
[0x7b6ab8] main playlist export debug: saving Медиатека to file /home/ilya/.local/share/vlc/ml.xspf
[0x7b6ab8] main playlist export debug: looking for playlist export module: 1 candidate
[0x7b6ab8] main playlist export debug: using playlist export module "export"
[0x7b6ab8] main playlist export debug: TIMER module_need() : 10.016 ms - Total 10.016 ms / 1 intvls (Avg 10.016 ms)
[0x7b6ab8] main playlist export debug: removing module "export"
[0x7f4a98] main playlist debug: playlist correctly deactivated
[0x652108] main libvlc debug: removing all services discovery tasks
[0x652108] main libvlc debug: removing all interfaces
[0x68ba18] main interface debug: removing module "qt4"
[0x68ba18] qt4 interface debug: requesting exit...
[0x68ba18] qt4 interface debug: waiting for UI thread...
[0x68ba18] qt4 interface debug: QApp exec() finished
[0x68ba18] qt4 interface debug: Video is not needed anymore
[0x68ba18] qt4 interface debug: Killing extension dialog provider
[0x68ba18] qt4 interface debug: ExtensionsDialogProvider is quitting...
[0x7f221823c6a8] main generic debug: removing module "lua"
[0x7f221823c6a8] lua generic debug: Deactivating all loaded extensions
[0x7f221823c6a8] lua generic debug: All extensions are now deactivated
[0x68b0a8] main interface debug: removing module "globalhotkeys"
[0x689f58] main interface debug: removing module "inhibit"
[0x7f2220000b78] main input debug: TIMER input launching for 'rtsp://localhost:6666/autostream' : 6368.241 ms - Total 6368.241 ms / 1 intvls (Avg 6368.241 ms)
[0x68e668] main interface debug: removing module "hotkeys"
[0x7f4a98] main playlist debug: destroying
[0x652108] main libvlc debug: TIMER ML Load : Total 119.403 ms / 1 intvls (Avg 119.403 ms)
[0x652108] main libvlc debug: TIMER Items array build : Total 0.785 ms / 1 intvls (Avg 0.785 ms)
[0x652108] main libvlc debug: TIMER ML Dump : Total 24.306 ms / 1 intvls (Avg 24.306 ms)
[0x652108] main libvlc debug: removing stats
[0x652108] main libvlc debug: removing module "memcpymmxext"
[0x652108] main libvlc debug: opening config file (/home/ilya/.config/vlc/vlcrc)
请注意,由于 TEARDOWN 消息,服务器已关闭(我的代码仍然很脆弱,现在已经实现)。客户端在 10 秒超时后发送 TEARDOWN -
live555 demux warning: no data received in 10s. Switching to TCP
我已经围绕我的服务器发送到 VLC 客户端的参数进行了修改。一般来说,在每种情况下,我都会遇到相同的错误。唯一的例外是 DESCRIBE 响应发送的 SDP 配置:
Received 438 new bytes of response data.
Received a complete DESCRIBE response:
RTSP/1.0 200 OK
CSeq: 3
Content-Type: application/sdp
Content-Base: rtsp://localhost:6666/autostream/
Server: GStreamer RTSP server
Date: Sun, 15 Sep 2013 17:10:47 GMT
Content-Length: 241
v=0
o=- 123456 1 IN IP4 127.0.0.1
s=123456
i=rtsp-server
e=NONE
t=0 0
a=tool:GStreamer
a=type:broadcast
a=control:*
a=range:npt=0,000000-119,961667
m=audio 0 RTP/AVP 0
c=IN IP4 127.0.0.1
a=rtpmap:0 PCMU/8000
a=control:stream=0
[0x7f13140013f8] live555 demux debug: RTP subsession 'audio/PCMU'
Sending request: SETUP rtsp://localhost:6666/autostream/stream=0 RTSP/1.0
CSeq: 4
User-Agent: LibVLC/2.0.8 (LIVE555 Streaming Media v2013.04.30)
Transport: RTP/AVP;unicast;client_port=49584-49585
有效载荷类型 0,PCMU/8000。对于这种情况,我可能错误的 MJPEG RTP 数据包被解释为正确的音频;流媒体开始并产生一些嘈杂的声音。请注意,如果我将音频 0(0 表示客户端建议的端口)替换为某个特定的端口号,则相同的配置不起作用。
[0x7f13140013f8] live555 demux debug: play start: 119.000000 stop:119.961670
[0x7f13140013f8] main demux debug: using access_demux module "live555"
[0x7f13140013f8] main demux debug: TIMER module_need() : 4273.737 ms - Total 4273.737 ms / 1 intvls (Avg 4273.737 ms)
[0x7f1314002c38] main decoder debug: looking for decoder module: 31 candidates
[0x7f1314002c38] araw decoder debug: samplerate:8000Hz channels:1 bits/sample:8
[0x7f1314002c38] main decoder debug: using decoder module "araw"
[0x7f1314002c38] main decoder debug: TIMER module_need() : 18.290 ms - Total 18.290 ms / 1 intvls (Avg 18.290 ms)
[0x7f131400d3d8] main demux meta debug: looking for meta reader module: 2 candidates
[0x7f131400d3d8] lua demux meta debug: Trying Lua scripts in /home/ilya/.local/share/vlc/lua/meta/reader
[0x7f131400d3d8] lua demux meta debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/reader
[0x7f131400d3d8] lua demux meta debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/reader/filename.luac
[0x7f131400d3d8] lua demux meta debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader
[0x7f131400d3d8] main demux meta debug: no meta reader module matching "any" could be loaded
[0x7f131400d3d8] main demux meta debug: TIMER module_need() : 2.056 ms - Total 2.056 ms / 1 intvls (Avg 2.056 ms)
[0x7f131c000b78] main input debug: `rtsp://localhost:6666/autostream' successfully opened
[0x19b1a98] main playlist debug: creating audio output
[0x7f131c000b78] main input debug: Buffering 0%
[0x7f1304000958] main audio output debug: looking for audio output module: 3 candidates
[0x7f1304000958] pulse audio output debug: using mono channel map
[0x7f1304000958] pulse audio output debug: using library version 2.0.0
[0x7f1304000958] pulse audio output debug: (compiled with version 4.0.0, protocol 28)
[0x7f131c000b78] main input debug: Buffering 0%
[0x7f131c000b78] main input debug: Buffering 0%
[0x7f131c000b78] main input debug: Buffering 0%
[0x7f131c000b78] main input debug: Buffering 0%
[0x7f131c000b78] main input debug: Buffering 0%
[0x7f131c000b78] main input debug: Buffering 0%
因此,如果有人可以建议我如何指定发送的 SDP 数据以使 VLC 使用有效负载类型 26 或 96,请提供帮助。或者,它可能忽略了一些仅对 MJPEG 而不是对幕后 PCMU 需要的 RTP/RTCP 请求,只是给出调查的方向。