Jump to content

Unable to play most of my music files on the Emby for Roku App


Gaz

Recommended Posts

It was working fine, now none of the music that I have 'favourited' will play as won't most of the thousands of MP3 files in my music library. But the very ocassional mp3 file WILL play!?

 

Nothing has changed on my PC and my Roku hasn't been updated. I've tried deleting my entire music library and then recreating it from scratch but that doesn't fix the problem.

 

When I try to play a music file I get an error message stating 'Playback error. An unexpected problem (but not server timeout or http error) has been detected'

 

I've tried playing songs I've had in the library for years and one's that I've only just added but I get the same error message. I spent hours wading through the entire collection and ocassionaly I'll find a music file that will actually play!

 

I can't fathom out why some will play but most won't, nothing had been changed by me in my music library or server side.

 

I've tried playing my music collection back through the 'Emby Blue Neon Night' roku app and all files play fine so surely something is wrong with the official Emby for Roku app?

 

Can someone please tell me what to troubleshoot and how and what files need to be deleted in the \AppData\Roaming\Emby-Server folder if I need to completely scrub any details the server is holding on my music library etc so I can try once again to set it up from scratch.

 

Thanks in advance.

Edited by Gaz
Link to comment
Share on other sites

I enabled the debug option on the Roku app and sent the log as requested.

 

Various music files as previous description above.

 

Log sent at 11.26am.

 

Emby user GAZ logged in.

 

Screenshots of example error message attached too.

 

 

 

 

 

post-598-0-82085800-1528022768_thumb.jpg

post-598-0-49122400-1528022776_thumb.jpg

post-598-0-41448400-1528022786_thumb.jpg

Edited by Gaz
Link to comment
Share on other sites

Do your Rokus all report a recent system update?

 

Mine reports one on May 30th and it is now no longer reporting support for mp3 audio  :blink:

Link to comment
Share on other sites

Cheers for the reply ebr. I just checked all the audio that does work and your right, it is indeed in FLAC format and it's the MP3's that don't playback.

 

So this is Roku's fault then?

 

Why does the 'Blue Neon Night' emby roku player not suffer from this same problem then?

 

Confused! :unsure:

Link to comment
Share on other sites

I just put a temporary workaround up on the beta channel.

Thanks ebr, will go test now!

 

Update: MP3 playback is now working again on the beta version :)

 

I saw Roku updated the system software on the 25th of May, just surprised that it's taken over a week for anyone to notice!

Edited by Gaz
Link to comment
Share on other sites

Cheers for the reply ebr. I just checked all the audio that does work and your right, it is indeed in FLAC format and it's the MP3's that don't playback.

 

So this is Roku's fault then?

 

Why does the 'Blue Neon Night' emby roku player not suffer from this same problem then?

 

Confused! :unsure:

    device = CreateObject("roDeviceInfo")
    audio = device.GetAudioDecodeInfo()
    
    ' Direct Playback mp3 and wma(plus flac for firmware 5.3 and above)
    If (container = "mp2") and audio.lookup("MP2") <> invalid
        item.Url = GetServerBaseUrl() + "/Audio/" + itemId + "/stream.mp2?static=true"
        item.StreamFormat = "mp2"
    item.playMethod = "DirectStream"
    item.canSeek = true

    Else If (container = "mp3") and audio.lookup("MP3") <> invalid
        item.Url = GetServerBaseUrl() + "/Audio/" + itemId + "/stream.mp3?static=true"
        item.StreamFormat = "mp3"
    item.playMethod = "DirectStream"
    item.canSeek = true

    Else If (container = "wav") and audio.lookup("LPCM") <> invalid
        item.Url = GetServerBaseUrl() + "/Audio/" + itemId + "/stream.wav?static=true"
        item.StreamFormat = "pcm"
    item.playMethod = "DirectStream"
    item.canSeek = true

    Else If (container = "wma") and audio.lookup("WMA") <> invalid
        item.Url = GetServerBaseUrl() + "/Audio/" + itemId + "/stream.wma?static=true"
        item.StreamFormat = "wma"
    item.playMethod = "DirectStream"
    item.canSeek = true

    Else If (container = "m4a" or container = "mka") and audio.lookup("AAC") <> invalid
        item.Url = GetServerBaseUrl() + "/Audio/" + itemId + "/stream.mp4?static=true"
        item.StreamFormat = "mp4"
    item.playMethod = "DirectStream"
    item.canSeek = true

    'Else If (container = "mka") and audio.lookup("VORBIS") <> invalid
    '    item.Url = GetServerBaseUrl() + "/Audio/" + itemId + "/stream.mka?static=true"
    '   item.StreamFormat = "vorbis"
    'item.playMethod = "DirectStream"
    'item.canSeek = true
        
    Else If (container = "flac") And CheckMinimumVersion(versionArr, [5, 3]) and audio.lookup("FLAC") <> invalid
        item.Url = GetServerBaseUrl() + "/Audio/" + itemId + "/stream.flac?static=true"
        item.StreamFormat = "flac"
    item.playMethod = "DirectStream"
    item.canSeek = true

    'Else If (container = "aiff") or (container = "aif") And CheckMinimumVersion(versionArr, [5, 3]) and audio.lookup("ALAC") <> invalid
    'item.Url = GetServerBaseUrl() + "/Audio/" + itemId + "/stream.alac?static=true"
       'item.StreamFormat = "alac"
    'item.playMethod = "DirectStream"
    'item.canSeek = true
    Else
        ' Transcode Play
        item.Url = GetServerBaseUrl() + "/Audio/" + itemId + "/stream.mp3?audioBitrate=320000&deviceId=" + getGlobalVar("rokuUniqueId", "Unknown")
        item.StreamFormat = "mp3"
    item.playMethod = "Transcode"
    item.canSeek = item.Length <> invalid
    End If

This code above is how blue neon does it. Use the GetAudioDecodeInfo() array and compare if its supported by using lookup("CODEC")

 

Note: I am aware the code for vorbis and aiff are commented out. These require more than just checking the container, and the codec and need better IF's built. So little music is contained in these that I never finished that part.

 

Why use "lookup" instead of "doesexist"?

 

Lookup(key as String) as Dynamic

Return the value in the array associated with the specified key. If there is no value associated with the key then type "invalid" is returned.  Key comparison is case-insensitive, unless SetModeCaseSensitive() has been called.

 

DoesExist(key as String) as Boolean

Look for an entry in the array associated with the specified key. If there is no associated object then false is returned. If there is such an object then true is returned.

 

Because it's case insensitive and looks cleaner than messing with string-to-(lower/uppers).

 

Maybe @@ebr is using CanDecodeAudio()? In all my tests CanDecodeAudio is redundant and should never be used. Its wrong half the time, and bitrate, container and some other things aren't supported with it.

 

The only time I trust CanDecodeVideo() is to check for "HEVC" or "VP9" codec and then you can set the max display resolution to 4k since only 4k devices have these codecs available.

Edited by speechles
Link to comment
Share on other sites

The official app uses the same method and, with my Roku on (just recently updated) FW 8.1.0 the lookup for mp3 fails.  I even did it under the debugger.

Link to comment
Share on other sites

Still confused - so if the offical app uses the same method and the mp3 lookup still fails, why does Blue Neon Night work?

 

@@ebr what coding did you change in the latest beta as a 'workaround' ?

Link to comment
Share on other sites

https://blog.roku.com/developer/developer-release-notes-for-roku-os-8-1

 

My roku ultra is still on 8.0.1, has been since March 27th. Probably more users to upset on ultras with bad firmware updates, so they start these on the "low user counts" side and work their way up. Less disruption that way and you catch bugs as you introduce more platforms to the water.

 

@@ebr

 

what happens in the debugger if you:

d = createobject("rodeviceinfo") : ? d.GetAudioDecodeInfo()
 

is there anything else missing? There is no alternative to this method, so likely somebody needs to yell (read this as post about it at roku forums) at roku before this update makes it to the ultras. They did make changes to roDeviceInfo too, they removed the DRM support that nobody was using and the methods to access it.

 

( After you read below, read this part... Maybe should be transcoding to mp4 container and using the AAC codec, rather than using the mp3 container filled with its standard mp3 codec, or maybe...the best of both worlds, allow the user a choice? )

 

@@Gaz

 

blue neon works, because it treats mp3 as the defacto transcode codec (for music/audio), without checking if the roku supports it, since all roku models now and into the future can without royalty payments or any licensing due. I do oddly check if the roku supports mp3 before I allow it to direct stream.. but didn't when allowing transcoding.

 

I did this for a reason and what if MP3 is missing from GetAudioDecodeInfo() eventually in some botched firmware update? Roku does make mistakes. So I made it so then the transcode part shouldn't check. This might be the difference why blue neon works. It is just arbitrarily deciding that mp3 just will work and make the server transcode to that without checking if indeed the roku supports mp3. I suspect ebr is checking if mp3 is able to be looked up before allowing transcoding and the change is follow like blue neon, and just assume the roku can handle mp3 without checks, just transcode.

 

You can tell if this is the case. It should say transcoding rather than direct streaming in the server dashboard.

Edited by speechles
  • Like 1
Link to comment
Share on other sites

@@ebr what coding did you change in the latest beta as a 'workaround' ?

 

I just made the assumption that mp3 was supported since all Rokus should.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...