[Live-devel] MPEG video artifacts

Luca Abeni lucabe72 at email.it
Tue Nov 25 14:25:49 PST 2003


Hi Florian,

> when I try to stream MPEG files using testMPEG1or2AudioVideoStreamer or 
> testMPEG1or2VideoStreamer
> as a source and
> 
> testMPEG1or2VideoReceiver | mplayer -
> 
> for receiving and playing the data, I always get a lot of video 
> artifacts. if I play the stream using mplayer's RTP
> implementation
> 
> mplayer sdp://testMPEG1or2Video.sdp
> 
> the result is much better, but I still get artifacts.
I experienced similar problems in the past, and in my case they were due
to data loss happening in the socket.
It seems that live.com uses the socket's internal buffer to buffer
incoming MPEG data, and such buffer is too small.
Mplayer's demux_rtp.cpp increases the socket's buffer size, by calling 
increaseReceiveBufferTo() in demux_open_rtp(); unfortunately, the new
value is still too small for high-bitrate streams (such as DVD VOBs or
DVB TSs).
I don't know if testMPEG1or2VideoReceiver increases the buffer size or
not. From your description, I guess it does not.

Try to increase desiredReceiveBufferSize to a higher value in
demux_open_rtp() (it is in libmpdemux/demux_rtp.cpp)... Note that you
will probably have to increase /proc/sys/net/core/rmem_max too. I use
some "crazy values" such as 10000000, and the problem disappeared.

[...]
> am I doing something wrong, or is that normal with RTP? why does mplayer 
> receive the stream in much better quality
> than the testMPEG1or2VideoReceiver?
I suspect it is because demux_open_rtp() calls
increaseReceiveBufferTo(), but I may be wrong (I did not look at
testMPEG1or2VideoReceiver).

				Luca
-- 
_____________________________________________________________________________
Copy this in your signature, if you think it is important:
                               N O    W A R ! ! !



More information about the live-devel mailing list