FAQ  •  Register  •  Login

Roku audio missing only when source is online, not local

<<

bkeith4web

Streaming enthusiast

Posts: 32

Joined: Sat Feb 02, 2013 11:48 pm

Post Wed Nov 09, 2022 8:48 pm

Roku audio missing only when source is online, not local

I've got a custom profile extending RokuMPApp and it works great for downloaded files, only transcodes when needed etc.
New project, streaming video from a website through Streamlink and VLC to create a local http stream (http://mypc:8081) and that's the Serviio online source. There used to be an app that did all this including invoking VLC using Streamlink, that app is now dead so I'm recreating the process with Streamlink-VLC-Serviio.

My problem is that the audio is missing from both Roku and Serviio mediaBrowser (the audio plays fine locally in VLC if I just play the Streamlink source rather than streaming it as http). If I save the file using VLC instead of streaming it and then play that file through Serviio, the audio plays great in MB and in Roku. And, no transcoding is needed at all as a local file. So it's only a problem as an online source in Serviio.

It's probably some codec problem (h264 video codec in mpeg-4, audio is AAC muxing mode ADTS based on the saved file) but while troubleshooting I disabled transcoding in Serviio to narrow down exactly what was going on and, a transcoding job is still kicked off. My custom profile is definitely being invoked based on the Serviio log file:

"Delivering file 'http://mypc:8081' using transcoding (profile: CustomRoku4kMPM2 > quality: ORIGINAL > OnlineTranscoding > [APPLE_HTTP] > matcher: 2)"

The entire custom profile is a copy of the stock Roku profile except at the very end where I transcode audio from eac3 to ac3 (prior issue, not related to this). So the Online Transcoding section is this:

<Video targetContainer="applehttp"> <!-- dont transcode audio -->
<Matches container="mp4" />
<Matches container="flv" vCodec="h264" />
</Video>

alwaysenabletranscoding parameter isn't in my custom profile or in the stock one (although I now know that it IS in the MediaBrowser profile in application-profiles.xml).

First question: does the 'matcher: 2' mean it's matching on the second matches line with container=flv? It should be matching on mp4 but maybe I'm misunderstanding.
Second question: even with transcoding disabled, it looks like the profile xml will still be crawled looking for matches to trigger transcoding?
Third question:Disabling transcoding just prevents ffmpeg from being invoked?

So I removed the online transcoding section and now it still tries to kick off transcoding (a folder is created in my transcoding directory) but then a java io exception is thrown as it can't find the m3u8 file etc etc. So maybe turning off transcoding is partly working and ffmpeg is NOT being invoked, but Serviio "thinks" there will be transcode files in place and is still trying to use them?

Fourth question: with no match for transcoding since I deleted the online transcoding section, should it still be looking for transcoding files that don't exist?

Hopefully I can just mirror something that works from the regular transcoding section into the online transcoding section to get my audio working. But, since the same video as a local file plays with no transcoding, I was hoping to avoid any transcoding when playing it as an online source.
<<

atc98092

User avatar

DLNA master

Posts: 4912

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Wed Nov 09, 2022 11:13 pm

Re: Roku audio missing only when source is online, not local

Fourth question: with no match for transcoding since I deleted the online transcoding section, should it still be looking for transcoding files that don't exist?


I can't answer most of your questions, but the one above I can take a stab at.

What is your selection for the extendsProfileId= line? Are you extending from the generic profile, or from one of the existing Roku profiles? Even if you've deleted the OnlineTranscoding section, the profile you're extending from has one, so it's using whatever that says. That might be what's triggering transcoding even when you think it's off.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 8 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

bkeith4web

Streaming enthusiast

Posts: 32

Joined: Sat Feb 02, 2013 11:48 pm

Post Thu Nov 10, 2022 4:30 am

Re: Roku audio missing only when source is online, not local

Thanks for looking in Dan (again, over several years).
I'm extending the RokuMPApp profile so I get what you are saying, it's got an online transcoding section that is probably what's being used. This will save me some banging of head against wall especially since the end goal is no transcoding or as little workload as possible like just re-muxing.

Through more experimenting and reading I think I've figured out the other ones.

First question: the matcher:2 was because it turns out the container apparently really is 'flv' instead of 'mpeg4' which would also explains the lack of audio. mp3 and aac are supported audio codecs for flv containers but apparently ac3 is not. Found this on stack overflow re: the http stream created by vlc player, still need to experiment & verify but should be easily fixable.

Second and third questions: If there is a match to trigger transcoding in the profile, then Serviio will try to transcode even if 'enable transcoding' is off so that setting just (apparently) means "don't invoke ffmpet", not "bypass checking whether transcoding is needed". Makes sense, I just didn't realize it assuming what I read is correct.

Also turns out that VLC isn't even needed, streamlink can produce an http stream all by itself that is valid for Serviio as an online source. Just a bit of container/codec tweaking to finish up in the online transcoding for Roku (media browser works fine now).

Brad
<<

bkeith4web

Streaming enthusiast

Posts: 32

Joined: Sat Feb 02, 2013 11:48 pm

Post Fri Nov 11, 2022 6:21 pm

Re: Roku audio missing only when source is online, not local

Looks like the audio problem is due to a serviio bug when invoking ffmpeg from online transcoding that I partially stumbled on a year ago viewtopic.php?f=7&t=30154&p=134408&hilit=online+source+example#p134408

Even MediaBrowser using the completely stock html5 profile has this problem because when ffmpeg is invoked for an online source, it is passed the "-an" flag saying "don't create an audio stream". I verified this looking at the transcode files, they are video-only, no audio stream so no sound in mediabrowser (or in my other DLNA renderers). The online source, created locally on my PC does include audio, verified when opening the stream with VLC. Here is the ffmpeg line from the serviio log and again this is mediabrowser but the same thing happens with RokuMPApp and bdp2013 profiles:

C:\Program Files\Serviio\bin\\..\lib\ffmpeg.exe -fflags +genpts -threads 0 -analyzeduration 10000000 -i http://gamer:8081 -y -c:v copy -bsf:v h264_mp4toannexb -an -map 0:0 -sn -f hls -hls_time 10 -hls_allow_cache 0 -hls_segment_filename E:\temp\Serviio\transcoding-temp-e0df80b28b6e48f1eb6bc26ab45e3a0d.stf\segment%05d.ts -hls_list_size 10 -hls_flags delete_segments E:\temp\Serviio\transcoding-temp-e0df80b28b6e48f1eb6bc26ab45e3a0d.stf\playlist.m3u8

Why in the world would the "-an" flag be there? Could it be anything to do with the order of the audio & video stream in the online source? I'm not aware of any setting in Serviio console that would cause this.

The reason I was able to watch an online stream for years (hockey games) without being aware of this problem was because that particular sony blu-ray player did not need transcoding done, it could handle that particular online stream natively and I never used MediaBrowser to watch this stream.

Return to Transcoding

Who is online

Users browsing this forum: No registered users and 8 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.