From owner-freebsd-multimedia@FreeBSD.ORG Tue Dec 8 19:29:47 2009 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F784106566C; Tue, 8 Dec 2009 19:29:47 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25]) by mx1.freebsd.org (Postfix) with ESMTP id 69B2D8FC16; Tue, 8 Dec 2009 19:29:45 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id 22so1473508eye.9 for ; Tue, 08 Dec 2009 11:29:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=EGfKvi1ev1L931zbTFPPO3NXCsxqwiJyclefxZRHgaQ=; b=GEOVWBFIGPsKGT+MmBC8a9bnch5/vexiaTR4DI2hcLM0bJTDrgCpT8OHuPRSAZL+4L uzDeKmDxod6FXa1YnWvPipVRg0JnL+P5ZpjiGD/LMVGVOOCAnKrv9iP24bEfpRi+Hzn7 /kEe8RS/y8Cm5yZi7Cwnp+TDpmZN31K3pecIM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=PSsir8o/ShZ8ZrZ0DvnQlKRNRuE+NBVU0tY+UxK/vUgM6UDRHJOHtQYYCjC7OggLB6 G0+S2MptmINECeuXZskXt15zWtjivRNrU0JKcOvnMGkiWZy5nv2cRBCyqum2gwxfmhk+ XwysKxk1eI9owkxoJCiiMaS1SypxYyEcvWBH0= MIME-Version: 1.0 Received: by 10.213.96.79 with SMTP id g15mr9076628ebn.80.1260300584983; Tue, 08 Dec 2009 11:29:44 -0800 (PST) In-Reply-To: <2e027be00912080744u5c085de0v92a546dbe3e449b4@mail.gmail.com> References: <2e027be00912070613y5b3c4841tcd4d9ff58e1db330@mail.gmail.com> <2e027be00912071114t6a69b0a5vfdefea06e6ea9273@mail.gmail.com> <1260285252.2315.280.camel@balrog.2hip.net> <2e027be00912080744u5c085de0v92a546dbe3e449b4@mail.gmail.com> Date: Tue, 8 Dec 2009 19:29:44 +0000 Message-ID: <2e027be00912081129k1df5bf05g7e9b2fd2804674f1@mail.gmail.com> From: Tom Evans To: freebsd-multimedia@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: mav@freebsd.org Subject: Re: mplayer SVN plays video too fast on FreeBSD X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 19:29:47 -0000 On Tue, Dec 8, 2009 at 3:44 PM, Tom Evans wrote: > On Tue, Dec 8, 2009 at 3:14 PM, Robert Noland wrote= : >> 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. =C2=A0mplayer (and gstreamer, iirc) seem to set the >> frame rate based on the audio. =C2=A0Generally, what I have seen is that >> people with ATI/AMD (radeon) video cards with HDMI ports end up with the >> HDMI port as dsp0. =C2=A0If 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. =C2=A0To 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: at cad 0 nid 1 on hdac0 kld >> snd_hda [MPSAFE] (1p:1v/0r:0v channels simplex) >> pcm1: at cad 0 nid 1 on hdac1 >> kld snd_hda [MPSAFE] (1p:4v/1r:2v channels duplex default) >> pcm2: at cad 0 nid 1 on hdac1 >> kld snd_hda [MPSAFE] (1p:1v/0r:0v channels simplex) >> pcm3: at cad 0 nid 1 on >> hdac1 kld snd_hda [MPSAFE] (1p:1v/0r:0v channels simplex) >> pcm4: at cad 0 nid 1 on >> hdac1 kld snd_hda [MPSAFE] (1p:1v/0r:0v channels simplex) >> >> Setting "sysctl hw.snd.default_unit=3D1" will choose the primary analog >> pcm for audio output and mplayer will work fine. >> >> robert. >> > > Thanks Robert, the mplayer list also said that mplayer syncs to audio, > so I've got a few things to check there tonight :) > > I'm not using radeonhd or hdmi, I have an amplifier connected to the > onboard snd_hda via spdif, and use spdif pass through if available on > the source. I already specify hw.snd.default_unit=3D2, since that is > seemingly the correct device: > > FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64) > Installed devices: > pcm0: at cad 0 nid 1 on hdac0 kld > snd_hda [MPSAFE] (1p:1v/1r:1v channels duplex) > pcm1: at cad 0 nid 1 on hdac0 kld > snd_hda [MPSAFE] (1p:1v/0r:0v channels simplex) > pcm2: at cad 0 nid 1 on hdac0 kld > snd_hda [MPSAFE] (1p:1v/0r:0v channels simplex default) > > Audio plays correctly for both AC3 and MP3 audio tracks in both > mplayer svn and the port. I wonder if it is possible the codec on this > snd_hda card is slightly 'strange' and doing something out of the > ordinary - maybe I'll have a browse of the linux azalia driver and see > if they have any quirks for it. > > Cheers > > Tom > Ok, I've made a few more tests. It seems that the problem only comes about when I run mplayer svn with '-ao oss -afm hwac3'. If I run with '-ao none' or with '-ao oss' (ie playing 2 channel pcm out over the digital output), then the video plays back at the correct rate. Just to reiterate, all of those options work correctly with the version in ports - if only that supported vdpau :) Alexander, is this like anything you have come across before with the snd_hda driver? I have bootverbose logs of snd_hda if that helps[1]. Cheers Tom [1] http://pastebin.ca/1707268