how to not transcode audio or how to transcode it to stereo-mp3

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
BadTrip
Posts: 4
Joined: Tue Sep 06, 2022 5:20 am

how to not transcode audio or how to transcode it to stereo-mp3

Post by BadTrip »

Hello,

short time ago I was using the Win7 Media Server that worked well but now after I switched to Win10, the internal media server doesn't properly transcode the video files anymore to be compatible with my TV. I tried Kodi and Plex as alternative but UMS seems to work better. But there's still a problem that I couldn't solve yet.

I have an old Panasonic TX-P50GW20 and it gets detected by UMS without any problems. The TV itself can handle avi, but it can't handle mp4 for example, that's why I need to transcode them and it works fine with UMS. The problem is my speaker system. It's a Logitech 5.1 system with "DTS digital surround" and "Dolby Digital" logos. I can hear the audio when streaming videos with UMS to my TV, but not how I like it.

As long as the audio signal is stereo, my speaker system can either convert it to 3D surround or it can mirror it to rear speakers or it can force it to stereo front speakers. But if the signal is not stereo but Dolby2 or Dolby5.1, I can't switch my speaker system anymore because it's decoding this Dolby Signal and forces the signal to how it's encoded. With other words: as long as a 2channel audio is decoded as dolby, I don't have any chance to get it to my rear speakers but I can do it if it's stereo but not dolby.

Is there a way to transcode video but not audio? Or maybe to transcode audio to mp3 stereo?

I tried a bit with "Common Transcode Settings" and "Audio Settings". What I can say so far:

- "Maximum number of audio channels to output for AC-3 re-encoding" only switches between dolby2 and dolby5.1 in tsMuxeR, but this dolby2 is not the "stereo" that I want
- my TV doesn't like LPCM
- checkboxes for keep AC-3/DTS tracks and "encoded audio passthrough" didn't change anything
- disabling the "Audio Files Engines" FFmpeg and tsMuxeR didn't work

Whatever I've tried, the audio channel remained "dolby".
User avatar
mik_s
Moderator
Posts: 1115
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: how to not transcode audio or how to transcode it to stereo-mp3

Post by mik_s »

I don't know much about the actual transcoding options but as far as know you should be able to uncheck "keep DTS tracks" to do it if that option is working. It is possible the checkbox and the option has become disconnected in code at some point and has not been discovered.

I had a quick look in the defaultrenderer.conf to see if there is any other transcoding options that may work. There is mention that the VLC transcoding engine only outputs 2ch audio so that might do what you want it to do. I can't remember if you need to install VLC separately to be able to use it though.

I don't know your setup or your preferences but I would have thought that proper surround sound with DTS would be the the best experience. If it is not working right for you it may be that your speakers are not setup right.
I suggest you download some DTS test videos to see if the sound is coming from the right speaker and try and see if there is any options on your receiver that will let you tweak it to how you like it.
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.
BadTrip
Posts: 4
Joined: Tue Sep 06, 2022 5:20 am

Re: how to not transcode audio or how to transcode it to stereo-mp3

Post by BadTrip »

mik_s wrote: Tue Sep 06, 2022 2:48 pmbut as far as know you should be able to uncheck "keep DTS tracks" to do it if that option is working
I've tried that without any success. I can't tell you if the options are generally not working. The video that I currently try has "MPEG AAC Audio (mp4a)" stereo like several other youtube vids and it's diplayed as "AAC-LC" in UMS transcoding folder. I would like to have it as "MP3"
mik_s wrote: Tue Sep 06, 2022 2:48 pmThere is mention that the VLC transcoding engine only outputs 2ch audio so that might do what you want it to do
I've tried VLC already, it outputs Dolby2ch and doesn't help me.
mik_s wrote: Tue Sep 06, 2022 2:48 pmI don't know your setup or your preferences but I would have thought that proper surround sound with DTS would be the the best experience.
Not all videos are hollywood popcorn blockbusters where a helicopter surrounds you all the time while shooting bullets that hits something behind you. Sometimes a video is more focused to dialogues or something and then I don't want to listen to a small and silent middle speaker in front of me that gets interrupted by a large explosion that wakes up my neighbours in the case I turn the volume up to better understand the speaking. In this case I simply like to mirror the speaking to my front and rear speakers because I can understand them better and it keeps my neighbours calm.

There's another example. Formula1 in German, Austrian (ORF) and Swiss TV only comes along in 2ch sound. As long as there is a stereo channel, my speakers can emulate some kind of surround sound that keeps the comments in front and puts the engine sounds to the back. I can't do that as long as they are fixed to Dolby. For example Austrian ORF only broadcasts in Dolby5.1 but during F1 the rear speakers remain silent. They simply don't use the rear channels all the time.

And it's the same with current UMS. The audio channel might be called Dolby5.1 but it doesn't give me proper surround sound as long as it's generated from 2ch audio and doesn't use rear. To get surround I need either a stereo-mp3 or I need real Dolby5.1.
mik_s wrote: Tue Sep 06, 2022 2:48 pmIf it is not working right for you it may be that your speakers are not setup right.
I suggest you download some DTS test videos to see if the sound is coming from the right speaker and try and see if there is any options on your receiver that will let you tweak it to how you like it.
I've tried 3 videos in 3 fileformats from demolandia.net. They all work more or less if I stream them with UMS and standard. Their channel is Dolby5.1 and that's not a problem as long as the channels are really used.

It's also not the receiver. With Win7 Media Server the same video was working how I wanted.
BadTrip
Posts: 4
Joined: Tue Sep 06, 2022 5:20 am

Re: how to not transcode audio or how to transcode it to stereo-mp3

Post by BadTrip »

sorry for double post, but I did some further investigations

it seems that as long as the video is AVI, the codec is Xvid and the audio is MP3 Stereo, everything is fine and my TV doesn't need to transcode. If it's not Xvid/AVI, UMS starts to transcode and the audio gets converted to unwanted dolby, even if it's MP3 already

I tried an offline conversion of my problemVid.mp4 using ffmpeg. If I convert it using "ffmpeg64 -i problemVid.mp4 -c:v mpeg4 -vtag xvid output.avi" then my TV can display this video both with UMS and Win10 and the sound is how I like it.

Now the question. Is it possible to reconfigure UMS to use these FFMPEG settings and if yes: what exactly do I have to change?
User avatar
mik_s
Moderator
Posts: 1115
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: how to not transcode audio or how to transcode it to stereo-mp3

Post by mik_s »

Yes it should be possible to use custom commands for FFmpeg but I know very little on how to actually do that.

There is more info inside the DefaultRenderer.conf but I think this is the option you need and you can add it to the conf that you are using for you TV.

Code: Select all

# Overrides the FFmpeg custom options in UMS for this renderer. Default is
# empty, which means the UMS settings will be used.
# All setting for output formats, codecs, bitrate e.g. can be used except video,
# audio and subs mapping (-map).
# Do not use it to override -vf; use OverrideFFmpegVideoFilter instead.
# Default: ""
CustomFFmpegOptions = 
I would suggest making a copy of the original conf and add "modified" or something to the name of the one you are going to use so you can see if UMS is using it. This will prevent the changes being reverted when you update UMS. Also set LoadingPriority = to a higher number so this one will take priority over the original
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.
BadTrip
Posts: 4
Joined: Tue Sep 06, 2022 5:20 am

Re: how to not transcode audio or how to transcode it to stereo-mp3

Post by BadTrip »

Heureka!

Forget about xvid and mpeg4, all I had to do was overriding the audio codec parameter using CustomFFmpegOptions

Solution:
  • go to "renderer" folder and edit the config file of your device (in my case: renderer/Panasonic-Viera.conf)
  • add the following line: "CustomFFmpegOptions = -c:a mp3" to make it look like this

    Code: Select all

     SeekByTime = exclusive
     DLNALocalizationRequired = true
     TranscodeVideo = MPEGTS-H264-AC3
     TranscodeAudio = WAV
     MaxVideoBitrateMbps = 90
     TranscodeFastStart = true
     KeepAspectRatioTranscoding = true
     RescaleByRenderer = false
     SendDateMetadata = false
     PushMetadata = false
     CustomFFmpegOptions = -c:a mp3
    
  • save the file and restart UMS if it's running already

then it works by standard, no #--TRANSCODE--# folder used and everything inside this folder only generates dolby signals
Post Reply