LinHES Forums
http://forum.linhes.org/

HOWTO: Update Mplayer in R5F27 (Choppy DTS/AC3 Pass Thru?)
http://forum.linhes.org/viewtopic.php?f=11&t=17316
Page 1 of 1

Author:  ethernut [ Fri Nov 23, 2007 11:59 pm ]
Post subject:  HOWTO: Update Mplayer in R5F27 (Choppy DTS/AC3 Pass Thru?)

First I'd like to pay homage to graysky for getting this party started. (bow) He he gets the primary credit for leading me to this solution. I probably should have posted this in his thread, but sometimes when threads get long, answers are lost in them and are not easy to find. So I thought I'd start a specialized thread for those that have experienced the stock AC3/DTS pass through issues I have..

DISCLAIMER: I'm not an expert... blah blah at your own risk blah blah

...and necessity is the mother of invention...

I have some video files with DTS encoding in them that would not play correctly using the standard R5F27 setup.. sooo, I went on the search as to why, then ended up upgrading mplayer.

A bit about my setup:

I have R5F27 on the Asus M2NPV-VM board (see my WIKI entry on the M2NPV-VM) and am using the optical output exclusively into my Denon 3808ci. SPDIF is very important to me and I wanted Mplayer to pass through correctly. MyR5F27 is BONE STOCK, no freakydeaky rouge apt-gets in it's entire life. If you've customized your knoppmyth YMMV.

The Problem... (hum the mission impossible song in your head)

Under the default R5F27 everything I threw at it video wise played beautifully until I loaded up some movie rips that had DTS. Then it would play 2 Channel Stereo but leave out the Center Channel (voice). ...and some videos that had AC3 would play the full spectrum of channels but would down convert from 6 channels to 2 channel stereo. I tried to force it to use SPDIF and DTS/AC3 by using the following command:

mplayer -ao alsa:device=iec958 -ac hwac3,hwdts,mp3 -quiet -full -fs %s

...and that worked nicely, my receiver reported that it was seeing DTS and I could hear voices, only problem was the audio was so choppy it was unwatchable. Darn! A Bug! Time to upgrade this sucker...

After peering over gryskys thread and a crap ton of others I decided on the K.I.S.S. method.


The Upgrade, I'm assuming you are using an i686 platform (not a 64 bit platform) ...(Hum any heavy metal song in your head)

As root, from the /root directory type (or copy/paste):

---Install Latest Codecs---

http://www3.mplayerhq.hu/MPlayer/releas ... 07.tar.bz2
tar xjvf essential-20071007.tar.bz2
cd essential-20071007
alias cp=cp
cp * /usr/lib/codecs/


---Install Mplayer with the latest SVN---

svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
cd mplayer
./configure --enable-gui --prefix=/usr
make && make install

Um, well, you're now done. Probably took all of 15-20 minutes. Now we need to update the command line helper. (now hum a nice classical song with a choir)

---Fix Default Player Command Line---

From Mythfrontend go to:

Utilities/Setup > Setup > Media Settings > Videos Settings > Player Settings

Yours probably reads the default: "mplayer -fs -zoom -quiet -vo -xv %s"

Mine now reads: "mplayer -zoom -quiet -fs -ao alsa:device=iec958 -ac hwac3,hwdts,mp3 %s"

Note #1: If you leave out the "-ao alsa:device=iec958 -ac hwac3,hwdts,mp3" portion of this everything even DTS plays just fine. However, all channels are down sampled to 2 Ch Stereo by mplayer. This may be just peachy for most of you, but if you're a sound quality nut like me, you're gonna wanna hear the original, unfettered audio.

Note #2: By Specifying "hwac3,hwdts,mp3" the way I have, it will limit mplayer to ONLY those codecs. I've tested DVD ISO's, AVI's, MKV's and others with great success, if you have some files with a weird audio encoding it iwll play but there will be no audio, and you will have to add codecs to the above list. The easy way to see what audio codec is required for a given file is to start mplayer from the command line like: "mplayer yourfile.nnn" and look at the output. See examples below:


---Example 1 DTS Audio---

[mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0
[mkv] Track ID 2: audio (A_DTS), -aid 0, -alang und
[mkv] Will play video track 1.
Matroska file format detected.
VIDEO: [avc1] 1920x816 24bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [libdca] DTS decoding with libdca
Stream with high frequencies VQ coding
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)
Selected audio codec: [dts] afm: libdca (DTS-libdca)
==========================================================================
AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)



---Example 2 AC3 Audio---

[mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0
[mkv] Track ID 2: audio (A_AC3), -aid 0, -alang eng
[mkv] Track ID 3: subtitles (S_VOBSUB), -sid 0, -slang dan
[mkv] Track ID 4: subtitles (S_VOBSUB), -sid 1, -slang swe
[mkv] Track ID 5: subtitles (S_VOBSUB), -sid 2, -slang nor
[mkv] Track ID 6: subtitles (S_VOBSUB), -sid 3, -slang fin
[mkv] Track ID 7: subtitles (S_VOBSUB), -sid 4, -slang ice
[mkv] Track ID 8: subtitles (S_VOBSUB), -sid 5, -slang eng
[mkv] Will play video track 1.
Matroska file format detected.
VIDEO: [avc1] 1280x528 24bpp 25.000 fps 0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, s16le, 384.0 kbit/25.00% (ratio: 48000->192000)
Selected audio codec: [a52] afm: liba52 (AC3-liba52)
==========================================================================
AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)


---Example 3 MP3 Audio---

AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO: [DX50] 640x464 24bpp 29.969 fps 1024.7 kbps (125.1 kbyte/s)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 32.0 kbit/2.27% (ratio: 4000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================


Hope this helps..

Ether...

Author:  graysky [ Sat Nov 24, 2007 6:15 am ]
Post subject: 

Good post, dude. If I had some high end hardware for my audio (currently just using the TV's speakers) I'd try it out. Just a minor correction, my howto is actually centered on R5F27; I removed the older content when I updated it. Anyway, good job with this post and I will link it in mine.

Author:  ethernut [ Sat Nov 24, 2007 10:05 am ]
Post subject: 

Appreciate it graysky. I'll update my intro, I didn't intend to reinvent the wheel, but hey, my post is really about fixing the DTS/AC3 Pass through anyway. ..and Thanks for all of your hard work too. :-)

Ether.,,

Author:  aa1979 [ Sat Jan 12, 2008 11:58 pm ]
Post subject: 

Works perfectly - jerky DTS problem solved! Thanks so much!!

Author:  vabiro [ Tue Mar 04, 2008 4:23 pm ]
Post subject: 

Hi,

I followed these instructions and now have an odd problem when playing avi files on my frontends. the backend works fine.

Configuration:
BE: 3GHz P4
Asus P4800 Socket 478
512MB RAM
Nvidia Card

The output of mplayer -version:
Code:
MPlayer dev-SVN-r26155-4.1.2 (C) 2000-2008 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (Family: 15, Model: 2, Stepping: 9)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
Unknown option on the command line: -version
Error parsing option on the command line: -version


The frontends will play vob and iso files fine, but not the avi.

The configuration of the Diskless FE:
VIA EPIA MII10000
1GHz
512MB RAM

The output of mplayer -version:
Code:
MPlayer dev-SVN-r26155-4.1.2 (C) 2000-2008 MPlayer Team
CPU: VIA Nehemiah (Family: 6, Model: 9, Stepping: 8)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
Unknown option on the command line: -version
Error parsing option on the command line: -version


Any thoughts?
EDIT:
The "$which mplayer" returns
Code:
/usr/bin/mplayer


on both FE and BE

Thanks,
Victor

Author:  cwapface2 [ Mon Apr 21, 2008 7:49 pm ]
Post subject: 

Instead of adding every codec you want to play in the command line, you can leave a trailing comma like so:

Code:
mplayer -ao alsa:device=iec958 -ac hwac3,hwdts, -quiet -full -fs %s


and mplayer will passthrough the ac3 and dts correctly, but fall back to 2 channel for all other codecs.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/