[MPlayer-dev-eng] udp/mpeg2-ts streaming
Dermot McGahon
dermot at dspsrv.com
Thu May 20 14:44:32 CEST 2004
What I am trying to do:
-----------------------
Stream over UDP from a Kasenna VOD server, and use mplayer
as the client. The stream format is MPEG2-TS with layer 2
audio. The development machine is a p3-700 with 384MB RAM
and FC2 with 2.6.5 kernel and alsa. Soundcard is SBLive
and video card is an nvidia GeForce 256. This will
eventually move to a single board computer with ALSA and
a Trident video chip.
What problems am I having:
--------------------------
A/V sync for the same stream played from file is ok, but
not when streamed. Video quality for the same stream when
played from file is good, even at fullscreen, but not when
streamed.
What have I tried:
------------------
I've tried tracing through the a/v sync code, but frankly
I don't understand half of it. The fact that playing from
file without verbose switches works fine, leads me to believe
that this it should be possible to also play streamed content.
I've checked that PTS's are ok, that it's not a network problem,
that the Live code feeds in enough data and quickly enough to
the ts demuxer.
Some datapoints from testing:
-----------------------------
Log files with the same names as the test cases are available
at: http://www.bqbsoftware.ie/mplayer_logs/190504/
The sync_test clip is available at:
ftp://ftp2.kasenna.com/private/images/demo.assets
The clip being used for testing is the 3.8mbps, full D1.
Video is of a man holding up his fingers counting from
one to five.
* 1905_testing_file_noverbose
Playing from file without a verbose switch, A/V sync is
good, ranging from thousandths of a second to hundredths
of a second. Video quality is good.
* 1905_testing_file_oneverbose
One verbose switch. A/V sync and video quality also fine.
* 1905_testing_file_twoverbose
With two verbose switches, it takes around 30 seconds
before video starts to appear; audio begins well before
this but stutters. Audio and video drift until they are
about 8 seconds apart.
* 1905_testing_file_threeverbose
With three verbose switches, the situation is much the
same as with two.
* 1905_testing_file_aosdl
With -ao sdl and one verbose switch, audio stutters.
* 1905_testing_file_aosdl_noverbose
With -ao sdl and no verbose switch, playback and A/V
sync is ok.
At this point, I noticed that mplayer -ao help does
not show alsa as an option. I've checked the manpage
but may have missed something in the docs. The driver
is emu10k1 and afaik it's OSS emulation.
* 1905_testing_stream_noverbose
First streaming test. No verbose switch. Defaults for
everything. Audio and video drift apart. They are 6.5
seconds apart after 55 seconds of audio playing. Video
is slower than audio.
* 1905_testing_stream_oneverbose
Streaming with defaults but with one verbose switch.
Audio and video drift even further apart. They are
10.8 seconds apart after 55 seconds of audio playing.
* 1905_testing_stream_twoverbose
Streaming with two verbose switches results in broken
up video (blocky) and occasional bits of sound but
nothing approaching recognisable voice. After 82
seconds of audio playing, only 19 seconds of video
has played.
* 1905_testing_stream_noverbose_aosdl
Change audio out to SDL. No verbose switches. Streaming.
The A/V sync holds but occasionally jumps into tenths of
seconds. It's _ok_ but not really good enough. Also
blocky mpeg artifacts and some artifacts around the
movement of the fingers.
* 1905_testing_stream_oneverbose_aosdl
Same but with one verbose switch. Much the same as the
previous test, video quality is possibly slightly worse.
* 1905_testing_stream_noverbose_vo_xv
Specift xv output. A/V loses sync but video quality is
ok.
* 1905_testing_stream_noverbose_vo_xv_ao_sdl
Add -ao sdl to the mix. A/V sync holds (but can be tenths
of seconds momentarily which is not really good enough)
but video quality is slightly degraded. This is the best
streaming test, and is _close_ to being good enough, but
just not quite.
* 1905_testing_stream_oneverbose_vo_xv
Add a verbose switch to xv output and the A/V sync does
not hold, but the video quality is good, even in fullscreen
mode.
* 2006_testing_stream_vo_xv_ao_alsa
xv output with -ao alsa, and it thinks that there is no
sound. Where should I look for alsa related documentation?
I have looked, honestly.
* 2006_testing_stream_vo_sdl_ao_sdl
SDL video output, with SDL audio output is ok for sync, not
perfect for video, black bands around the fullscreen video.
I've sort of run out of ideas, realise that I don't know all
the options, have read through all the documentation that I
could find, but probably didn't take more than about half of
it in.
I would really appreciate some suggestions on how to improve
a/v sync and video quality. I feel that it's very close, since
the playing from hard drive is basically perfect.
Warm Regards,
Dermot McGahon.
--
More information about the MPlayer-dev-eng
mailing list