Page 1 of 2

MP4 Files with Multiple Audio Tracks in WMC

Posted: Mon Mar 02, 2015 8:34 pm
by rfranzke
Hello all. I would like to create a video file which can be played by all of my different media devices. I currently have Windows MC setup and playing some VOB rips perfectly. I would like to try and convert these VOB rips to a standard MP4 which can be played by my iphone and my MC PC. The current VOB rips play 5.1 channel audio on my MCPC.

What I want to do is create an MP4 file which includes two audio tracks: A 5.1 channel track for the MCPC and a 2 channel track to be played on the iphone. Now I can create the MP4 file with two tracks, but I cannot get either device to 'see' the second audio track and always only will play the first audio track thats listed. If I create a file with the 2 channel track listed first, the iphone and MCPC can play the file fine, but the MCPC then plays the track in 2 channel audio, not what I want. If I create a file with the 5.1 channel track listed first, the MCPC will play the file fine with 5.1 channel audio, but the iphone will not even sync the file because it won't see it a one playable by the iphone device even though a second track exists. It seems both devices just pick the first listed track and use that. Trying to create 'one file to rule them all' so to speak.

How can I have the MCPC select a second audio track during playback and have the setting apply to all mp4 files it encounters?

I am using My Movies to play these MP4 files BTW and this is on a 64-bit Windows 7 Ultimate PC. I have PC hooked to my receiver via optical/SPDIF and the receiver is doing the decoding. Thanks in advance for the help.

Re: MP4 Files with Multiple Audio Tracks in WMC

Posted: Mon Mar 02, 2015 9:12 pm
by Shark007
Create your files with the 2.0 audio track 1st.
Then you need to make Media Center use LAV filters for playback of MP4 files.

Installing the STANDARD Codecs (which only contain LAV and xy-VSFilter for subtitles) is the easiest route.
After installation, select to use the [x] SUGGESTED settings checkbox in both the 32 and 64bit GUI's.
Then go to the 64bit Windows SWAP TAB and disable Media Foundation for MP4 files.
Next, go to the Audio TAB and select to use SPDIF.
Time for testing.

If you have a SmartTV, the above instruction will make the Play To function of Windows also use LAV for MP4 and MKV playback.

Re: MP4 Files with Multiple Audio Tracks in WMC

Posted: Wed Mar 04, 2015 2:47 pm
by rfranzke
Thanks for the quick reply here. So I tried to set this up as you suggested. I used your Advanced Codec pack, but have the settings as you describe. It still does not work. I created a new file using handbrake. I have two tracks: A Mixdown track using Dolby Pro Logic II and an AC3 passthru track. The dolby pro logic track is first in the list. When I play this file using VLC media player I can choose which track and it sees and plays both. When I use WMP to play the same video, when I go full screen and try and choose the audio track there is only one listed. There is no label on the track but my receiver sees the stream as 2 channel, so I have to assume its the Pro logic two track that it sees. There simply is not another track option listed.

Perhaps I am not doing the encoding correctly when creating the file? This file plays fine on my iphone, and will play on MCE but only as two track audio. I do not have VLC player on my MCPC, but just on the PC I am doing the encoding on which is separate from my MCPC. There is no requirement for VLC is there?

I have installed codec packs in the past, but have never seen any difference in those and what MC/WMP provides. Is there some 'activation' procedure I need to use to get the MCPC to actually use the new codecs? I have never had any issue with TV playback after installing them so it just seems like they do not do anything.

Any help here is much appreciated. Thanks in advance.

Re: MP4 Files with Multiple Audio Tracks in WMC

Posted: Wed Mar 04, 2015 2:55 pm
by rfranzke
OK, I went back and went over the settings you suggested again. I noticed they were all set back to defaults for some reason. I reset them as you suggested. I'll try again tonight to see if it works now. Does the configuration tool not save settings or does it set the settings but show the defaults each time you launch it?

Also I failed to mention that I am using both the 32-bit and 64-bit settings and setting this in both of them. I think I read somewhere that you need to run the 32-bit for WMP and the 64-bit for MC on a 64-bit machine. Just wanted to clarify that. Thanks.

Re: MP4 Files with Multiple Audio Tracks in WMC

Posted: Wed Mar 04, 2015 3:00 pm
by Shark007
The Advanced settings GUI is not the same as the Standard GUI.
Since you switched to the Advanced Codecs, this Standard setting,
Then go to the 64bit Windows SWAP TAB and disable Media Foundation for MP4 files.
is found on the MPG~MP4 TAB of the Advanced GUI and is very important to your setup. (This TAB doesn't exist in the Standard GUI)

Also, do you disable UAC? (asked because settings didn't stick)
Disabling UAC causes all sorts of issues and should NOT ever be done.
If this is you, use the [UNINSTALL] button on the Help TAB of both GUI's, set UAC to the Default position, reboot, and re-inatall

Re: MP4 Files with Multiple Audio Tracks in WMC

Posted: Wed Mar 04, 2015 3:32 pm
by rfranzke
I am not disabling UAC. I think though I mislead you here on the setting sticking. I am running the GUI as administrator for both 32-bit and 64-bit. I am however using a different user account than the account I use to normally log in locally to the MCPC when setting this (logging in remotely via RDP cause I am at work). Perhaps these settings are per user account? When I set these before, I set them via the local console with a different user account so its quite possible the settings are fine for that user. I'll have to check when I get home tonight. I think that the settings thing is a non-issue at this point.

If the settings are correct then I still have an issue with playing the file with 5.1 audio. I have uploaded some screen caps to show the settings for both handbrake encoding and the 64-bit Codec Settings in the hopes someone can see what I am doing wrong. Thanks for the help.

Re: MP4 Files with Multiple Audio Tracks in WMC

Posted: Wed Mar 04, 2015 3:50 pm
by Shark007
Almost all settings are user specific.
on the Help TAB is a button to setup the codecs for new users. [Rebuild user account settings]
Without using that button from within the new user account, only the user that installed the codecs has access to the codec settings.
Different users can have different settings - and these will be maintained separately too.

I am not familiar with Handbrake, so have no input of its settings.
Other than that, your settings in my GUI look OK.

Re: MP4 Files with Multiple Audio Tracks in WMC

Posted: Wed Mar 04, 2015 4:01 pm
by rfranzke
OK thanks again for the help. I'll try to play this file again tonight, see what I get and post results.

Re: MP4 Files with Multiple Audio Tracks in WMC

Posted: Fri Mar 06, 2015 3:07 pm
by rfranzke
OK so I checked the settings again. Everything was still set correctly. Played the file and still no 5.1 channel audio. Can anyone else tell me what I am missing here? VLC player can play either track but MC/WMP does not even seem to see it. It will play 5.1 if its listed as the first track, just not if its listed as the second. Thanks for the help.

Re: MP4 Files with Multiple Audio Tracks in WMC

Posted: Fri Mar 06, 2015 4:02 pm
by Shark007
rfranzke wrote:OK so I checked the settings again. Everything was still set correctly. Played the file and still no 5.1 channel audio. Can anyone else tell me what I am missing here? VLC player can play either track but MC/WMP does not even seem to see it. It will play 5.1 if its listed as the first track, just not if its listed as the second. Thanks for the help.
The only way this is going to work for you is if you force Media Center to use LAV filters for MP4 playback.
I suggest that you press [Reset All] in the 64bit Settings Application and then follow the steps I posted in the 2nd post of this thread.
At the very least, you should have the white LAV splitter icon in the systray allowing you to select an audio track.
LAV's built-in logic should auto-select the highest quality track being the 5.1 track for playback.

Re: MP4 Files with Multiple Audio Tracks in WMC

Posted: Sat Mar 07, 2015 4:11 am
by Shark007
After lending more thought to your situation (and no sample to test with)
It may be required to disable the Microsoft Audio decoder on the SWAP TAB to get the audio handed off to LAV.

Re: MP4 Files with Multiple Audio Tracks in WMC

Posted: Sat Mar 07, 2015 10:05 pm
by rfranzke
Shark007 wrote:After lending more thought to your situation (and no sample to test with)
It may be required to disable the Microsoft Audio decoder on the SWAP TAB to get the audio handed off to LAV.
Is this the setting that says "will break live TV"? I do use this MCPC for watching live TV. I'll try to reset everything and go through the steps again. I have made a ton of ticks here and there trying to get this to work so it may be I just messed things up along the way. Resetting the settings is prolly a needed step here. I'll try and report back. Thanks for the help and time.

Re: MP4 Files with Multiple Audio Tracks in WMC

Posted: Sat Mar 07, 2015 10:14 pm
by Shark007
yes, that is the setting - although it doesn't break LiveTV as stated.
I only put that message there so that if it does screw with LiveTV, the user will know what did it.

Re: MP4 Files with Multiple Audio Tracks in WMC

Posted: Sun Mar 08, 2015 2:50 pm
by rfranzke
OK thanks. I tried this and it did break both live and recorded TV for me. With this setting I could not do either.

I did however finally get this working. I am not totally sure what got it going but I got into the LAV config, and on the formats tab I disabled AC3 decoding. Basically I used the settings you suggested and then added the removal of AC3 decoding for LAV. I set the reset all button, then used recommended settings checkbox, then went in and changed the settings you suggested (disabled WMF for MP4, Audio bitstreaming settings). It still didn't work so I went in and messed with the LAV config adding, as I mentioned, disabling AC3 in the formats tab. As soon as I did that, my receiver correctly saw the AC3 stream. I admittedly am not sure how all this works. Sorry but I am a little out of my element when getting into the details of how a PC uses CODECs. I'll leave that up to the experts.

Thanks very much for the help and your codec pack. Finally I have the setup I need. I am going to post a follow-up to this and detail all my settings (CODECs and Handbrake) so folks can use this same setup to build 5.1 channel MP4s for both MCPC and iphone. Thanks again.

Re: MP4 Files with Multiple Audio Tracks in WMC

Posted: Mon Mar 16, 2015 3:16 am
by rfranzke
OK I finally had some additional time to re-encode my MP4 files with AC3/DTS audio tracks. They seem to be working. One thing I have discovered though is that when playing these files on an XBOX360 extender, they seem to be getting transcoded somehow and the video quality is crap. As a test I reanabled the Windows Media Foundation for MP4 (disabling LAV) and the video playback was much improved. I saw this post http://mediabrowser.tv/community/index. ... ity/page-3 and a guy was seeing the same issue using the LAV decoder. If WMF is disabled then MP4 playback on extender is broken. He was disassociating MP4 from WMF somehow but it seems to me to be the same issue.

Is there any way to disable WMF (use LAV) when using local MC and then disable LAV for extenders? Thanks again for getting me this far.

Re: MP4 Files with Multiple Audio Tracks in WMC

Posted: Mon Mar 16, 2015 12:51 pm
by Shark007
rfranzke wrote:Is there any way to disable WMF (use LAV) when using local MC and then disable LAV for extenders? Thanks again for getting me this far.
Not automatically, no.
You would need to toggle that setting as you viewing requirements change.

Re: MP4 Files with Multiple Audio Tracks in WMC

Posted: Mon Mar 16, 2015 1:41 pm
by rfranzke
OK thanks. Would there be any value in using AC3Filter for this? I think I can still use WMF if I use AC3Filter to output 5.1 channel tracks to SPDIF so my receiver can decode the stream. Before I go about potentially breaking my MCPC, would this even get me what I am after? There is also this SPDIFER tool which seems to allow media players to just output the 5.1 channel audio to SPDIF. Anyone have an idea if using something like that rather than LAV would work for what I am trying to do? Or would I still need the LAV splitter to see the 5.1 channel track at all?

Re: MP4 Files with Multiple Audio Tracks in WMC

Posted: Mon Mar 16, 2015 2:36 pm
by Shark007
What actually handles the audio processing is not the issue here. (LAV vs AC3Filter or whatever)
You need to remove Media Foundation from the equation to get the results you seek from the MP4 file.
As you are painfully aware, doing so breaks MP4 playback on the extender.

Re: MP4 Files with Multiple Audio Tracks in WMC

Posted: Mon Mar 16, 2015 4:18 pm
by rfranzke
So what you are saying is that using WMF ever will not allow the use of AC3 audio tracks in MP4 files. WMF has to be dsiabled for MP4 to take advantage of alternate AC3 audio tracks? There is nothing that I can do to use WMF and output an included AC3 audio track regardless of the splitter/filter I use?

Would it ever be possible to selectively enable/disable WMF based on if playback is done through the MCE machine or the extender using the Shark codecs? Like a feature (consider it requested if it has not been in the past) :D

AC3 audio on the media center machine is more important to me so I am better off than I was. Having the extender work is just a bonus but would be nice.

Thanks again for all the help here.

Re: MP4 Files with Multiple Audio Tracks in WMC

Posted: Mon Mar 16, 2015 4:47 pm
by Shark007
rfranzke wrote:So what you are saying is that using WMF ever will not allow the use of AC3 audio tracks in MP4 files.
No, I have never said that.
Your story here starts out with you stating that you need a 2 channel track to be the 1st track, and multi-audio track as a secondary track.
When Media Foundation is handling the file, there is no way to select a preferred track for playback.
So, I gave you an option where the 2.0 track can be the 1st track, and the multi-channel track as a secondary track that will play on the PC.
rfranzke wrote:WMF has to be dsiabled for MP4 to take advantage of alternate AC3 audio tracks? There is nothing that I can do to use WMF and output an included AC3 audio track regardless of the splitter/filter I use?
Again, you are putting words in my mouth that I did not speak.
The whole issue here is because you need to have a 2.0 audio track as the 1st track.