[vlc] RTSP client in vlc 2.1
Gilles Chanteperdrix
gilles.chanteperdrix at xenomai.org
Sat Dec 14 09:51:00 CET 2013
Hi,
first of all congratulations for the work on vlc, it has really become
the must have swiss-army knife of computer video.
But...
I am working on a mostly recreational RTSP server whose aim is to stream
all sorts of HD video files from a public IP address to my personal
computer behind a NAT, including text sub-titles. After trying several
strategies, I think I have come to a point where it works well, well, at
least with vlc 2.0. But I have two major problems with vlc 2.1.
Problem 1: sub-titles streaming.
When playing the following URL:
rtsp://xenomai.org:8554/video-tests/hd-fast.mp4
The playback works nicely, but when enabling a sub-title track, the
playback suddenly stops. After inspection of the RTSP dialog, here is
what happens. When starting playback, vlc sends a SETUP for every track,
then sends a global PLAY. When the user selects a sub-title track, it
sends a TEARDOWN for every sub-title track, then a SETUP only for the
selected track. At this point live555 (which is what I use for the RTSP
server) refuses to setup the track and returns a 404 error, which causes
vlc to stop playback.
I have found how to workaround this issue in live555 code, by getting
the SETUP to succeed, in which case vlc sends a PLAY command for the
sub-title track, and this happens to work by chance, but I do not think
this is the way to go:
according to what someone who read the RTSP RFC told me, when sending a
PLAY command while a PLAY is already going on causes the second PLAY
command to be acted upon only when the first is done: in other words,
you should start receiving the sub-titles when the movie is finished,
which I believe is not what we want.
So, from my point of view, vlc should:
- either stop the current stream, subscribe to all the wanted tracks,
then restart the stream by first seeking to the position where it stopped
- or do not send any TEARDOWN, as vlc 2.0 did.
Problem 2: RTP jitter effect.
When playing the following URL:
rtsp://xenomai.org:8554/video-tests/hd-slow.mp4
vlc skips some images, resulting in a stuttering video.
Here this may be my fault: the strategy used to stream contents with a
bandwidth near the bandwidth of my DSL line is to spread evenly the RTP
packets over time in order to approximate as much as possible a constant
network bitrate, guaranteeing that the such introduced jitter is
inferior to 1s, counting on the fact that the RTP timestamps contain the
real presentation time information, and that vlc has a 1s jitter buffer
to cope with such (artificial) jitter. But vlc 2.1 does not seem to like
that, whereas it worked with vlc 2.0.
Again however, I think this should be fixed in vlc, since:
- this is the only way I found to stream high-bandwidth contents
- again, the RTP timestamps contain the real presentation time
information, so a jitter inferior to the jitter buffer time should not
be a problem for the player.
Thanks for your attention.
Regards.
--
Gilles.
More information about the vlc
mailing list