Page 1 of 1

HLS / DASH audio stream transcoding

PostPosted: Mon Nov 06, 2023 6:40 pm
by dash
My Onkyo amp no longer works with TuneIn, and the BBC have moved to MPEG-DASH and HLS for their audio streams. I was wondering if it was possible to get this to work through Serviio.

I've tried adding their HLS stream to Serviio as an online source, fine that works.
http://as-hls-ww.live.cf.md.bbci.co.uk/ ... ewind.m3u8

But my amp doesn't play the stream, so I'm hoping to use transcoding, but struggling a bit.

I tried simply to create a slim profile with this in:
  Code:
<Transcoding>
                        <Audio targetContainer="lpcm">
                                <Matches container="*" />
                        </Audio>
                </Transcoding>


As a starter for ten. It'll transcode local MP3s etc (which is absolutely not something I want to do ultimately), but the stream still doesn't work.

In the logs, the only thing I'm seeing with this approach is:

2023-11-06T18:30:24,685 INFO [PlaybackEventsManager] Playback of media item 1000000040001325 (http://as-hls-ww.live.cf.md.bbci.co.uk/ ... ewind.m3u8 [http://as-hls-ww.live.cf.md.bbci.co.uk/pool_904/live/ww/bbc_radio_fourfm/bbc_radio_fourfm.isml/bbc_radio_fourfm-audio%3d96000.norewind.m3u8]) has stopped at 0%


Can anybody nudge me in the right direction? Ideally I only want to transcode DASH or HLS streams irrespective of the codec (AAC+ as it happens here).

Thanks

Re: HLS / DASH audio stream transcoding

PostPosted: Tue Nov 07, 2023 3:05 pm
by atc98092
Online streaming uses a different section of the profile. I'm at work, so I don't have access to my files, but look at the support section of the Serviio web site for more details about online transcoding. It's a ways down the page.

https://www.serviio.org/index.php?optio ... icle&id=24

Re: HLS / DASH audio stream transcoding

PostPosted: Sat Nov 11, 2023 2:32 pm
by dash
Thanks for the hint. I changed to:

  Code:
<OnlineTranscoding>
                        <Audio targetContainer="lpcm">
                                <Matches container="*" />
                        </Audio>
                </OnlineTranscoding>



Doesn't seem to make much difference.

  Code:
2023-11-11T14:25:10,075 INFO  [PlaybackEventsManager] Playback of media item 1000000030001614 (http://as-hls-ww.live.cf.md.bbci.co.uk/pool_904/live/ww/bbc_radio_one/bbc_radio_one.isml/bbc_radio_one-audio%3d96000.norewind.m3u8 [http://as-hls-ww.live.cf.md.bbci.co.uk/pool_904/live/ww/bbc_radio_one/bbc_radio_one.isml/bbc_radio_one-audio%3d96000.norewind.m3u8]) has started at 0% on Identifier=x.x.x.x, Profile=Onkyo x2x AVR, Name=Lounge Amp
2023-11-11T14:25:10,088 WARN  [ProcessExecutor] Process ffmpeg has a return code of 137! This is a possible error. Detailed output follows.
[hls @ 0x55e0c80a71c0] Skip ('#EXT-X-INDEPENDENT-SEGMENTS')
[hls @ 0x55e0c80a71c0] Skip ('#USP-X-TIMESTAMP-MAP:MPEGTS=4589045664,LOCAL=2023-11-11T14:25:04Z')
[hls @ 0x55e0c80a71c0] Skip ('#EXT-X-PROGRAM-DATE-TIME:2023-11-11T14:25:04Z')
[http @ 0x55e0c80d1b80] Opening 'http://as-hls-ww.live.cf.md.bbci.co.uk/pool_904/live/ww/bbc_radio_one/bbc_radio_one.isml/bbc_radio_one-audio=96000-265580115.ts' for reading
size=    3616kB time=00:00:19.24 bitrate=1539.4kbits/s speed=3.01x
2023-11-11T14:25:17,093 INFO  [PlaybackEventsManager] Playback of media item 1000000030001614 (http://as-hls-ww.live.cf.md.bbci.co.uk/pool_904/live/ww/bbc_radio_one/bbc_radio_one.isml/bbc_radio_one-audio%3d96000.norewind.m3u8 [http://as-hls-ww.live.cf.md.bbci.co.uk/pool_904/live/ww/bbc_radio_one/bbc_radio_one.isml/bbc_radio_one-audio%3d96000.norewind.m3u8]) has stopped at 0% on Identifier=x.x.x.x, Profile=Onkyo x2x AVR, Name=Lounge Amp

Re: HLS / DASH audio stream transcoding

PostPosted: Sat Nov 11, 2023 2:34 pm
by dash
Trying out different containers, it works briefly as "mp3" but then stops working after a few seconds.

Re: HLS / DASH audio stream transcoding

PostPosted: Sat Nov 11, 2023 5:26 pm
by atc98092
FFMPEG returning an error code of 137 apparently means a memory issue. You might try increasing the amount of memory allotted to Java (although FFMPEG isn't running under Java itself, so this is just a wild guess). In the file named user.vmoptions in the config folder, there's an entry labeled "-Xmx512m". Try increasing the number in increments of 256. For example, the first one to try would be 768, then 1024, and so on.

Re: HLS / DASH audio stream transcoding

PostPosted: Mon Nov 13, 2023 6:15 pm
by dash
I didn't have a vmoptions file, but I created one with that specified. The ffmpeg error disappeared, but the experience seems to be the same, I get 2 seconds of content on the amp and then it stops working. If I then retry or change other streams I get nothing.

I thought I'd try on another device, and I get the same (albeit slightly more consistent results): a couple of seconds of playback and then the track stop (I've got two added, and client moves to the next stream). These are low bandwidth streams, so there shouldn't be any problem from that perspective, and Serviio does a good job of transcoding local video etc. It feels like it's struggling with an online stream as the source.

I'm on ffmpeg 4.4.4 which seems to be the latest for my distribution.