UNOFFICIAL Mediaportal sound HOW-TO 1.0a (1 Viewer)

BjornPadding

Portal Member
January 23, 2007
23
0
Catalunya
This document is ALPHA and slammed together in 15 minutes after a week of playing around with MediaPortal, so please, correct me where I am wrong.
If you have any questions or comments, they would be more than welcome.
I thought I start this of as it seemed missing to me (having to spend a week ).

This is a HOW-TO configure mediaportal in the (my experience) best way.
The result of this config will bring you:

- Extremely wide variety of codec support, thanks to ffdshow.

- 5.1 Sound on 6 channel audio (and everything between that and stereo).
- Dolby Surround Sound on 2 channel audio.
* THIS IS NEAT! It can do either Dolby Surround decoding, or simulate it with the matrix
which will always work with any stereo source. It differentiates the left and right channels and
therefore "creates the mono rear-channel". Sound really good, gives the full touch to it.
- Same audiolevel in every option of MediaPortal.


KNOWN ISSUES:
- Cannot timeshift and listen to audio-track 2 on TV3 Catalunya due
to non-standard mp2 variable bit rate
(somehow the mediaportal chokes on this, although without timeshifting it works fine).


Are you ready?

The 16 steps:


1 Install Windows (XP|MCE) SP2.

2 Use as much the generic windows drivers as possible.
* To prevent things like Standby from failing.
Microsoft knows where their software fails...
* This is especially true for USB Hybrid/DVB-T tuners.
It might be that at first the stick (atleast my Empia 2881) is not
detected. I believe that you need to install some updates after
to make it supported generic by Windows.

3 Install VGA Driver.
* This you will most probably need if you want to use Video-out for your card.
Otherwise I would advise you to stick to what Microsoft gives you.

4 Install Tuner drivers** (IF NOT GENERICALLY SUPPORTED)

* Again, if you have an Empia 2881 chip on your board, it should be generically
supported, however, you could also use the driver included (empia driver.zip).
There are drivers for 64bit and 32bit of an UNKNOWN PROVIDER some where in Taiwan?!
However, it works fine. I had to install it because the driver provided with my
Empia 2881 (Best Buy - Easy TV USB Hybrid Pro) wasn't letting me go into standby.
* Also in the directory EEPROM you can program your chipset of the Empia 2881,
you shouldn't need to touch this and, BE WARNED!!! YOU CAN DESTROY YOUR DEVICE!!!
WATCH OUT WHAT YOU DO WITH IT IF YOU DO SOMETHING WITH THIS!!!!

5 Install KB888111 (IMPORTANT!).
* If you want 5.1 sound to work generically, you will need this, without it you'll
get stuck with 6 channel stereo instead of real 5.1 sound.

6 Configure your speaker config.
* Go to Start -> Control Panel -> Sound and Audio Devices. Click "Advanced..." in
the "Speaker Settings" Area. In the Dropdown box "Speaker setup" select 5.1 surround.
Click OK, OK.

7 Download and install Windows Media Player 11.
* http://www.microsoft.com/windows/windowsmedia/download/AllDownloads.aspx?displang=en&qstechnology=
This is just to make sure you have all the Windows Media Codecs.

8 Install and Configure Matroska splitter: http://haali.cs.msu.ru/mkv/
* Enable all the checkboxes in the menu so that it will also split avi's.

9 Install MediaPortal v0.2.2

10 Install MediaPortal SVN

10.5 UNREGISTER ALL OTHER MP2/MP3/AC3 Codecs!!!
* Start -> Run... -> cmd<enter>
* unregsvr32 /u %windir%\system32\mpadecfilter.ax
- Should return succes
* unregsvr32 /u %windir%\system32\mpegaudio.dll
(These are only the ones that come with mediaportal, so if you have others installed then you must REMOVE THEM, this is very important! If you don't; you might up with channels without sound!)

11 Download and Install ffdshow codec.
* This is the magic of having the same audiolevel in every single item in mediaportal.
Which was the worst to get right. You can download ffdshow from:
http://www.free-codecs.com/download/FFDShow.htm

12 Install libvorbis codecs: http://www.illiminable.com/ogg/downloads.html
* You need this if you want to be able to stream Vorbis/OGG of the web
I noticed that libavcodec nor tremor is able to do this in ffdshow.

13 Configure MediaPortal

* DVD -> DVD Codec
- Video Codec: Whatever you wish (NOT ffdshow! bad idea!)
- Audio Renderer: Default DirectSound
- Audio Codec: ffdshow Audio Decoder.
(Can't select it? -> download the latest version)
- Switch off the lower checkboxes (AC3Filter and DxVA).
* Movies -> Movie Player
- Video codec: (any, but I selected) ffdshow Video Decoder.
- Audio codec: ffdshow audio decoder
- Audio renderer: Default DirectSound
* Music
- Player: Internal dshow Player.
- Sound Device: Any...
* Television
- Video Decoder: Any...
- Audio Decoder: ffdshow audio decoder
- Audio Renderer: Default DirectSound
* Configure your capture card
This is the relative easy part. Make sure you are using the right drivers for the card.
I won't go further in detail on this. I do have the XML for setting up my 2881 stick
with several drivers, so if you want it, please mail me.
* This next step is a hack!!
* with notepad open C:\Program files\Team Mediaportal\Mediaportal\MediaPortal.xml
- Search for: <section name="audioplayer">
- then search for: <entry name="sounddevice">
- then change whatever is between <entry name="sounddevice"> and </entry> to:
ffdshow audio decoder
!! This is needed to make sure that ffdshow always passed through the filter chain,
even if it does not have the codec to decode the audio inside.

14 Configure ffdshow
* Go to the ffdshow audio decoder configuration.
* Enable all the codecs under "Codecs" except Vorbis.
* Set MP1, MP2 to use mp3lib.
- WHY? If encountered a channel in Spain (TV3 Catalunya) that
is sending mp2 variable bitrate on channel 2 (original version)?!
Although its out of standard, mp3lib will play it.
Enable the following filter:
- Equalizer (if needed)
- Mixer
- Volume

15 Start Windows Media Player and play 6_channel_ID.wma (included here)
* This should identify each speaker SEPERATELY, if it is not identified seperately
something is wrong. Check the forums here for answers, they are there.
Most probably however, it will be that you didn't install KB888111 yet(step 5), or you
didn't set up the sound config in windows as described in step 6.

16 Start MediaPortal
!! Make sure you don't have it enabled in always on top mode in the general tab !!
* Now play 6_channel_ID.wma in Mediaportal.
- Still identifying the speakers correcly? -> Yes.
- Is the FF icon of ffdshow in the taskbar when you play the file? -> Yes.
- Great!
* Start your television.
- If all has gone well you now have an icon in your taskbar saying FF.
- Double click the FF icon
Equalizer:
* if needed, I had to remove some bass.
Mixer:
* Enable "Normalize Matrix"
* Adjust the Voice, Surround and LFE to your needs.
- I used this to make a good general balance.
Best way I found was playing a DVD (Lord of the Rings) and edit the settings
on the fly while playing. Take something obvious in the choosing your scene
like fireworks coming towards you etc..
Volume:
* Enable "Normalize" so things don't distort and configure to your needs while checking.
- I used this to balance out the sound to compensate for the locaiton of my speakers.
Best way is to listen to a good quality mp3/ogg.
* Do this for each item (music, television, dvd and movies) until your settings
sound well everywhere.

17 You're done!

Hope this helps some people out there struggeling...



Kind regards,
Bjorn

PS Directvobsub for subtitles is adviced. Looks better than the ffdshow version.
 

igalan

Retired Team Member
  • Premium Supporter
  • June 30, 2005
    406
    20
    Barcelona
    Home Country
    Spain Spain
    Your guide is very focused to getting 5.1 audio and your tuner working in Media Portal, not really a generic set up guide. Why don't you state so? I suggest changing the subject to reflect it. It can help to users with similar setups, but it's not particularly useful for those of us who use plain stereo ;) . And rember that there are some recommended updates for Media Portal besides the KB888111 that you mention.

    Also you say in your guide that you can use any audio renderer. It's recommended to set it to "Default Direct Sound Device" so the settings are consistent with the ones used by Windows. It's also a good idea to use MPV and MPA as codecs, and once you're sure that everything is working 100% reliably, you may want to try others. But it's advised agains installing codecs, unless you're sure that you need them.

    It's nice to see someone from around here! :)
     

    BjornPadding

    Portal Member
    January 23, 2007
    23
    0
    Catalunya
    Hi Igalan,

    Indeed, not a lot of Catalans nor Spaniards around here. I have to say, I am cheating a bit, because my roots are in Holland, and there the sun never shines, I think thats the main reason why you don't find a lot of people from around here... ;)

    I changed the subject as you suggested. However, I changed it to generic sound, because its a configuration option in the end of ffdshow audio decoder where you select your speaker layout so that it will also automatically correctly downmix 5.1 to 2.0 and also always normalize all audio sources to maintain aprox the same audio level.

    I am just a bit too lazy to explain it now, but this should be enough for people to know what to do.

    The Codecs:
    My approach is more, get rid of everything else and only use ffdshow.
    Its more versatile and its a hell to get all the levels right for every source. This takes care of that, because it always loads the same pipe. Postprocessing is not always loaded and therefore not usable in this case.
    You can unreg the other codecs with regsvr32 /u mpeg2Audio.dll etc...

    Salut,
    Bjorn

    PS
    as you are from here;
    Do you have problems with the sound on TV3 too?
    Thanks to ffdshow I finally figured that it was mp2 variable bitrate.
    Thats really weird! Thats must be why it doesn't work that well with timeshifting.
    If you do and you have done some more investigation, please let me know.

    Also, any developer on MP that can shed some light on this? I could possibly write the stream to a file for analysis.

    Let me know if you have more. If so, make a new thread in bugs (or whatever it is called and notify me to not go off topic here).
     

    igalan

    Retired Team Member
  • Premium Supporter
  • June 30, 2005
    406
    20
    Barcelona
    Home Country
    Spain Spain
    It's good to know how to set up MP to make better use of Ffdshow. However I haven't even installed it, I prefer the simpler MPV/MPA codecs. Maybe if I had an LCD HD TV, a better codec could make a difference, but until then, that's enough for me :) .

    About the sound, I do have some issues but not on TV3. I don't have any audio at all on channel 3/24 when using MPA audio codec. Also I've seen this once on Telecinco, just as a show began audio went away (but when I tuned Telecinco on the analog tuner, audio was present, as expected). I believe this is a problem with MPA handling AC3 audio. DScaler seems to work better, although I had some stutter when using it in the past.

    But you say that the problem with audio only happens with the second audio stream; I wasn't aware that MP already supports multiple audio streams on TV! I'll try and post back.
     

    Spragleknas

    Moderator
  • Team MediaPortal
  • December 21, 2005
    9,474
    1,822
    Located
    Home Country
    Norway Norway
    - Audio Renderer: Any...
    I agree with igalan - anything else than Default Directsound is a bad idea.


    Thanks for taking the time to write this guide. I'll look into it next time i re-install windows.

    (You could "clean-it-up" a bit w/paragraphs etc - it was rather hard to read).
     

    igalan

    Retired Team Member
  • Premium Supporter
  • June 30, 2005
    406
    20
    Barcelona
    Home Country
    Spain Spain
    Yesterday I tested switching the audio streams on TV3 during the show called "El Guardià". It was possible to select 4 streams, the first and last worked, the other two didn't. The last was reported as AC3. I tried with DScaler, MPA and InterVideo MPEG Audio Codec for Hauppauge. The audio codecs that Media Portal installs are really bad, I will have to look for better ones.
     

    BjornPadding

    Portal Member
    January 23, 2007
    23
    0
    Catalunya
    Yes and no, I have created a graphedit graph to be able to write the second audio stream to disk and I am quite confident now that the following is the problem.
    The stream is identified as MPEG-1 Layer II 96kbps mono audio.
    It supposed to be supported... I don't get why it's failing... it must be something out of spec in the stream. As it does not happen anywhere else.

    About the format of the HOW-TO Spragleknas;
    I included a txt file (the original format) and a html page generated from that.
     

    igalan

    Retired Team Member
  • Premium Supporter
  • June 30, 2005
    406
    20
    Barcelona
    Home Country
    Spain Spain
    With Winamp I get this information about the file you posted:

    Size: 538624 bytes
    Header found at: 0 bytes
    Length: 45 seconds
    MPEG-1 layer 2
    96kbit, approx. 1870 frames
    48000Hz Mono
    CRCs: Yes, Copyrighted: Yes
    Original: Yes, Emphasis: None

    With GSpot I get:

    MPEG-1 Layer 2 96 kbps 48000 Hz

    If it's CBR, as GSpot reports, the audio codec should be able to play it fine. But it's not decoding it... Are you sure that with Graphedit you demuxed de audio stream and it has not been converted in any way? At this point we may need some developer to take a look at it.
     

    BjornPadding

    Portal Member
    January 23, 2007
    23
    0
    Catalunya
    Yep, if TS FileSink doesn't do anything to it, its the pure stream.
    This comes straight from the audio pin of the MPEG2 Multiplexer.
    After I trimmed the 0 bytes from the buffer as it allocates 256 meg.
    So the only thing that happened to the file is that I made it smaller.

    Now, I think we have done our job, who can help us?


    PS
    It's correct that it is mono. It says so here:
    http://www.tv3.cat/ptvcatalunya/atcSeccio.jsp?seccio=tvc&idint=37&item=atc_destacats
    Also 3/24 is also mp2, but 128kbps and stereo:

    attachment.php
     

    igalan

    Retired Team Member
  • Premium Supporter
  • June 30, 2005
    406
    20
    Barcelona
    Home Country
    Spain Spain
    So, you use FFdshow as audio codec and you get audio on all streams as long as time-shift is disabled, is this correct? If it is I will install Ffdshow and try here.
     

    Users who are viewing this thread

    Top Bottom