Re: No AAC audio on MP4 files UMS (10.5) Rev.2 - SOLVED?

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Post Reply
billy6560
Posts: 5
Joined: Sun Nov 13, 2016 5:19 pm

Re: No AAC audio on MP4 files UMS (10.5) Rev.2 - SOLVED?

Post by billy6560 »

Up until recently, I was able to play MP4's with AAC audio tracks without issues. Now, these same MP4's play the video fine, but NO AAC audio. Note that I can play these same MP4's without issue with VLC. I'm fairly certain that it's not my Denon (AVR-X1500H) receiver as I have a few AAC audio only files that do play. As it is, just about all these files are DL's are from YouTube, including my own UL's/DL's), most of the content being tutorials, ham radio related, old PD classic movies, etc. Again, all these files DID recently work, then all of a sudden, ALL stopped playing back AAC audio. All my other files are Dolby Digital of various kinds, and all work fine.

Is there some transcoding option (which I don't see) that will take the AAC soundtrack and re-encode it in AC3 (Dolby Digital), or just about any other audio format, other than AAC?

One thing is, I've re/installed various versions of UMS, in addition to the legacy PS3 Media Server, and Mezzmo, again, all these used to work, but NONE are now on AAC soundtracks. I also loaded the K-Lite Codec Pack, just for S&G's, but still no joy. As I can't quantify when this started, I don't know if it was after the latest Win10-64 update (20H2), as I usually don't watch these MP4's that often.

I use the Western Digital WD-TV player to watch all my Media Server content.

The attached logs show that I did two short streams, first with "Aladdin.mp4" (with its 5.1 AAC soundtrack), and a re-rendered version, "Aladdin AC3.mp4" (using Vidcoder) of the original AAC file, re-encoded in AC3. "Aladdin.mp4" file plays video/audio fine in VLC. In addition, below is a snapshot of VLC's reporting of its codec data.

I did look at the log UMS log files, and did not see any apparent indication of a streaming error, but I may not be looking in the right places.

To reiterate, these MP4 AAC video files did play normally in the past with UMS/PS3-MP/Mezzmo, but not now. Any help would be very gratefully appreciated.

Thanks, Bill

Aladdin VLC Codec.gif
Aladdin VLC Codec.gif (14.56 KiB) Viewed 4492 times
Attachments
ums_dbg_2021-05-12-16-17.zip
(101.78 KiB) Downloaded 205 times
Last edited by billy6560 on Thu May 13, 2021 7:09 pm, edited 3 times in total.
User avatar
mik_s
Moderator
Posts: 1115
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: No AAC audio on MP4 files UMS (10.5) - HELP!

Post by mik_s »

Can you post logs? see the section above in red
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
billy6560
Posts: 5
Joined: Sun Nov 13, 2016 5:19 pm

Re: No AAC audio on MP4 files UMS (10.5) - HELP!

Post by billy6560 »

See Rev 2
User avatar
mik_s
Moderator
Posts: 1115
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: No AAC audio on MP4 files UMS (10.5) Rev.2 - HELP!

Post by mik_s »

From what I can see in the logs, UMS is not transcoding and is just streaming the files directly to your receiver without changing anything.

Maybe something has changed with your receiver (has it been updated?) or the way the videos have been encoded by YouTube or by the software used used to download them.

You should be able to confirm this by going to the #--Transcode--# folder and choosing "no transcoding" to play those files unchanged. You can also try one of the other options to force UMS to transcode then and see if that works. Another thing you can try is playing directly from a USB drive if that is possible.

It may be that UMS has been transcoding before but for some reason it is now using a different conf that is telling it not to.

If it is the same for other versions of UMS/PS3-MP/Mezzmo then it must be something different with your receiver/media player. I don't know anything about your Denon but it looks to be like a surround home theatre, I have heard of an audio passthough (ARC I think) that is needed for them, it maybe that yours is disabled or disconnected. Are there any settings on receiver that may have been changed (possible if you have kids playing with the remotes)
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
billy6560
Posts: 5
Joined: Sun Nov 13, 2016 5:19 pm

Re: No AAC audio on MP4 files UMS (10.5) Rev.2 - SOLVED?

Post by billy6560 »

From what I can see in the logs, UMS is not transcoding and is just streaming the files directly to your receiver without changing anything.
That appears to be true. I have the ability to look at the receiver's status while the WDTV player is in operation. On an AC3 file, it shows the input signal as "Dolby Digital", but on the MP4's, it shows "PCM Zero", meaning no signal is being sent by UMS et al.

Maybe something has changed with your receiver (has it been updated?) or the way the videos have been encoded by YouTube or by the software used used to download them.
There is a firmware update available, but it hasn't been done yet. Remember that this condition is not related to UMS specifically.

You should be able to confirm this by going to the #--Transcode--# folder and choosing "no transcoding" to play those files unchanged. You can also try one of the other options to force UMS to transcode then and see if that works. Another thing you can try is playing directly from a USB drive if that is possible.

Well, forcing MP4's to be transcoded seems to have resolved (but not fixed) the problem, and now stream as Dolby Digital, not AAC.

Unfortunately, ALL MP4's are now transcoded, whether or not they have AAC or DD soundtracks. It's difficult to know if or how this impacts UMS performance, but so far, it appears to work fine. I should also note that I did the same change with PMS, and that now also works.

UMS.gif
UMS.gif (6.56 KiB) Viewed 4473 times

It may be that UMS has been transcoding before but for some reason it is now using a different conf that is telling it not to.
Unsure. Again, this issue is common among three different Media Servers. UMS and PMS share similar architectures, but these are very different from Mezzmo. The only commonality is that all use codecs and engines like FFmpeg, etc.

If it is the same for other versions of UMS/PS3-MP/Mezzmo then it must be something different with your receiver/media player. I don't know anything about your Denon but it looks to be like a surround home theatre, I have heard of an audio passthough (ARC I think) that is needed for them, it maybe that yours is disabled or disconnected. Are there any settings on receiver that may have been changed (possible if you have kids playing with the remotes)
The WDTV player hasn't been updated in years. As for my Denon, while 4K video could be passed through, it's not in my setup, so ARC doesn't apply. Digital audio is fed by the WDTV player via optical SPDIF (and we're empty nesters).

Finally, the ONLY change that has occurred to the Media Server "system" was a change in PC hardware a while ago, before this condition started. The old PC was in service for more than 5 years, with a Pentium running Win7-64 Pro, where the new one is less than a year old, with an i5 running Win10-64 Pro. Unfortunately, the old PC died so I had no way to revert back.

Thanks for your insight and help. This work around does the trick, but it would have been ideal if one could chose not only the video but audio criteria for forced transcoding, but I know that's asking a lot.

Regards,
Bill
User avatar
mik_s
Moderator
Posts: 1115
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: No AAC audio on MP4 files UMS (10.5) Rev.2 - SOLVED?

Post by mik_s »

You could make modified conf for the WesternDigital-WDTVLive.conf that is currently being used so that UMS will transcode only videos with AAC.

It appears that the one included with UMS is quite old and does not tell what formats are supported, just file types. I was not possible for the developers to modify existing confs when better format matching was added because they do not have access to those devices for testing, so that is left to the user tweak them and do the tests.

There are 2 types of AAC audio codecs, aac-lc and he-aac. your receiver might be able to play one of them but not both which could be why it has worked the the past but now stopped as the other one is becoming more common.

Try changing the line

Code: Select all

Supported = f:mp4             m:video/mp4
to

Code: Select all

Supported = f:mp4		v:h264|mp4		a:adpcm|aac-lc|he-aac|mp3|ac3|lpcm|wma		m:video/mp4
Playing your file with that should not make a difference at first, then remove "he-aac" and see if that does. you might be able to leave "aac-lc" but remove it if causes the same issue.

Also don't forget to remove the forced transcoding for mp4 otherwise this will be ignored. Transcoding should be avoided whenever possible.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
billy6560
Posts: 5
Joined: Sun Nov 13, 2016 5:19 pm

Re: No AAC audio on MP4 files UMS (10.5) Rev.2 - SOLVED?

Post by billy6560 »

You're absolutely correct, in that transcoding is not the solution. I've worked very hard to avoid that over the years, in that my entire library is either m2ts, avi, vob, and mp4 formats. Outside of my one-off experimental "Aladdin.mp4" AAC 5.1 file, the vast majority of mp4's are mp4 conversions of vob (DVD) files (using VidCoder) with AC3 (up to 5.1) soundtracks, or native stereo AAC mp4's from YouTube. Other than the AAC issues, the remainder of my library's file formats do not require transcoding at all. If I do come across an oddball file, like an MKV, I'd convert it to mp4.

With all that being said, I tried multiple combinations of the CODE change you suggested, and none of it worked. As with most UMS users, I'd assume they started out with PS3 Media Server (PMS), and morphed to UMS. On my initial streaming setup (before my WDTV player), I used my Sony PS3 as my "player". To get it to play nicely with PMS, I used a PMS.conf script specifically tweaked for the PS3. In that, there was also a "# Supported video formats:" section, and in it, there was specific settings for mp4's using both AC3 and AAC.

Code: Select all

Supported = f:mp4             v:mp4|h264               a:ac3                m:video/mp4
Supported = f:mp4             v:mp4|h264               a:aac                m:video/mp4                n:2
Now, I don't know what these "switch's" do, but these settings seem to work specifically on the AAC mp4's. Interestingly, it appears that only these AAC files are being transcoded, while the AC3 files are not. I looked at the on-screen "#--Transcode--#" folder, and I really don't know how to decipher it's content (it's difficult to read on-screen). Where is this folder located?

However, what suggests that that the AAC mp4 files are being transcoded, is that the WDTV player takes about 10-12 seconds to start playing, whereas the AC3 mp4's take between 5-7 seconds, which I assume is the players file buffer being loaded up. Looking at the other file types, the m2ts, avi, vob/mp4 files take about the same amount of time to start playing. So that extra ~5 seconds is most likely the transcoding engine starting up.

In this case, I can live with these AAC mp4's transcoding, as these are not viewed often on the home theater setup, rather, most are viewed on the PC using VLC.

Again, thanks for the help, and pointing me in the right direction.

Regards,
Bill

P.S. Perhaps this is a subject for "new features", but in all this testing, every time UMS is restarted, it takes an inordinate amount of time to read my NAS file server folders (xfer rate is about 50MBs). In addition, the "Scan shared folders on startup" function doesn't seem to re-read these folders even though its enabled. In fact, many times, the WDTV and/or UMS times out (minutes) and I have to restart the WDTV. It's a real PITA. In contrast, PMS takes a little bit of time as well to read these folders, BUT, they're read in about 20 or so seconds for it's first time read after startup. My guess is the original PMS code got a little bloated over time in UMS.

The feature I'd suggest (besides speeding up the initial folder reads) is that UMS creates a filename database of all the files setup in the shared sections, then, on restart, UMS does a "quick" folder read and make changes to the database as necessary. Really, anything that can be done to remedy the folder read times for shared folders would be very much appreciated.
User avatar
mik_s
Moderator
Posts: 1115
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: No AAC audio on MP4 files UMS (10.5) Rev.2 - SOLVED?

Post by mik_s »

Try this conf file, I copied the supported line from another conf but removed the references to AAC.
Just copy it to "C:\Program Files (x86)\Universal Media Server\renderers" and restart UMS. I have given this one a higher priority so this should be used instead of the included one.
If you click on the devices icon in UMS you should be able to see it using the mod version.
WesternDigital-WDTVLive.mod.conf
(1.47 KiB) Downloaded 230 times

The "Supported video formats:" section tells UMS what your device can play.
f: is file format/extension
v: is video codecs
a: in audio codecs
n: is the max number of audio channels
m: is the mime type to be sent to your renderer

so the section

Code: Select all

Supported = f:mp4             v:mp4|h264               a:aac                m:video/mp4                n:2
Means a file that ends in .mp4 with a video codec of (mp4 or h264) and audio codec of (aac) and max of 2 channels will be streamed.
anything not matching any of those lines will be transcoded. It usually can take an extra few seconds to start the transcoding process as a buffer is usually built up first.
Another way to tell is if you open the task manager in windows it will show an increase of the CPU usage when transcoding.

If you have a look at the DefaultRenderer.conf it shows what all the codec tags are and what other parameters mean.

I wouldn't call .mkv oddball files as there are probably more common than .mp4 now, they can use a variety of codecs, resolutions, many audio tracks and subtitles. but this does make it harder to set up the supported format line, just having it match ".mkv" in the conf isn't going to work well these days. For example h265 is being used more now but old devices like the PS3 will not be able to play that.

The #--Transcode--# folder is a virtual folder UMS creates so you can choose how to transcode a file how you want. The first option should be no transcoding, second is transcoding using the first transcoding engine, then options for subs and audio etc

It can be a bit of a mess though, especially when the file you want to transcode has multiple audio tracks and subtitles. As only one track and subtitle is included in the transcode, all possible combinations are available. Also there are multiple transcoding engines which increases the number of options still. It is easy to have over 50 options if say you were watching an Anime.
Also your renderer night try to be helpful and arrange everything in alphabetical order.

To make it easier, you could turn off the engines that you don't use and only leave one active (say FFmpeg) and turn off the chapters option.
billy6560 wrote: Fri May 14, 2021 11:04 am The feature I'd suggest (besides speeding up the initial folder reads) is that UMS creates a filename database of all the files setup in the shared sections, then, on restart, UMS does a "quick" folder read and make changes to the database as necessary. Really, anything that can be done to remedy the folder read times for shared folders would be very much appreciated.
UMS does have a database and should only do the scan once to populate it, then it watches those directory for any changes, scanning only the new files.
I think I have seen somewhere else about file scanning problems on a NAS but can't remember, I know nothing about them sorry.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
User avatar
mik_s
Moderator
Posts: 1115
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: No AAC audio on MP4 files UMS (10.5) Rev.2 - SOLVED?

Post by mik_s »

If you want to try and improve your conf file, try downloading some test files which have been encoded in various formats and using different codecs.
Play them using the "no transcoding" option in the #--Transcode--# folder. If the video plays without issues then you can add that codec to the supported section.
This may uncover exactly why some AAC were working for you before, my guess is aac-lc works but not he-aac. or maybe there is a limit on the number of channels.

If you manage to get a good working conf that only transcodes the unsupported videos, post it on here so it can be included in future versions of UMS.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
Post Reply