mplayer SVN plays video too fast on FreeBSD

Robert Noland rnoland at FreeBSD.org
Tue Dec 8 15:14:21 UTC 2009


On Mon, 2009-12-07 at 19:14 +0000, Tom Evans wrote:
> Hi all
> 
> I sent this to the mplayer mailing list earlier today, without
> thinking that probably someone on multimedia@ has tried to compile
> mplayer from svn. Has anyone succesfully managed to do it? - and get a
> working player out of it!

I haven't tried mplayer from SVN, but the video playing too fast issue
is your audio codec.  mplayer (and gstreamer, iirc) seem to set the
frame rate based on the audio.  Generally, what I have seen is that
people with ATI/AMD (radeon) video cards with HDMI ports end up with the
HDMI port as dsp0.  If you aren't running the radeonhd driver with the
AUDIO option set, the codec isn't initialized properly and so the video
plays too fast.  To correct this issue, usually all you need to do is
set the sysctl hw.snd.default_unit to the correct pcm device. Basically,
if you have the following:

balrog% cat /dev/sndstat 
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <HDA ATI R6xx HDMI PCM #0 HDMI> at cad 0 nid 1 on hdac0 kld
snd_hda [MPSAFE] (1p:1v/0r:0v channels simplex)
pcm1: <HDA Analog Devices AD1989B PCM #0 Analog> at cad 0 nid 1 on hdac1
kld snd_hda [MPSAFE] (1p:4v/1r:2v channels duplex default)
pcm2: <HDA Analog Devices AD1989B PCM #1 Analog> at cad 0 nid 1 on hdac1
kld snd_hda [MPSAFE] (1p:1v/0r:0v channels simplex)
pcm3: <HDA Analog Devices AD1989B PCM #2 Digital> at cad 0 nid 1 on
hdac1 kld snd_hda [MPSAFE] (1p:1v/0r:0v channels simplex)
pcm4: <HDA Analog Devices AD1989B PCM #3 Digital> at cad 0 nid 1 on
hdac1 kld snd_hda [MPSAFE] (1p:1v/0r:0v channels simplex)

Setting "sysctl hw.snd.default_unit=1" will choose the primary analog
pcm for audio output and mplayer will work fine.

robert.

> Cheers
> 
> Tom
> 
> ---------- Forwarded message ----------
> From: Tom Evans <tevans.uk at googlemail.com>
> Date: Mon, Dec 7, 2009 at 2:13 PM
> Subject: mplayer SVN plays video too fast on FreeBSD
> To: mplayer-users at mplayerhq.hu
> 
> 
> Hi all
> 
> Nvidia recently released a video driver for FreeBSD 8/amd64 (which was
> previously unsupported by nvidia). With this, amd64 users finally got
> access to libvdpau.
> 
> As such, I wanted to recompile mplayer with support for vdpau.
> Unfortunately, the packaged version of mplayer in freebsd is
> 'mplayer-0.99.11_14' (which comes from MPlayer-1.0rc2.tar.bz2), which
> doesn't know about vdpau, so I set about to compile from tip of svn.
> 
> So, I checked out mplayer trunk, r29977, and made a few changes to
> support compilation on FreeBSD (see attached diff). The program built
> and compiled successfully, but every file I play through it has the
> video processed way too fast.
> 
> It almost looks as though it is trying to benchmark the video by
> playing it as fast as possible. A 40 minute TV episode only takes
> about 3 minutes to play through! The audio playback was correct, no
> distortions.
> 
> My configure line for mplayer was:
> 
> --enable-png --enable-menu --disable-tv-v4l1 --disable-tv-v4l2 \
> --disable-dvdnav --disable-ssse3 --disable-directfb --disable-faac \
> --disable-twolame --disable-mencoder --disable-mad --disable-libdv \
> --disable-theora --disable-musepack --enable-libdca --enable-speex \
> --disable-xanim --disable-live --disable-xmms --disable-jack --disable-nas \
> --disable-openal --disable-smb --disable-fribidi --disable-cdparanoia \
> --disable-libcdio --disable-ladspa --disable-liblzo
> --enable-runtime-cpudetection \
> --disable-win32dll --disable-qtx --enable-real
> --realcodecsdir=/usr/local/lib/win32 \
> --enable-gui --extra-cflags="-I/usr/local/include/freetype2
> -I/usr/local/include" \
> --enable-freetype --disable-rtc --disable-arts --disable-caca --disable-lirc \
> --disable-sdl --disable-svga --disable-aa --disable-esd \
> --disable-joystick --extra-libs="-L/usr/local/lib -ldca" \
> --prefix=/usr/local --mandir=/usr/local/man --target=amd64-srcbld-freebsd8.0 \
> --enable-vdpau
> 
> My ~/.mplayer/config looks like:
> 
> vo=vdpau,xv
> #vo=xv
> vc=ffh264vdpau,ffvc1vdpau,ffmpeg12vdpau,ffwmv3vdpau,
> cache=65536
> fs=1
> afm=hwac3
> 
> The effect is noticed with vo=vdpau,xv or with vo=xv and vc commented
> out. It didn't appear to matter what video was being played, I tried
> mkv/x264, avi/xvid and mpeg2/mpeg2ts.
> 
> Any ideas?
> 
> Cheers
> 
> Tom
> _______________________________________________
> freebsd-multimedia at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
> To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe at freebsd.org"
-- 
Robert Noland <rnoland at FreeBSD.org>
FreeBSD



More information about the freebsd-multimedia mailing list