Bubble UPNP Server transcoding

223 views
Skip to first unread message

Richard

unread,
May 17, 2021, 9:43:40 AM5/17/21
to BubbleUPnP
Big thanks bubbleguuum for developing Bubble UPNP Server.  One of the reasons I use it is to transcode radio streams – contained in m3u playlists - to a Yamaha WXA 50, which works well.  Without Bubble UPNP Server this device doesn’t even recognise m3u files!

A quick question: audio decoding to PCM means that the WXA 50 can now play HLS and MPEG Dash streams (for instance http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_6music.m3u8 and http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/dash/uk/dash_full/ak/bbc_6music.mpd), which is a massive plus.  I haven’t clicked the ‘convert to 24-bit to 16-bit’ and I was just wondering if it would be possible to achieve a higher bit depth for either of these streams?

Also, I’ve just realised that decoding to PCM is automatically applied to proxy servers.  I couldn’t find any documentation relating to this and I'm unsure if its intended behaviour.  As I see it this is another big plus – In my case it means I can now select and play m3u’s directly from the MusicCast app (Yamaha’s app for the WXA 50).

Richard

unread,
May 17, 2021, 9:47:56 AM5/17/21
to BubbleUPnP
I forgot to say that the BBC HLS and MPEG dash streams are currently decoded to L16 48000hz...

Bubblesoft

unread,
May 17, 2021, 4:11:15 PM5/17/21
to BubbleUPnP
There is not much point to upsample from 16-bit to 24-bit as the origial stream is 16-bit.

For the proxies, each proxied audio item includes L16 and WAV alternate streams for compatibility, and the browsing device
(here Musicast app) to eventually pick up for playback to the target renderer.

Richard

unread,
May 19, 2021, 12:10:51 PM5/19/21
to BubbleUPnP
Thanks for getting back to me Bubblegum. Transcoding radio streams is a brilliant feature of Bubble UPnP Server and I completely get what you say about the bit depth.  I need to flag up that I made mistake earlier saying that it had enabled me to play the BBC MPEG Dash streams.  I've just checked that again and no joy - I can't play them.  The HLS ones definitely works though.

I realise this is a huge ask, but is there any chance of  Bubble UPnP Server's transcoding ability being extended in the future, so as to include MPEG dash streams?

Bubblesoft

unread,
May 20, 2021, 5:05:36 AM5/20/21
to BubbleUPnP
MPEG-DASH should work with a recent enough version of FFmpeg, although the reason why it did not play could be caused by something else.
FFmpeg binaries installed as part of the ways I provide to install BubbleUPnP Server, support it.
How did you install BubbleUPnP Server and on which OS / hardware ?
Also what UPnP/DLNA media server (that you proxy with BubbleUPnP Server if I understand correct) manages your m3u ?
More generally can you detail how you attempted to play these MPEG-DASH streams ? Speaking of which
the link you provided seems to only work from the UK.

Richard

unread,
May 20, 2021, 6:58:35 AM5/20/21
to BubbleUPnP

My experimenting thus far has been using a Synology NAS (a DS118, with DSM 6.2.4-25556) running Minimserver, as the UPnP server, and Bubble UPnP Server (0.9-update 40).  Also installed on the NAS is SynoCommunity’s take of ffmpeg (Version 4.3.1-35).

Alongside my NAS is a pi/DAC MoodeAudio (version 7.1.0) set up presently running MiniDLNA as another server, though I'd like to start using uprcl, a media server forming part of upmpdcli.

Hence, there’s two device that I’ve attempted to listen to BBC’s MPEG Dash streams, Moode Audio acting as OpenHome renderer, using Linn Kazoo as a control point, which has no issues with playing these.  And the WXA 50, either directly on the Musiccast app and attempting this via a proxy server created by Bubble UPnP Server, or via Linn Kazoo, since I’ve also used Bubble UPnP Server to make the WXA 50 act as an OpenHome Renderer - with decode audio to PCM selected (All audio formats and constraints below, with audio format left at ‘auto’)

Lastly, I’m aware that the BBC has geofenced its high-quality mpeg dash radio streams, which is a bit annoying for us all!  I think it also broadcasts lower quality mpeg dash streams, which perhaps aren’t restricted – maybe for instance this: https://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/dash/nonuk/dash_low/aks/bbc_radio_three.mpd. More are listed here: https://hendrikjansen.nl/henk/streaming2.html

Hope all of that makes sense. Thanks again for your help with this.

R

Bubblesoft

unread,
May 20, 2021, 8:44:04 AM5/20/21
to BubbleUPnP
I think the FFmpeg SynoCommunity version is OK for MPEG-DASH.
Can you confirm by running this command on it to check it is successful:



if it is successful, I will try to replicate your setup to check what happens.

Bubblesoft

unread,
May 20, 2021, 8:48:27 AM5/20/21
to BubbleUPnP

Richard

unread,
May 20, 2021, 12:10:51 PM5/20/21
to BubbleUPnP
Hi, this is the output from that command:-


 :~$ /usr/local/ffmpeg/bin/ffmpeg -i https://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/dash/nonuk/dash_low/aks/bbc_radio_three.mpd
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 4.9.4 (crosstool-NG crosstool-ng-1.22.0-169-g87eb166) 20150629 (prerelease)
  configuration: --target-os=linux --cross-prefix=/home/spksrc/git-master/spksrc/toolchains/syno-aarch64-6.1/work/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi- --prefix=/var/packages/ffmpeg/target --extra-cflags=-I/home/spksrc/git-master/spksrc/spk/ffmpeg/work-aarch64-6.1/install/var/packages/ffmpeg/target/include --extra-ldflags=-L/home/spksrc/git-master/spksrc/spk/ffmpeg/work-aarch64-6.1/install/var/packages/ffmpeg/target/lib --extra-libs='-lxml2 -ldl' --pkg-config=/usr/bin/pkg-config --ranlib=/home/spksrc/git-master/spksrc/toolchains/syno-aarch64-6.1/work/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-ranlib --enable-cross-compile --enable-rpath --enable-pic --enable-shared --enable-gpl --enable-version3 --enable-fontconfig --enable-libass --enable-libbluray --enable-avresample --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopus --enable-libsoxr --enable-libtheora --enable-libvorbis --enable-libspeex --enable-libx264 --enable-libx265 --enable-gnutls --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-debug --disable-doc --disable-static --enable-debug=1 --enable-libfdk-aac --enable-nonfree --extra-cflags=-DSYNO_VIDEOSTATION --extra-cflags=-fno-if-conversion --extra-cflags=-O3 --extra-cflags=-Wno-deprecated-declarations --enable-libvpx --enable-libzmq --enable-libshine --enable-libaom --enable-libsvtav1 --arch=arm64 --enable-neon --enable-thumb --disable-yasm --disable-asm
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
https://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/dash/nonuk/dash_low/aks/bbc_radio_three.mpd: Invalid data found when processing input

Bubblesoft

unread,
May 21, 2021, 4:36:14 AM5/21/21
to BubbleUPnP
Ok, the output shows that this version of ffmpeg is not able to handle the MPEG-DASH url.
The output should be like the one at the end of this post.

My guess is that this is because this ffmpeg version was not compiled with --enable-libxm2,
which is necessary to enable the dash demuxer, for which you can check support with:

/usr/local/ffmpeg/bin/ffmpeg -demuxers | grep dash

It would be great if you could report this issue to the maintainer of that ffmpeg package, so
they can fix it.

In the meantime there might be an alternative.
It seems your NAS is on ARM 64-bit architecture, thus you should be able to uses these binaries:


To use them:

- create a custom_ffmpeg directory in the BubbleUPnP Server install directory.
i think it is /volume1/@appstore/BubbleUPnPServer/ but cannot check it currently as I do not
have access to my Syno NAS. In any case, it is the directory containing BubbleUPnPServer.jar.
- in that custom_ffmpeg directory, put the ffmpeg and ffprobe binaries linked above.
Make sure they are executable:
chmod +x ffmpeg ffprobe
- eventually make sure ffmpeg work:

cd /path/to/custom_ffmpeg
./ffmpeg -i <mpeg dash stream>
.
- restart BubbleUPnP Server. It should pick the binaries.
In case of doubt, you can check in its log file: /homes/bubbleupnp/appData/BubbleUPnPServer.log.0




///////////////

$ffmpeg -i https://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/dash/nonuk/dash_low/aks/bbc_radio_three.mpd
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10 (SUSE Linux)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -ffat-lto-objects -g' --optflags='-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -ffat-lto-objects -g' --disable-htmlpages --enable-pic --disable-stripping --enable-shared --disable-static --enable-gpl --enable-version3 --enable-libsmbclient --disable-openssl --enable-avresample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcelt --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libdc1394 --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librav1e --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libssh --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lto --enable-lv2 --enable-libmfx --enable-vaapi --enable-vdpau --enable-version3 --enable-libfdk-aac-dlopen --enable-nonfree --enable-libvo-amrwbenc --enable-libx264 --enable-libx265 --enable-librtmp --enable-libxvid
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100

  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, dash, from 'https://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/dash/nonuk/dash_low/aks/bbc_radio_three.mpd':
  Duration: N/A, start: 1621585126.400000, bitrate: N/A
  Program 0
  Stream #0:0(en): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp (default)
    Metadata:
      variant_bitrate : 48000
      id              : audio=48000
  Stream #0:1(en): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp (default)
    Metadata:
      variant_bitrate : 96000
      id              : audio=96000
At least one output file must be specified


Richard

unread,
May 22, 2021, 4:15:01 AM5/22/21
to BubbleUPnP
Many thanks for that.  I've reported the issue to Syno Community.  Sorry to say, I'm not out of the woods yet - this is what I now get:

ffmpeg -i https://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/dash/nonuk/dash_low/aks/bbc_radio_three.mpd
ffmpeg version 2.7.7 Copyright (c) 2000-2015 the FFmpeg developers

  built with gcc 4.9.4 (crosstool-NG crosstool-ng-1.22.0-169-g87eb166) 20150629 (prerelease)
  configuration: --prefix=/usr --incdir='${prefix}/include/ffmpeg' --arch=arm64 --target-os=linux --cross-prefix=/usr/local/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi- --enable-cross-compile --enable-optimizations --enable-pic --enable-gpl --enable-shared --disable-static --enable-version3 --enable-nonfree --enable-libfaac --enable-encoders --enable-pthreads --disable-bzlib --disable-protocol=rtp --disable-muxer=image2 --disable-muxer=image2pipe --disable-swscale-alpha --disable-ffserver --disable-ffplay --disable-doc --disable-devices --disable-bzlib --disable-altivec --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libmp3lame --disable-vaapi --disable-decoder=amrnb --disable-decoder=ac3 --disable-decoder=ac3_fixed --disable-encoder=zmbv --disable-encoder=dca --disable-encoder=ac3 --disable-encoder=ac3_fixed --disable-encoder=eac3 --disable-decoder=dca --disable-decoder=eac3 --disable-decoder=truehd --disable-decoder=hevc --disable-muxer=hevc --disable-demuxer=hevc --disable-parser=hevc --cc=/usr/local/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-ccache-gcc --enable-yasm --enable-libx264 --enable-encoder=libx264
  libavutil      54. 27.100 / 54. 27.100
  libavcodec     56. 41.100 / 56. 41.100
  libavformat    56. 36.100 / 56. 36.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 16.101 /  5. 16.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
  libpostproc    53.  3.100 / 53.  3.100
https protocol not found, recompile FFmpeg with openssl, gnutls,
or securetransport enabled.
https://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/dash/nonuk/dash_low/aks/bbc_radio_three.mpd: Protocol not found

Richard

unread,
May 24, 2021, 8:10:43 AM5/24/21
to BubbleUPnP
OK, I've now explored this further.  It seems that I had an old version of ffmpeg in the bin folder, which I've renamed 'ffmpeg old'.  I then copied the arm64 binaries  from your website to this folder, made them executable, and restarted BubbleUPnPServer .  Output from command line now appears to work (see below).  However, while the mpeg dash radio stream now starts to play from Kazooo, it completely freezes after about 15 seconds.  This freezing also occurs with the latest johnvansickle static version of ffmpeg  (v 4.4)


=== 
ffmpeg -i https://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/dash/nonuk/dash_low/aks/bbc_radio_three.mpd
ffmpeg version 4.3.2-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzimg

  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
  Duration: N/A, start: 1621857356.800000, bitrate: N/A

  Program 0
    Stream #0:0(en): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 48000
      id              : audio=48000
    Stream #0:1(en): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 96000
      id              : audio=96000
At least one output file must be specified
Message has been deleted
Message has been deleted

Richard

unread,
Oct 13, 2021, 10:08:43 AM10/13/21
to BubbleUPnP
Syno Community have just released an updated version of ffmpeg, specifically address in this issue.  Thanks for all your help with this Bubblegum.  At long last my Synology NAS is now able to play DASH streams!! 

Bubblesoft

unread,
Oct 13, 2021, 10:15:08 AM10/13/21
to BubbleUPnP
Hi,

Great ! Thank you for letting me know.
Reply all
Reply to author
Forward
0 new messages