Page 1 of 1
Inverse Request: More Audio Transcoding Codec Support
Posted: Sun Sep 14, 2025 5:33 pm
by dewdude
Hi,
This is not a usual feature suggestion; this is more of an inverse feature request. Rather than go through the hassle of wasting resources and time with PRs and having no clue what the internal discussion procedures are for new features (I once had someone send me a very angry email because they felt my PR was wasting time)...well I figured I'd post here. I'm also asking because if this hasn't been added by now...then either I'm the first person to want it and therefore probably the only one; or there's some other reason it's never been included with the project.
Anyway...I am primarily a music guy; and I mistakenly thought my previous UPnP server supported transcoding to more than just MP3. This was also the only thing I could think that UMS was missing. I was wrong; my previous server only transcoded to WAV, MP3, or LPCM. Either way...I built support for transcoding to Opus and AAC in to UMS; actually exceeding that my last solution did. I've gone as far as testing it with foobar2000 mobile and both Opus and AAC streaming worked.
If there's no other reason this isn't already a feature other than I'm the first person to do something about it, then let me know and I'll fire off a PR.
Thanks,
-Jay
Re: Inverse Request: More Audio Transcoding Codec Support
Posted: Sun Sep 14, 2025 10:13 pm
by mik_s
UMS already has this and is set up in the renderer's .conf file depending on what it supports.
It may be possible that on its own it can play many formats but can only use one for transcoded streams. Same applies to video.
This is from the documentation in DefaultRenderer.conf
Code: Select all
#-----------------------------------------------------------------------------
# TRANSCODING AND MUXING CAPABILITIES
#
# It is very likely that a renderer cannot render all file formats. If this is
# the case, UMS should transcode or mux the file to a format that the renderer
# can display. This section defines the format that UMS should transcode or
# mux to.
#
# Profile to use for transcoding video files.
# Options:
#
# Profile Video Audio Container Notes
# ---------------------------------------------------------------
# HLS-MPEGTS-H264-AAC H.264 AAC MPEG-TS Allows adaptive quality
# HLS-MPEGTS-H264-AC3 H.264 AC-3 MPEG-TS Allows adaptive quality
# MP4-H264-AAC H.264 (AVC) AAC MP4
# MP4-H265-AC3 H.265 (HEVC) AC-3 MP4
# MPEGPS-MPEG2-AC3 MPEG-2 AC-3 MPEG-PS VLC only outputs 2-channel AC-3 audio
# MPEGTS-MPEG2-AC3 MPEG-2 AC-3 MPEG-TS VLC only outputs 2-channel AC-3 audio
# MPEGTS-H264-AC3 H.264 (AVC) AC-3 MPEG-TS VLC only outputs 2-channel AC-3 audio
# MPEGTS-H264-AAC H.264 (AVC) AAC MPEG-TS Not DLNA-compliant
# MPEGTS-H265-AC3 H.265 (HEVC) AC-3 MPEG-TS Only FFmpeg outputs H.265, others will output H.264
# MPEGTS-H265-AAC H.265 (HEVC) AAC MPEG-TS Only FFmpeg outputs H.265, others will output H.264, not DLNA-compliant
# WMV: WMV 2 (WMV 8) WMA 2 ASF
#
# These profiles are supported by the MEncoder, FFmpeg and VLC engines.
# Multiple profiles can be use in case the first cannot handle everything (like HLS)
# eg: HLS-MPEGTS-H264-AAC, MPEGTS-H264-AAC
# Default: MPEGPS-MPEG2-AC3
TranscodeVideo =
# Profile to use for transcoding audio files
# Options: "LPCM", "MP3" or "WAV".
# Default: LPCM
TranscodeAudio =
Other formats are probably not suitable if they are not DLNA-compliant, but some of the video options are like this so may work on few devices.
You could try making a PR on Github if you want to add more formats for audio if your device works with this.
The Devs are more than happy to allow others to contribute and if it improves UMS they will accept it.
BTW could you remove the web address from your profile?
Most of the time this is used by spam bots and I usually ban on sight any that have this.
I don't know what wendys is but I'm aware of the meme so its a good thing I checked your post first.
Re: Inverse Request: More Audio Transcoding Codec Support
Posted: Mon Sep 15, 2025 3:45 am
by dewdude
mik_s wrote: ↑Sun Sep 14, 2025 10:13 pm
UMS already has this and is set up in the renderer's .conf file depending on what it supports.
Only if the code to support them also exists in TranscodingSettings.java so it knows what those formats are; as well as in ffmpegaudio.java so it can parse the command line to encode the format; and TranscodingSettings.java needs to be setup so it sends the proper MIME type or the client won't play it. The fact this wasn't in there already made me wonder if due to audio being the neglected step-child of the DLNA world...no one touched the audio portion since before the long-ago fork. I mean I did my research and found that 99.9% of the people using this seem to be interested in just video.
mik_s wrote: ↑Sun Sep 14, 2025 10:13 pm
BTW could you remove the web address from your profile?
Most of the time this is used by spam bots and I usually ban on sight any that have this.
I don't know what wendys is but I'm aware of the meme so its a good thing I checked your post first.
Fine; but it's a shame. I'm just going to pretend that you did and while...I get it because I also run forums; not cool man. not cool. You might stop spammers but you'll upset a lot of potential users; and in the open-source community, that can backfire.
I'll just stick to my fork.