RTSP/RTP to HTTP/TS Gateway

About encoding, codec settings, muxers and filter usage
maersk
Blank Cone
Blank Cone
Posts: 14
Joined: 17 Jan 2006 01:04

RTSP/RTP to HTTP/TS Gateway

Postby maersk » 07 Mar 2008 13:47

Hi.

I was wondering if VLC can be setup as a gateway between a Darwin Streaming Server seving live H.264/AAC streams through RTSP requests and a player/stb requirering the stream encapsulated in MPEG-2 TS over HTTP progressive download.

The answer is yes, it can be done, but can it be done i a way where VLC does not decode and encode the streams ?
Ideally, VLC should "ONLY" handle RTSP protocol, strip off RTP headers and add TS headers and then make the stream available on its HTTP interface with PAT/PMT table added. Is this really possbile, just to use it as a transport container converter and protocol converter and not use the decode/encode part of it all ?

Kind regards

Peter MM

Rémi Denis-Courmont
Developer
Developer
Posts: 15221
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: RTSP/RTP to HTTP/TS Gateway

Postby Rémi Denis-Courmont » 07 Mar 2008 15:29

Yes. VLC will only decode the content as needed. If you use stream output, it will demux from RTP and remultiplex to TS, but it won't touch the elementary streams.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

maersk
Blank Cone
Blank Cone
Posts: 14
Joined: 17 Jan 2006 01:04

Re: RTSP/RTP to HTTP/TS Gateway

Postby maersk » 07 Mar 2008 16:33

Hmm, rather cool.

Damn, VLC is good. :D

Now I just have to figure out how. Still compiling source for Linux.

Something like

vlc rtsp://someserver/somepath.sdp --sout 'std{access=http,mux=ts,dst=192.168.1.1:8000}'

Can it be that simple ? How does vlc in that case know that it only have to demux the rtsp/rtp streams and not also decode them ? I must have forgoten something.

Kind regards

P

Rémi Denis-Courmont
Developer
Developer
Posts: 15221
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: RTSP/RTP to HTTP/TS Gateway

Postby Rémi Denis-Courmont » 07 Mar 2008 16:40

If 192.168.1.1 is the server address. it is usually simpler to just put "dst=:8000".

VLC knows because you use the --sout option in the first place. Then it takes the elemetary streams straight out of the RTSP demuxer out to the "std" stream output module, which just connects the TS muxer with the HTTP network output. Note that this will only work if the elementary streams received from RTSP/RTP are supported by MPEG-TS.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

maersk
Blank Cone
Blank Cone
Posts: 14
Joined: 17 Jan 2006 01:04

Re: RTSP/RTP to HTTP/TS Gateway

Postby maersk » 12 Mar 2008 16:11

Hi.

Something must be wrong in either the gateway end or the playing end. Well actually, maybe not, but something is missing though.

For the MPEG-4 part example I set things up in the gateway like this.

# vlc -vvv rtsp://192.168.1.1/test1.sdp --sout '#std{access=http,mux=ts,dst=:8100}' 2>&1 |tee log

In the other end, I just try to play http://192.168.1.2:8100, but the player says it awaits the VOL header.

Hmm, the VOL header is missing from the stream source to keep bandwidth down and because it is part of the description found in the test1.sdp and the player can play the rtsp stream directly. So in principle no need to include the VOL header in the rtsp based rtp stream.

Is there a way to tell the TS-muxer to add the VOL header to the stream at regular intervals ?

I assume the VOL header can not be added to the initial http header reply in any standardized way ....

(one more good argument to use RTSP ;-)

Kind regards

Peter

PS. Here is the output from the vlc rtsp2http gateway.
VLC media player 0.8.6e Janus
[00000001] main private debug: checking builtin modules
[00000001] main private debug: checking plugin modules
[00000001] main private debug: loading plugins cache file /root/.vlc/cache/plugins-04041e.dat
[00000001] main private debug: recursively browsing `modules'
[00000001] main private debug: recursively browsing `/usr/local/depot/2.6.20.6-i686/vlc-0.8.6e/lib/vlc'
[00000001] main private debug: recursively browsing `plugins'
[00000001] main private debug: module bank initialized, found 211 modules
[00000001] main private warning: Unable to get HAL device properties
[00000001] main private debug: opening config file /root/.vlc/vlcrc
[00000001] main private debug: CPU has capabilities 486 586 MMX MMXEXT SSE SSE2 FPU
[00000001] main private debug: looking for memcpy module: 3 candidates
[00000001] main private debug: using memcpy module "memcpymmxext"
[00000524] main playlist debug: waiting for thread completion
[00000524] main playlist debug: thread 3080936336 (playlist) created at priority 0 (playlist/playlist.c:184)
[00000525] main private debug: waiting for thread completion
[00000525] main private debug: thread 3072547728 (preparser) created at priority 0 (playlist/playlist.c:210)
[00000526] main interface debug: looking for interface module: 1 candidate
[00000526] main interface debug: using interface module "hotkeys"
[00000526] main interface debug: thread 3064159120 (interface) created at priority 0 (interface/interface.c:231)
[00000528] main interface debug: looking for interface module: 1 candidate
[00000528] main interface debug: using interface module "screensaver"
[00000528] main interface debug: thread 3055770512 (interface) created at priority 0 (interface/interface.c:231)
[00000524] main playlist debug: adding playlist item `rtsp://www.optimalstream.net/sdp/bbcw.sdp' ( rtsp://192.168.1.1/test1.sdp )
[00000530] main interface debug: looking for interface module: 3 candidates
[00000530] main interface debug: using interface module "wxwidgets"
[00000530] main interface debug: thread 3033111440 (manager) created at priority 0 (interface/interface.c:216)
[00000530] wxwidgets interface debug: Using last windows config '(-1,0,0,1440,900)(0,657,237,389,82)(2,605,367,410,560)(6,0,0,-1,150)'
[00000530] wxwidgets interface debug: id=0 p=(657,237) s=(389,82)
[00000530] wxwidgets interface debug: id=2 p=(605,367) s=(410,560)
[00000530] wxwidgets interface debug: id=6 p=(0,0) s=(-1,150)
[00000524] main playlist debug: nothing requested, starting
[00000524] main playlist debug: creating new input thread
[00000533] main input debug: waiting for thread completion
[00000533] main input debug: creating statistics handler
[00000535] main stream output debug: stream=`std'
[00000536] main private debug: looking for sout stream module: 1 candidate
[00000536] main private debug: set sout option: sout-standard-access to http
[00000536] main private debug: set sout option: sout-standard-mux to ts
[00000536] main private debug: set sout option: sout-standard-dst to :8100
[00000536] stream_out_standard private debug: creating `http/ts://:8100'
[00000536] stream_out_standard private debug: using `http/ts://:8100'
[00000538] main private debug: looking for sout access module: 1 candidate
[00000538] main private: creating httpd
[00000538] main private debug: net: listening to port 8100
[00000533] main input debug: thread 3011750800 (input) created at priority 0 (input/input.c:265)
[00000538] main private debug: socket error: Address family not supported by protocol
[00000541] main http server debug: thread 3003333520 (httpd host thread) created at priority 0 (network/httpd.c:1078)
[00000538] main private debug: using sout access module "access_output_http"
[00000536] stream_out_standard private debug: access opened
[00000542] main private debug: looking for sout mux module: 1 candidate
[00000542] mux_ts private debug: shaping=200000 pcr=70000 dts_delay=400000
[00000542] main private debug: using sout mux module "mux_ts"
[00000535] main stream output debug: muxer support adding stream at any time
[00000536] stream_out_standard private debug: mux opened
[00000536] main private debug: using sout stream module "stream_out_standard"
[00000533] main input debug: `rtsp://192.168.1.1/test1.sdp' gives access `rtsp' demux `' path `192.168.1.1/test1.sdp'
[00000533] main input debug: creating demux: access='rtsp' demux='' path='192.168.1.1/test1.sdp'
[00000543] main demuxer debug: looking for access_demux module: 1 candidate
Sending request: OPTIONS rtsp://192.168.1.1/test1.sdp RTSP/1.0^M
CSeq: 1^M
User-Agent: VLC media player (LIVE555 Streaming Media v2008.02.08)^M
^M

Received OPTIONS response: RTSP/1.0 200 OK^M
Server: DSS/5.0.1.1 (Build/464.1.1; Platform/Linux; Release/5; )^M
Cseq: 1^M
Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, ANNOUNCE, SET_PARAMETER, RECORD^M
^M

Sending request: DESCRIBE rtsp://192.168.1.1/test1.sdp RTSP/1.0^M
CSeq: 2^M
Accept: application/sdp^M
User-Agent: VLC media player (LIVE555 Streaming Media v2008.02.08)^M
^M

Received DESCRIBE response: RTSP/1.0 200 OK^M
Server: DSS/5.0.1.1 (Build/464.1.1; Platform/Linux; Release/5; )^M
Cseq: 2^M
Cache-Control: no-cache^M
Content-length: 1219^M
Date: Wed, 12 Mar 2008 14:51:12 GMT^M
Expires: Wed, 12 Mar 2008 14:51:12 GMT^M
Content-Type: application/sdp^M
x-Accept-Retransmit: our-retransmit^M
x-Accept-Dynamic-Rate: 1^M
Content-Base: rtsp://192.168.1.1/test1.sdp/^M
^M

Need to read 1219 extra bytes
Read 1219 extra bytes: v=0^M
o=- 1140059519094059 1140059519094059 IN IP4 192.168.2.1^M
s=bbcw.sdp^M
e=NONE^M
c=IN IP4 0.0.0.0^M
t=0 0^M
a=mpeg4-iod: "data:application/mpeg4-iod;base64,AoCAgy4AT///D/T/A4CAgHkAyUBGZGF0YTphcHBsaWNhdGlvbi9tcGVnNC1iaWZzLWF1O2Jhc2U2NCx3QkFTZ1RBcUJXMG1FRUg4QUFBQi9BQU
FCRUtDS0NuNASAgIAVAg0AABgAAADAAAAAwAWAgIADAABgBoCAgBAARAAAAAAAAAAAAAAAAAADA4CAgiQAZUD0ZGF0YTphcHBsaWNhdGlvbi9tcGVnNC1vZC1hdTtiYXNlNjQsQVlDQWdSY0JnSUNBT0FLZkE0
Q0FnREVBQ2dBRWdJQ0FGRUFWQUNNb0FBRVpRQUFCR1VBRmdJQ0FBaEdRQm9DQWdCQUFSQUFBQUFBQUFBQUFBQUFBQUFBREFZQ0FnRlVGSHdPQWdJQk9BQlFBQklDQWdERWdFUUxvb1FBWFJRZ0FGMFVJQllDQW
dCOEFBQUd3OUFBQUFiVUpBQUFCQUFBQUFTQUF2Q0FXeEFCbkREd1JJRkdQQm9DQWdCQUFSQUFBQUFBQUFBQUFBQUFBQUFBRASAgIASAQUAAJwAAATgAAAE4AWAgIAABoCAgBAARAAAAAAAAAAAAAAAAAAD"^M
a=isma-compliance:1,1.0,1^M
a=control:*^M
m=video 0 RTP/AVP 96^M
b=AS:1525^M
a=rtpmap:96 MP4V-ES/90000^M
a=fmtp:96 profile-level-id=244; config=000001b0f4000001b509000001000000012000bc2016c400670c3c1120518f;^M
a=mpeg4-esid:20^M
a=control:trackID=1^M
m=audio 0 RTP/AVP 97^M
b=AS:72^M
a=rtpmap:97 mpeg4-generic/48000^M
a=fmtp:97 streamtype=5; profile-level-id=15; mode=AAC-hbr; config=1190; SizeLength=13; IndexLength=3; IndexDeltaLength=3; Profile=1;^M
a=mpeg4-esid:10^M
a=control:trackID=2^M

[00000543] live555 demuxer debug: RTP subsession 'video/MP4V-ES'
Sending request: SETUP rtsp://192.168.1.1/test1.sdp/trackID=1 RTSP/1.0^M
CSeq: 3^M
Transport: RTP/AVP;unicast;client_port=32852-32853^M
User-Agent: VLC media player (LIVE555 Streaming Media v2008.02.08)^M
^M

Received SETUP response: RTSP/1.0 200 OK^M
Server: DSS/5.0.1.1 (Build/464.1.1; Platform/Linux; Release/5; )^M
Cseq: 3^M
Cache-Control: no-cache^M
Session: 4331850899295520966^M
Date: Wed, 12 Mar 2008 14:52:11 GMT^M
Expires: Wed, 12 Mar 2008 14:52:11 GMT^M
Transport: RTP/AVP;unicast;client_port=32852-32853;source=192.168.1.1;server_port=6972-6973;ssrc=43EA3694^M
^M

[00000543] live555 demuxer debug: RTP subsession 'audio/MPEG4-GENERIC'
Sending request: SETUP rtsp://192.168.1.1/test1.sdp/trackID=2 RTSP/1.0^M
CSeq: 4^M
Transport: RTP/AVP;unicast;client_port=32854-32855^M
Session: 4331850899295520966^M
User-Agent: VLC media player (LIVE555 Streaming Media v2008.02.08)^M
^M

Received SETUP response: RTSP/1.0 200 OK^M
Server: DSS/5.0.1.1 (Build/464.1.1; Platform/Linux; Release/5; )^M
Cseq: 4^M
Session: 4331850899295520966^M
Cache-Control: no-cache^M
Date: Wed, 12 Mar 2008 14:51:12 GMT^M
Expires: Wed, 12 Mar 2008 14:51:12 GMT^M
Transport: RTP/AVP;unicast;client_port=32854-32855;source=192.168.1.1;server_port=6970-6971;ssrc=1B8CD501^M
^M

Sending request: PLAY rtsp://192.168.1.1/test1.sdp/ RTSP/1.0^M
CSeq: 5^M
Session: 4331850899295520966^M
Range: npt=0.000-^M
User-Agent: VLC media player (LIVE555 Streaming Media v2008.02.08)^M
^M

Received PLAY response: RTSP/1.0 200 OK^M
Server: DSS/5.0.1.1 (Build/464.1.1; Platform/Linux; Release/5; )^M
Cseq: 5^M
Session: 4331850899295520966^M
RTP-Info: url=trackID=1,url=trackID=2^M
^M

[00000533] main input debug: selecting program id=0
[00000543] main demuxer debug: using access_demux module "live555"
[00000544] main packetizer debug: looking for packetizer module: 16 candidates
[00000544] packetizer_mpeg4video packetizer debug: opening with vol size: 32
[00000544] main packetizer debug: using packetizer module "packetizer_mpeg4video"
[00000533] main input debug: stream out mode -> no decoder thread
[00000533] main input debug: audio is disabled, not selecting ES 0x1
[00000533] main input debug: starting in sync mode
[00000533] main input debug: `rtsp://192.168.1.1/test1.sdp' successfully opened
[00000535] main stream output debug: adding a new input
[00000542] main private debug: adding a new input
[00000542] mux_ts private debug: adding input codec=mp4v pid=68
[00000542] mux_ts private debug: new PCR PID is 68
[00000542] main private warning: late buffer for mux input (1205333462170075)
[00000542] mux_ts private warning: packet with too strange dts (dts=1205333463936789,old=560000,pcr=560000)
[00000543] live555 demuxer debug: tk->rtpSource->hasBeenSynchronizedUsingRTCP()
[00000542] mux_ts private warning: packet with too strange dts (dts=1205336464904211,old=1205333466776789,pcr=1205333466776789)
[00000541] main http server debug: Connection from 130.226.208.170
[00000543] live555 demuxer debug: tk->rtpSource->hasBeenSynchronizedUsingRTCP()
[00000542] mux_ts private warning: packet with too strange dts (dts=1205333472966086,old=1205336470729259,pcr=1205336470729259)


Player debug output

main debug: CPU has capabilities 486 586 MMX MMXEXT SSE SSE2 FPU
main debug: looking for memcpy module: 3 candidates
main debug: using memcpy module "memcpymmxext"
main debug: waiting for thread completion
main debug: thread 3744 (playlist) created at priority 0 (playlist/playlist.c:184)
main debug: waiting for thread completion
main debug: thread 3760 (preparser) created at priority 0 (playlist/playlist.c:210)
main debug: looking for interface module: 1 candidate
main debug: using interface module "hotkeys"
main debug: thread 3784 (interface) created at priority 0 (interface/interface.c:231)
main debug: adding playlist item `C:\Documents and Settings\Administrator\Desktop\HTTP Streams.m3u' ( C:\Documents and Settings\Administrator\Desktop\HTTP Streams.m3u )
main debug: looking for interface module: 3 candidates
main debug: using interface module "wxwidgets"
main debug: thread 3816 (manager) created at priority 0 (interface/interface.c:216)
wxwidgets debug: Using last windows config '(-1,0,0,1440,900)(0,174,69,355,105)(2,132,174,981,587)(6,0,0,-1,150)'
wxwidgets debug: id=0 p=(174,69) s=(355,105)
wxwidgets debug: id=2 p=(132,174) s=(981,587)
wxwidgets debug: id=6 p=(0,0) s=(-1,150)
main debug: nothing requested, starting
main debug: creating new input thread
main debug: waiting for thread completion
main debug: thread 3952 (input) created at priority 1 (input/input.c:265)
main debug: creating statistics handler
main debug: drive letter C: found in source
main debug: `C:\Documents and Settings\Administrator\Desktop\HTTP Streams.m3u' gives access `' demux `' path `C:\Documents and Settings\Administrator\Desktop\HTTP Streams.m3u'
main debug: creating demux: access='' demux='' path='C:\Documents and Settings\Administrator\Desktop\HTTP Streams.m3u'
main debug: looking for access_demux module: 1 candidate
main debug: creating access '' path='C:\Documents and Settings\Administrator\Desktop\HTTP Streams.m3u'
main debug: looking for access2 module: 5 candidates
vcd debug: trying .cue file: C:\Documents and Settings\Administrator\Desktop\HTTP Streams.cue
vcd debug: could not find .cue file
access_file debug: opening file `C:\Documents and Settings\Administrator\Desktop\HTTP Streams.m3u'
main debug: using access2 module "access_file"
main debug: pre-buffering...
main debug: received first data for our buffer
main debug: creating demux: access='' demux='' path='C:\Documents and Settings\Administrator\Desktop\HTTP Streams.m3u'
main debug: looking for demux2 module: 45 candidates
playlist debug: found valid M3U playlist file
main debug: using demux2 module "playlist"
main debug: looking for a subtitle file in C:\Documents and Settings\Administrator\Desktop\
main debug: `C:\Documents and Settings\Administrator\Desktop\HTTP Streams.m3u' successfully opened
playlist debug: starting playlist playback
main debug: adding playlist item `Test 8100 : Streamserver 0' ( http://83.137.33.122:8100 )
main debug: EOF reached
main debug: closing input
main debug: removing module "playlist"
main debug: removing module "access_file"
main debug: thread times: real 0m0.171875s, kernel 0m0.015625s, user 0m0.000000s
main debug: thread 3952 joined (input/input.c:412)
main debug: creating new input thread
main debug: waiting for thread completion
main debug: `http://192.168.1.2:8100' gives access `http' demux `' path `192.168.1.2:8100'
main debug: creating demux: access='http' demux='' path='192.168.1.2:8100'
main debug: looking for access_demux module: 0 candidates
main debug: thread 3988 (input) created at priority 1 (input/input.c:265)
main warning: no access_demux module matched "http"
main debug: creating access 'http' path='192.168.1.2:8100'
main debug: looking for access2 module: 7 candidates
access_http debug: http: server='192.168.1.2' port=8100 file='(null)
main debug: net: connecting to 192.168.1.2 port 8100
main debug: connection in progress
access_http debug: protocol 'HTTP' answer code 200
access_http debug: Content-Type: application/octet-stream
main debug: using access2 module "access_http"
main debug: pre-buffering...
main error: cannot pre fill buffer
main warning: cannot create a stream_t from access
main debug: removing module "access_http"
main debug: thread times: real 0m10.281250s, kernel 0m0.000000s, user 0m0.000000s
main debug: thread 3988 joined (input/input.c:412)
main: nothing to play
main debug: creating new input thread
main debug: waiting for thread completion
main debug: thread 3944 (input) created at priority 1 (input/input.c:265)
main debug: `http://192.168.1.2:8100' gives access `http' demux `' path `192.168.1.2:8100'
main debug: creating demux: access='http' demux='' path='192.168.1.2:8100'
main debug: looking for access_demux module: 0 candidates
main warning: no access_demux module matched "http"
main debug: creating access 'http' path='192.168.1.2:8100'
main debug: looking for access2 module: 7 candidates
access_http debug: http: server='192.168.1.2' port=8100 file='(null)
main debug: net: connecting to 192.168.1.2 port 8100
main debug: connection in progress
access_http debug: protocol 'HTTP' answer code 200
access_http debug: Content-Type: application/octet-stream
main debug: using access2 module "access_http"
main debug: pre-buffering...
main debug: received first data for our buffer
main debug: pre-buffering done 43340 bytes in 0s - 91 kbytes/s
main debug: creating demux: access='http' demux='' path='192.168.1.2:8100'
main debug: looking for demux2 module: 45 candidates
main debug: using demux2 module "ts"
main debug: looking for a subtitle file in C:\Program Files\VideoLAN\VLC\
ts debug: DEMUX_SET_GROUP 0 00000000
main debug: `http://192.168.1.2:8100' successfully opened
ts debug: pid[68] unknown
ts debug: PATCallBack called
ts debug: new PAT ts_id=52993 version=23 current_next=1
ts debug: * number=1 pid=66
ts debug: PMTCallBack called
ts debug: new PMT program number=1 version=30 pid_pcr=68
ts debug: * es pid=68 type=16 fcc=mp4v
main debug: selecting program id=1
main debug: looking for decoder module: 28 candidates
ffmpeg debug: libavcodec initialized (interface 3349504 )
ffmpeg debug: postprocessing disabled
ffmpeg debug: using direct rendering
ffmpeg debug: ffmpeg codec (MPEG-4 Video) started
main debug: using decoder module "ffmpeg"
main debug: looking for packetizer module: 17 candidates
main debug: using packetizer module "packetizer_mpeg4video"
main debug: thread 4208 (decoder) created at priority 0 (input/decoder.c:159)
packetizer_mpeg4video warning: waiting for VOL
packetizer_mpeg4video warning: waiting for VOL
packetizer_mpeg4video warning: waiting for VOL
packetizer_mpeg4video warning: waiting for VOL
packetizer_mpeg4video warning: waiting for VOL
packetizer_mpeg4video warning: waiting for VOL

maersk
Blank Cone
Blank Cone
Posts: 14
Joined: 17 Jan 2006 01:04

Re: RTSP/RTP to HTTP/TS Gateway

Postby maersk » 12 Mar 2008 16:26

In my H.264 something else is apparently wrong.

In the RTSP2HTTP gateway end I have

#vlc -vvv rtsp://192.168.1.1/h264/test1.sdp --sout '#std{access=http,mux=ts,dst=:8100}' 2>&1 |tee log

Below is the output from the VLC gateway and from the client trying to play the http stream.
The client playing the http stream never really seem to get the stream. Anybody know why ?

Kind regards

Peter

Here the output from the vlc gateway
=====================================
VLC media player 0.8.6e Janus
[00000001] main private debug: checking builtin modules
[00000001] main private debug: checking plugin modules
[00000001] main private debug: loading plugins cache file /root/.vlc/cache/plugins-04041e.dat
[00000001] main private debug: recursively browsing `modules'
[00000001] main private debug: recursively browsing `/usr/local/depot/2.6.20.6-i686/vlc-0.8.6e/lib/vlc'
[00000001] main private debug: recursively browsing `plugins'
[00000001] main private debug: module bank initialized, found 211 modules
[00000001] main private warning: Unable to get HAL device properties
[00000001] main private debug: opening config file /root/.vlc/vlcrc
[00000001] main private debug: CPU has capabilities 486 586 MMX MMXEXT SSE SSE2 FPU
[00000001] main private debug: looking for memcpy module: 3 candidates
[00000001] main private debug: using memcpy module "memcpymmxext"
[00000271] main playlist debug: waiting for thread completion
[00000271] main playlist debug: thread 3081440144 (playlist) created at priority 0 (playlist/playlist.c:184)
[00000272] main private debug: waiting for thread completion
[00000272] main private debug: thread 3073051536 (preparser) created at priority 0 (playlist/playlist.c:210)
[00000273] main interface debug: looking for interface module: 1 candidate
[00000273] main interface debug: using interface module "hotkeys"
[00000273] main interface debug: thread 3064662928 (interface) created at priority 0 (interface/interface.c:231)
[00000275] main interface debug: looking for interface module: 1 candidate
[00000275] main interface debug: using interface module "screensaver"
[00000275] main interface debug: thread 3056274320 (interface) created at priority 0 (interface/interface.c:231)
[00000271] main playlist debug: adding playlist item `rtsp://192.168.1.1/h264/test1.sdp' ( rtsp://192.168.1.1/h264/test1.sdp )
[00000277] main interface debug: looking for interface module: 3 candidates
[00000277] main interface debug: using interface module "wxwidgets"
[00000277] main interface debug: thread 3034667920 (manager) created at priority 0 (interface/interface.c:216)
[00000277] wxwidgets interface debug: Using last windows config '(-1,0,0,1440,900)(0,657,237,389,82)(2,609,397,410,560)(6,0,0,-1,150)'
[00000277] wxwidgets interface debug: id=0 p=(657,237) s=(389,82)
[00000277] wxwidgets interface debug: id=2 p=(609,397) s=(410,560)
[00000277] wxwidgets interface debug: id=6 p=(0,0) s=(-1,150)
[00000271] main playlist debug: nothing requested, starting
[00000271] main playlist debug: creating new input thread
[00000280] main input debug: waiting for thread completion
[00000280] main input debug: creating statistics handler
[00000282] main stream output debug: stream=`std'
[00000283] main private debug: looking for sout stream module: 1 candidate
[00000283] main private debug: set sout option: sout-standard-access to http
[00000283] main private debug: set sout option: sout-standard-mux to ts
[00000283] main private debug: set sout option: sout-standard-dst to :8100
[00000283] stream_out_standard private debug: creating `http/ts://:8100'
[00000283] stream_out_standard private debug: using `http/ts://:8100'
[00000285] main private debug: looking for sout access module: 1 candidate
[00000285] main private: creating httpd
[00000285] main private debug: net: listening to port 8100
[00000280] main input debug: thread 3011509136 (input) created at priority 0 (input/input.c:265)
[00000285] main private debug: socket error: Address family not supported by protocol
[00000288] main http server debug: thread 3003120528 (httpd host thread) created at priority 0 (network/httpd.c:1078)
[00000285] main private debug: using sout access module "access_output_http"
[00000283] stream_out_standard private debug: access opened
[00000289] main private debug: looking for sout mux module: 1 candidate
[00000289] mux_ts private debug: shaping=200000 pcr=70000 dts_delay=400000
[00000289] main private debug: using sout mux module "mux_ts"
[00000282] main stream output debug: muxer support adding stream at any time
[00000283] stream_out_standard private debug: mux opened
[00000283] main private debug: using sout stream module "stream_out_standard"
[00000280] main input debug: `rtsp://192.168.1.1/h264/test1.sdp' gives access `rtsp' demux `' path `192.168.1.1/h264/test1.sdp'
[00000280] main input debug: creating demux: access='rtsp' demux='' path='192.168.1.1/h264/test1.sdp'
[00000290] main demuxer debug: looking for access_demux module: 1 candidate
Sending request: OPTIONS rtsp://192.168.1.1/h264/test1.sdp RTSP/1.0^M
CSeq: 1^M
User-Agent: VLC media player (LIVE555 Streaming Media v2008.02.08)^M
^M

Received OPTIONS response: RTSP/1.0 200 OK^M
Server: DSS/5.0.1.1 (Build/464.1.1; Platform/Linux; Release/5; )^M
Cseq: 1^M
Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, ANNOUNCE, SET_PARAMETER, RECORD^M
^M

Sending request: DESCRIBE rtsp://192.168.1.1/h264/test1.sdp RTSP/1.0^M
CSeq: 2^M
Accept: application/sdp^M
User-Agent: VLC media player (LIVE555 Streaming Media v2008.02.08)^M
^M

Received DESCRIBE response: RTSP/1.0 200 OK^M
Server: DSS/5.0.1.1 (Build/464.1.1; Platform/Linux; Release/5; )^M
Cseq: 2^M
Cache-Control: no-cache^M
Content-length: 571^M
Date: Wed, 12 Mar 2008 15:14:26 GMT^M
Expires: Wed, 12 Mar 2008 15:14:26 GMT^M
Content-Type: application/sdp^M
x-Accept-Retransmit: our-retransmit^M
x-Accept-Dynamic-Rate: 1^M
Content-Base: rtsp://192.168.1.1/h264/test1.sdp/^M
^M

Need to read 571 extra bytes
Read 571 extra bytes: v=0^M
o=- 1192377206333096 1192377206333097 IN IP4 192.168.2.1^M
s=default^M
i=^M
e=NONE^M
c=IN IP4 0.0.0.0^M
t=0 0^M
a=control:*^M
m=video 0 RTP/AVP 96^M
b=AS:1200^M
a=rtpmap:96 H264/90000^M
a=fmtp:96 profile-level-id=00001f; sprop-parameter-sets=Z2QAH6xyMCEEm/8AIAAREAAAAwAgAAAGaPGDE4A=,aO48sA==; packetization-mode=1^M
a=control:trackID=1^M
m=audio 0 RTP/AVP 97^M
b=AS:32^M
a=rtpmap:97 mpeg4-generic/48000^M
a=fmtp:97 streamtype=5; profile-level-id=15; mode=AAC-hbr; config=1190; SizeLength=13; IndexLength=3; IndexDeltaLength=3; Profile=1;^M
a=mpeg4-esid:10^M
a=control:trackID=2^M

[00000290] live555 demuxer debug: RTP subsession 'video/H264'
Sending request: SETUP rtsp://192.168.1.1/h264/test1.sdp/trackID=1 RTSP/1.0^M
CSeq: 3^M
Transport: RTP/AVP;unicast;client_port=32856-32857^M
User-Agent: VLC media player (LIVE555 Streaming Media v2008.02.08)^M
^M

Received SETUP response: RTSP/1.0 200 OK^M
Server: DSS/5.0.1.1 (Build/464.1.1; Platform/Linux; Release/5; )^M
Cseq: 3^M
Cache-Control: no-cache^M
Session: 8375608453259504568^M
Date: Wed, 12 Mar 2008 15:14:26 GMT^M
Expires: Wed, 12 Mar 2008 15:14:26 GMT^M
Transport: RTP/AVP;unicast;client_port=32856-32857;source=192.168.1.1;server_port=6972-6973;ssrc=071061C5^M
^M

[00000290] live555 demuxer debug: RTP subsession 'audio/MPEG4-GENERIC'
Sending request: SETUP rtsp://192.168.1.1/h264/test1.sdp/trackID=2 RTSP/1.0^M
CSeq: 4^M
Transport: RTP/AVP;unicast;client_port=32858-32859^M
Session: 8375608453259504568^M
User-Agent: VLC media player (LIVE555 Streaming Media v2008.02.08)^M
^M

Received SETUP response: RTSP/1.0 200 OK^M
Server: DSS/5.0.1.1 (Build/464.1.1; Platform/Linux; Release/5; )^M
Cseq: 4^M
Session: 8375608453259504568^M
Cache-Control: no-cache^M
Date: Wed, 12 Mar 2008 15:14:26 GMT^M
Expires: Wed, 12 Mar 2008 15:14:26 GMT^M
Transport: RTP/AVP;unicast;client_port=32858-32859;source=192.168.1.1;server_port=6970-6971;ssrc=7C644ECD^M
^M

Sending request: PLAY rtsp://192.168.1.1/h264/test1.sdp/ RTSP/1.0^M
CSeq: 5^M
Session: 8375608453259504568^M
Range: npt=0.000-^M
User-Agent: VLC media player (LIVE555 Streaming Media v2008.02.08)^M
^M

Received PLAY response: RTSP/1.0 200 OK^M
Server: DSS/5.0.1.1 (Build/464.1.1; Platform/Linux; Release/5; )^M
Cseq: 5^M
Session: 8375608453259504568^M
RTP-Info: url=trackID=1,url=trackID=2^M
^M

[00000280] main input debug: selecting program id=0
[00000290] main demuxer debug: using access_demux module "live555"
[00000291] main packetizer debug: looking for packetizer module: 16 candidates
[00000291] packetizer_h264 packetizer debug: found NAL_SPS
[00000291] main packetizer debug: using packetizer module "packetizer_h264"
[00000280] main input debug: stream out mode -> no decoder thread
[00000280] main input debug: audio is disabled, not selecting ES 0x1
[00000280] main input debug: starting in sync mode
[00000280] main input debug: `rtsp://192.168.1.1/h264/test1.sdp' successfully opened
[00000291] packetizer_h264 packetizer debug: found NAL_PPS
[00000282] main stream output debug: adding a new input
[00000289] main private debug: adding a new input
[00000289] mux_ts private debug: adding input codec=h264 pid=68
[00000289] mux_ts private debug: new PCR PID is 68
[00000282] main stream output warning: trying to send non-dated packet to stream output!
[00000282] main stream output warning: trying to send non-dated packet to stream output!
[00000282] main stream output warning: trying to send non-dated packet to stream output!
[00000282] main stream output warning: trying to send non-dated packet to stream output!
[00000282] main stream output warning: trying to send non-dated packet to stream output!
[00000282] main stream output warning: trying to send non-dated packet to stream output!
[00000282] main stream output warning: trying to send non-dated packet to stream output!
[00000282] main stream output warning: trying to send non-dated packet to stream output!
[00000282] main stream output warning: trying to send non-dated packet to stream output!
.......
[00000282] main stream output warning: trying to send non-dated packet to stream output!
[00000290] live555 demuxer debug: tk->rtpSource->hasBeenSynchronizedUsingRTCP()
[00000282] main stream output warning: trying to send non-dated packet to stream output!
.......
[00000282] main stream output warning: trying to send non-dated packet to stream output!
[00000282] main stream output warning: trying to send non-dated packet to stream output!
[00000290] live555 demuxer debug: tk->rtpSource->hasBeenSynchronizedUsingRTCP()
[00000282] main stream output warning: trying to send non-dated packet to stream output!
........
[00000282] main stream output warning: trying to send non-dated packet to stream output!
[00000288] main http server debug: Connection from 192.168.1.2
[00000282] main stream output warning: trying to send non-dated packet to stream output!
[00000282] main stream output warning: trying to send non-dated packet to stream output!


And here is the output from the client
=================================
main debug: CPU has capabilities 486 586 MMX MMXEXT SSE SSE2 FPU
main debug: looking for memcpy module: 3 candidates
main debug: using memcpy module "memcpymmxext"
main debug: waiting for thread completion
main debug: thread 3744 (playlist) created at priority 0 (playlist/playlist.c:184)
main debug: waiting for thread completion
main debug: thread 3760 (preparser) created at priority 0 (playlist/playlist.c:210)
main debug: looking for interface module: 1 candidate
main debug: using interface module "hotkeys"
main debug: thread 3784 (interface) created at priority 0 (interface/interface.c:231)
main debug: adding playlist item `C:\Documents and Settings\Administrator\Desktop\HTTP Streams.m3u' ( C:\Documents and Settings\Administrator\Desktop\HTTP Streams.m3u )
main debug: looking for interface module: 3 candidates
main debug: using interface module "wxwidgets"
main debug: thread 3816 (manager) created at priority 0 (interface/interface.c:216)
wxwidgets debug: Using last windows config '(-1,0,0,1440,900)(0,174,69,355,105)(2,88,116,418,587)(6,0,0,-1,150)'
wxwidgets debug: id=0 p=(174,69) s=(355,105)
wxwidgets debug: id=2 p=(88,116) s=(418,587)
wxwidgets debug: id=6 p=(0,0) s=(-1,150)
main debug: nothing requested, starting
main debug: creating new input thread
main debug: waiting for thread completion
main debug: creating statistics handler
main debug: thread 3952 (input) created at priority 1 (input/input.c:265)
main debug: drive letter C: found in source
main debug: `C:\Documents and Settings\Administrator\Desktop\HTTP Streams.m3u' gives access `' demux `' path `C:\Documents and Settings\Administrator\Desktop\HTTP Streams.m3u'
main debug: creating demux: access='' demux='' path='C:\Documents and Settings\Administrator\Desktop\HTTP Streams.m3u'
main debug: looking for access_demux module: 1 candidate
main debug: creating access '' path='C:\Documents and Settings\Administrator\Desktop\HTTP Streams.m3u'
main debug: looking for access2 module: 5 candidates
vcd debug: trying .cue file: C:\Documents and Settings\Administrator\Desktop\HTTP Streams.cue
vcd debug: could not find .cue file
access_file debug: opening file `C:\Documents and Settings\Administrator\Desktop\HTTP Streams.m3u'
main debug: using access2 module "access_file"
main debug: pre-buffering...
main debug: received first data for our buffer
main debug: creating demux: access='' demux='' path='C:\Documents and Settings\Administrator\Desktop\HTTP Streams.m3u'
main debug: looking for demux2 module: 45 candidates
playlist debug: found valid M3U playlist file
main debug: using demux2 module "playlist"
main debug: looking for a subtitle file in C:\Documents and Settings\Administrator\Desktop\
main debug: `C:\Documents and Settings\Administrator\Desktop\HTTP Streams.m3u' successfully opened
playlist debug: starting playlist playback
main debug: adding playlist item `Test 8100 : Streamserver 0' ( http://192.168.1.2:8100 )
main debug: EOF reached
main debug: closing input
main debug: removing module "playlist"
main debug: removing module "access_file"
main debug: thread times: real 0m0.140625s, kernel 0m0.015625s, user 0m0.015625s
main debug: thread 3952 joined (input/input.c:412)
main warning: refcount is 1, delaying before deletion (id=301,type=-7)
main debug: creating new input thread
main debug: waiting for thread completion
main debug: thread 3968 (input) created at priority 1 (input/input.c:265)
main debug: `http://192.168.1.2:8100' gives access `http' demux `' path `192.168.1.2:8100'
main debug: creating demux: access='http' demux='' path='192.168.1.2:8100'
main debug: looking for access_demux module: 0 candidates
main warning: no access_demux module matched "http"
main debug: creating access 'http' path='192.168.1.2:8100'
main debug: looking for access2 module: 7 candidates
access_http debug: http: server='192.168.1.2' port=8100 file='(null)
main debug: net: connecting to 192.168.1.2 port 8100
main debug: connection in progress
access_http debug: protocol 'HTTP' answer code 200
access_http debug: Content-Type: application/octet-stream
main debug: using access2 module "access_http"
main debug: pre-buffering...
main error: cannot pre fill buffer
main warning: cannot create a stream_t from access
main debug: removing module "access_http"
main debug: thread times: real 0m10.234375s, kernel 0m0.031250s, user 0m0.000000s
main debug: thread 3968 joined (input/input.c:412)
main: nothing to play

maersk
Blank Cone
Blank Cone
Posts: 14
Joined: 17 Jan 2006 01:04

Re: RTSP/RTP to HTTP/TS Gateway

Postby maersk » 13 Mar 2008 14:33

In the example above, I get the debug output below.

As seen, it identifies AAC audio and H264 video.
It finds the NAL_PPS. Its muxes audio with pid 68 and video with pid 69

Still it sends no data to a client connecting to it and it writes a lot of 'trying to send non-dated packet to stream output'

Anybody know why ? What does it mean ?

I can make the live rtsp stream available to people who want to test. Just ping me here or email me by sending private message via my profile here.

Kind regards

Peter


[00000280] main input debug: selecting program id=0
[00000290] main demuxer debug: using access_demux module "live555"
[00000291] main packetizer debug: looking for packetizer module: 16 candidates
[00000291] packetizer_h264 packetizer debug: found NAL_SPS
[00000291] main packetizer debug: using packetizer module "packetizer_h264"
[00000280] main input debug: stream out mode -> no decoder thread
[00000313] main packetizer debug: looking for packetizer module: 16 candidates
[00000313] packetizer_mpeg4audio packetizer debug: running MPEG4 audio packetizer
[00000313] packetizer_mpeg4audio packetizer debug: AAC 48000Hz 1024 samples/frame
[00000313] main packetizer debug: using packetizer module "packetizer_mpeg4audio"
[00000280] main input debug: stream out mode -> no decoder thread
[00000280] main input debug: starting in sync mode
[00000280] main input debug: `rtsp://192.168.1.1/test1.sdp' successfully opened
[00000291] packetizer_h264 packetizer debug: found NAL_PPS
[00000282] main stream output debug: adding a new input
[00000289] main private debug: adding a new input
[00000289] mux_ts private debug: adding input codec=mp4a pid=68
[00000289] mux_ts private debug: new PCR PID is 68
[00000290] live555 demuxer debug: tk->rtpSource->hasBeenSynchronizedUsingRTCP()
[00000282] main stream output debug: adding a new input
[00000289] main private debug: adding a new input
[00000289] mux_ts private debug: adding input codec=h264 pid=69
[00000289] mux_ts private debug: new PCR PID is 69
[00000282] main stream output warning: trying to send non-dated packet to stream output!
[00000282] main stream output warning: trying to send non-dated packet to stream output!
[00000282] main stream output warning: trying to send non-dated packet to stream output!

ph0t0n
Blank Cone
Blank Cone
Posts: 81
Joined: 02 Apr 2008 22:36
VLC version: 0.8.6f
Operating System: Mac OS X 10.4.11
Location: Norway

Re: RTSP/RTP to HTTP/TS Gateway

Postby ph0t0n » 11 Apr 2008 13:52

See viewtopic.php?p=78695#p78695 :

Originally Posted by The DJ, VLC Developer, on Fri Aug 18, 2006

"The problem with saving H264 RTSP, is that RTP only specifies the PTS of
video frames, and not the DTS (decoding timestamp). This means that this
DTS needs to be reconstructed.

For mpeg4 and a few other formats, this is implemented. Unfortunately,
for H264, it is EXTREMELY complicated to reconstruct this value.
It is not implemented yet, and most likely will not be for a while."

Istream
New Cone
New Cone
Posts: 4
Joined: 16 Apr 2008 15:50

Re: RTSP/RTP to HTTP/TS Gateway

Postby Istream » 25 Apr 2008 11:53

Originally Posted by The DJ, VLC Developer, on Fri Aug 18, 2006

"The problem with saving H264 RTSP, is that RTP only specifies the PTS of video frames, and not the DTS (decoding timestamp). This means that this DTS needs to be reconstructed.
For mpeg4 and a few other formats, this is implemented. Unfortunately, for H264, it is EXTREMELY complicated to reconstruct this value. It is not implemented yet, and most likely will not be for a while.
"
That was status on Aug 2006, what is the status now?

ph0t0n
Blank Cone
Blank Cone
Posts: 81
Joined: 02 Apr 2008 22:36
VLC version: 0.8.6f
Operating System: Mac OS X 10.4.11
Location: Norway

Re: RTSP/RTP to HTTP/TS Gateway

Postby ph0t0n » 10 May 2008 17:38

The error message "main stream output warning: trying to send non-dated packet to stream output!" (which I get myself on v0.8.6.f) seems to me to confirm that the state of things regarding h.264 is pretty much unchanged, as of current date.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 3 guests