[mythtv-users] Can myth audio settings be changed via a script?

Steve V olivuts at yahoo.com
Sat Jul 11 08:16:16 UTC 2009


I would like to have the choice of

1. playing sound through my TV via HDMI - for most TV programs mostly recordings but sometimes videos

2. playing sound occasionally through my receiver vis SPDIF - for movies and for some recordings

I have a couple of issues and I am wondering if anyone has any ideas to overcome the issues.

Issue 1 is that I cannot get concurrent sound out via HDMI and SPDIF, I have to choose which one I want..

For recordings and ripped DVDs I have 2 ways to choose. Option 1 is to setup myth to use the ALSA:Default audio output. When I want to change sound output devices I edit my asound.conf file and then restart alsa, then I restart myth. I think I could write a script that is called by a button push on my remote to automate this. This change needs to be easier than typin on  a keyboard to all that use this frontend.

Alternatively I can change the myth setting to use the required output device, ALSA:spdif or ALSA:hdmi. Is it possible to automate this change - perhaps a script that modifies the myth database.

Both of the above options have a secondary issue. One of my OTA channels braodasts 2 audio channels AC3 and AAC-LATM. The AC3 is default. The problem is if "Enable AC3 to SPDIF passthrough" is checked I get a bad clicking sound instead of audo through the hdmi output. So I need this unchecked when using hdmi. However when I use the SPDIF output I want this checked so I can get 5.1 surround working.

Last issue is that to get mplayer working correctly as my video player, I have to use the -ao option and choose the output. I can't think of a way to automatically change this - unless a script can modify the settings in the myth database.

After writing all this it seems my best option is a script to change these settings in the database before I start myth. Is this possible?



      



More information about the mythtv-users mailing list