Plex Web doesn't direct play opus music

Server Version#: 1.14.1.5488-cc260c476
Player Version#: 3.85.2

Plex transcodes opus music to aac while Plex Web can direct play opus file. There’s an old thread about this but it wasn’t complete. I’m not sure if this is a feature request but it looks to me like an oversight.

Here is the debug log of server:

Feb 01, 2019 09:13:32.458 [0x7f32ea7fc700] DEBUG - TranscodeUniversalRequest: using augmented profile Web
Feb 01, 2019 09:13:32.463 [0x7f32ea7fc700] DEBUG - MDE: Selected protocol dash; container: mp4
Feb 01, 2019 09:13:32.463 [0x7f32ea7fc700] DEBUG - MDE: analyzing media item 49664
Feb 01, 2019 09:13:32.463 [0x7f32ea7fc700] DEBUG - MDE: RED: Direct Play is disabled
Feb 01, 2019 09:13:32.463 [0x7f32ea7fc700] DEBUG - MDE: RED: media must be transcoded in order to use the dash protocol
Feb 01, 2019 09:13:32.463 [0x7f32ea7fc700] DEBUG - MDE: RED: no direct play music profile exists for http/ogg/opus
Feb 01, 2019 09:13:32.463 [0x7f32ea7fc700] DEBUG - MDE: Cannot direct stream audio stream due to codec opus when profile only allows aac
Feb 01, 2019 09:13:32.463 [0x7f32ea7fc700] DEBUG - MDE: RED: selected media 0 / 49664
Feb 01, 2019 09:13:32.463 [0x7f32ea7fc700] DEBUG - Streaming Resource: Adding session 0x7f32cc159520:may8bgp5c90pzxz2raddx0f1 which is using 296kbps of WAN bandwidth. Used is now 296kbps
Feb 01, 2019 09:13:32.463 [0x7f32ea7fc700] DEBUG - Streaming Resource: Added session 0x7f32cc159520:may8bgp5c90pzxz2raddx0f1
Feb 01, 2019 09:13:32.463 [0x7f32ea7fc700] DEBUG - Streaming Resource: Reached Decision id=25915 codes=(General=1001,Direct play not available; Conversion OK. Direct Play=3000,App cannot direct play this item. Direct play is disabled. Transcode=1001,Direct play not available; Conversion OK.) media=(id=49664 part=(id=51268 decision=transcode protocol=dash streams=(Audio=(id=154671 decision=transcode bitrate=281 encoder=aac channels=2 rate=48000))))

If I understand the javascript correctly, it looks like opus isn’t defined in the direct playable music

            music: {
                directPlay: {
                    mp4: {
                        mimeType: 'audio/mp4; codecs="mp4a.40.5"',
                        audio: {
                            codecs: {
                                aac: {}
                            }
                        }
                    },
                    mp3: {
                        mimeType: 'audio/mpeg; codecs="mp3"',
                        audio: {
                            codecs: {
                                mp3: {}
                            }
                        }
                    },
                    ogg: {
                        mimeType: 'audio/ogg; codecs="vorbis"',
                        audio: {
                            codecs: {
                                vorbis: {}
                            }
                        }
                    },
                    wav: {
                        mimeType: "audio/wav",
                        audio: {
                            codecs: {
                                pcm: {}
                            }
                        }
                    },
                    flac: {
                        mimeType: "audio/flac",
                        audio: {
                            codecs: {
                                flac: {}
                            }
                        }
                    }
                },
                directStream: {
                    audio: {
                        codecs: {
                            mp3: {}
                        },
                        maxBitrate: 320,
                        maxChannels: 2
                    }
                }
            }
        }

but video with opus can be direct played (I tested this one and the video can be direct played)

            types: ['video/webm; codecs="vp9, opus"; ' + n],
            fragment: {
                directPlay: {
                    mkv: {
                        mimeType: "video/webm",
                        video: {
                            codecs: {
                                vp9: e
                            }
                        },
                        audio: {
                            codecs: {
                                opus: {}
                            }
                        }
                    }
                }
            }

It would be great if opus music direct play support is added to the web client.

1 Like

I don’t know if opus in an m4a container is supported. Try dragging the original file into the web browser and see if it will play. If that works, then it’s a Plex issue. If it doesn’t work, then your browser doesn’t support that codec/container combo.

The browser can play the file. It’s Plex’s issue since the direct play list above doesn’t contain opus music.

I forgot to mention that the codec/container is opus/ogg.

Can you PM me that file so I can test?

I’m also seeing this issue, OPUS is getting transcoded to AAC in Firefox. I hadn’t previously added opus to my library due to not being able to read the tags, but the latest beta solves that part!

This is on the latest beta (1.15.0.659) using Plex Web (plex.tv, not local server web)

Example:
image

I tried editing the js to add opus support to Plex Web. By adding opus to the ogg direct play entry, Plex Web can direct play opus.

07-12-38-54

Edited profile of Plex Web

                ogg: {
                    mimeType: 'audio/ogg; codecs="vorbis"',
                    audio: {
                        codecs: {
                            vorbis: {},
                            opus: {}
                        }
                    }
                },

You have any update on the test file I sent you?

The file is compatible with some browsers, not all. Unfortunately, we are unable to detect if a browser supports opus or not so it’s either assume it’s supported and let it play or fail, or (what we do now) don’t assume it’s supported and transcode so it works for everyone.

The devs will be looking to see if there are ways to better detect support so in the future it may be possible to direct play on supported browsers.

1 Like

Oh well, that’s a bit disappointing since I thought opus is supported well enough these days. Hopefully something happens in the future.

Staring at you Internet Explorer.

1 Like

“we are unable to detect if a browser supports opus or not”…

It looks like PLEX does know exactly which browser is being used though, as it shows “Chrome”, “Edge”, “Safari”, “Internet Explorer”… so i’m not sure how IE is killing this for all others?

Sorry if I wasn’t clear. I meant that none of the browsers currently tells Plex Web if opus is supported or not. They may actually support it, but we can’t tell. We can’t go just by the browser either because it depends on the version of the browser and the OS too. Until this info can be determined, support for opus cannot be added reliably.

My reference to IE was just to point out that it does not support opus at all, not even recent versions.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.