RanmaCanada 502 Posted April 19, 2024 Posted April 19, 2024 This may not be the answer you want to hear, but it may be time to upgrade your ancient home theatre setup, your server, or you can start converting your pirated content to what your reciever likes before putting it on the server, or rip it yourself "properly". I know this is not what you want, but you have to face reality. No one else has apparently spoken up about this. Sorry, as a user myself, if I was having this problem for this long, I would be proactive and ensure my content fit my ancient hardware if I was too poor to upgrade it. I sure as heck would not be as patient as you appear to have been. It's not that difficult to process your files before putting them on the server, you can easily a batch file to process them. Toslink is 40 years old as it was introduced in 1983. Let it die. 1
hbbs 8 Posted April 19, 2024 Author Posted April 19, 2024 I appreciate your honesty. The issue what I'm talking here is that somehow if you get a media file that contains an AV1 track and an Opus multichannel track, getting only Opus to be transcoded to AC3 5.1 while only direct playing AV1 (copy) The problem is that when it does transcode the video image of the untouched AV1 track that is being direct played freezes on the very first frame after I hit the playback correct option while the audio goes on. Even if I skip 10 minutes ahead, the video will be freezed on that said frame. Only the transcoded audio will act accordingly. This issue is even worse within Plex. If a multichannel opus audio track together with an AV1 video track is detected everything is transcoded to H264+AC3 For all I could gathered since I've opened this topic here there is/was an issue with FFmpeg that was making difficult to direct play AV1 + transcoding Opus to AC3 5.1. But this was in late 2022 / Early 2023. And since then at least two major version of FFmpeg were released. I'm here hoping that with the latest FFmpeg version the video freezing (copy) may be addressed My audio setup is old. But a file containing HEVC+Opus 5.1 is properly 'corrected' to copy HEVC and transcode Opus to AC3 5.1.
RanmaCanada 502 Posted April 19, 2024 Posted April 19, 2024 Yes but I believe EBR expalined that in regards to the HLS stream, it is/was still not possible with AV1. HEVC is a totally different codec. Using it as a reason to beleive that AV1 will work is like asking "why can't I put petrol in my Tesla? It's a car, and all cars run on petrol" The fact Plex is also having a serious problem, with the amount of resources they have, should tell you that it's not a problem with the software, but with the video codec itself. Again I would just process my files before adding them to my server. Many of us already go through the process of cutting out redundant audio and sub tracks, or even re-encoding things to save space prior to adding them to our servers. 1 1
hbbs 8 Posted April 19, 2024 Author Posted April 19, 2024 11 minutes ago, RanmaCanada said: The fact Plex is also having a serious problem, with the amount of resources they have, should tell you that it's not a problem with the software, but with the video codec itself Emby enabled AV1 almost 2 years before Plex. They don't care about adding this stuff anymore. They were the last to allow AV1 to playback when even Kodi had it. Plex's business now is to add features that nobody asked to spy/sell on its users' data to their economic advantage. 23 minutes ago, RanmaCanada said: Yes but I believe EBR expalined that in regards to the HLS stream, it is/was still not possible with AV1 @ebr told me that on December, 21. 2022. Since then three different major releases of FFmpeg have been made. Since we are talking about two open/royalty-free codecs (AV1 + Opus) Maybe something has changed. I remember reading back then that future iterations of FFmpeg could sort this out I know that Emby still uses FFmpeg 5.1.x, the LTS one, even on the beta server version. But if someone is willing to send me an experimental beta emby server with FFmpeg 7.0 baked in I will be willing to start my server all over again to test it. And for last. I have files on my server done by myself with AV1 + AC3 to avoid this issue. But everything else on the web will be AV1 + Opus (multichannel). The Scene went with this combo of open codecs years ago.
rbjtech 5341 Posted April 19, 2024 Posted April 19, 2024 11 minutes ago, hbbs said: Emby enabled AV1 almost 2 years before Plex. They don't care about adding this stuff anymore. They were the last to allow AV1 to playback when even Kodi had it. Plex's business now is to add features that nobody asked to spy/sell on its users' data to their economic advantage. @ebr told me that on December, 21. 2022. Since then three different major releases of FFmpeg have been made. Since we are talking about two open/royalty-free codecs (AV1 + Opus) Maybe something has changed. I remember reading back then that future iterations of FFmpeg could sort this out I know that Emby still uses FFmpeg 5.1.x, the LTS one, even on the beta server version. But if someone is willing to send me an experimental beta emby server with FFmpeg 7.0 baked in I will be willing to start my server all over again to test it. And for last. I have files on my server done by myself with AV1 + AC3 to avoid this issue. But everything else on the web will be AV1 + Opus (multichannel). The Scene went with this combo of open codecs years ago. So why not just insert an AC3 track and make it the default audio track like I suggested earlier in the thread ? A little time invested preparing media, pays dividends later on because it direct plays. 1
hbbs 8 Posted April 19, 2024 Author Posted April 19, 2024 1 minute ago, rbjtech said: So why not just insert an AC3 track and make it the default audio track like I suggested earlier in the thread ? A little time invested preparing media, pays dividends later on because it direct plays. This is not possible. How can I acquire an original AC3 track for a release done by the Scene? Also, it defeats the purpose of having Emby transcode/manager stuff for me in the first place. For Direct Play we had Kodi to begin with. This issue will always come back, AV1 hasn't superseded HEVC as of yet. But trust me it will. AV1+Opus makes all the sense. Not only for streaming data but for storage since it occupies less space. 3
Neminem 1618 Posted April 19, 2024 Posted April 19, 2024 Guess if that is your what you believe and cling to, then you will see this. Take a look at Tdarr.
RanmaCanada 502 Posted April 19, 2024 Posted April 19, 2024 4 hours ago, hbbs said: This is not possible. How can I acquire an original AC3 track for a release done by the Scene? Also, it defeats the purpose of having Emby transcode/manager stuff for me in the first place. For Direct Play we had Kodi to begin with. This issue will always come back, AV1 hasn't superseded HEVC as of yet. But trust me it will. AV1+Opus makes all the sense. Not only for streaming data but for storage since it occupies less space. And when it supercedes HEVC, if you're still using your ancient hardware, you'll probably continue to blame the devs of Emby when it's an issue with the way AV1 is designed to work. There are no magic work arounds for a base codec's inability to be used in a certain stream style. Upgrade your home theatre receiver or process the files before adding them to your library. There is only so much hand holding a dev team can do when users refuse to use modern hardware. It's like people complaining that XP support no longer exists for newer programs. Sorry man, but that's the reality of the situation you are in. AV1 is still in its infancy, and there are a lot of inherit problems with it. As for your thing with Plex, Plex has over 100 staff members, tens of millions of dollars to play with, and don't add things until they know they work 100%. There's a reason they are "so far behind" in regards to video codec support, as AV1 is still not ready for mainstream, yet Emby users demanded it, and now people aren't happy that there are problems with the half baked implementation. I don't know why this is a hill you're willing to die on when the solution is such a simple one on your end. 1
VirulentPip 93 Posted April 20, 2024 Posted April 20, 2024 17 hours ago, hbbs said: This is not possible. How can I acquire an original AC3 track You don't.... You convert the OPUS Track into one that your equipment can support, remux the second track in and set as default while choosing to keep both or just the supported one. 1
rbjtech 5341 Posted April 20, 2024 Posted April 20, 2024 3 hours ago, VirulentPip said: You don't.... You convert the OPUS Track into one that your equipment can support, remux the second track in and set as default while choosing to keep both or just the supported one. Yup - all done in a single ffmpeg command - which has already been provided in this thread ...
RanmaCanada 502 Posted April 20, 2024 Posted April 20, 2024 From what I understand in order for AV1 to work with HLS you need to use HLS.js which is against the spec as it doesn't specify AV1 as a valid value in the CODECS field. That is why it freezes as it doesn't know what to do so it panics and freezes. This is akin to the kid who wanted Emby devs to support features that Intel specifically said they did not support. 1
Happy2Play 9808 Posted April 20, 2024 Posted April 20, 2024 In the end the HLS delivery method of items that require change does not support what you want. If the item cannot Direct play (video and audio) there really is nothing the devs can do to force what you want as it currently is not possible as previously stated. To a point HEVC was the same way awhile ago until it evolved so I guess AV1 in a few years may do the same.
Luke 42228 Posted April 30, 2024 Posted April 30, 2024 On 4/20/2024 at 3:39 PM, RanmaCanada said: From what I understand in order for AV1 to work with HLS you need to use HLS.js which is against the spec as it doesn't specify AV1 as a valid value in the CODECS field. That is why it freezes as it doesn't know what to do so it panics and freezes. This is akin to the kid who wanted Emby devs to support features that Intel specifically said they did not support. Right and the web app does this.
hbbs 8 Posted 8 hours ago Author Posted 8 hours ago (edited) Hi everyone. I want to revisit this thread with something much more substantial than "still broken." After almost 4 years of testing every beta as requested by @ebrand @Luke, I finally have a complete root cause analysis — and proof that the correct behavior is achievable, because I accidentally stumbled onto it myself. A few nights ago I was testing Plex on my Roku TV in my living room and noticed something unexpected: an AV1 + Opus 5.1 file was playing with the video preserved in AV1 and the audio correctly transcoded to AC3 5.1 — exactly the behavior I had been asking Emby to implement for over the years. The Roku TV has no external receiver, so Plex correctly identified that Opus multichannel wasn't passable to the TV's audio system and transcoded only the audio, leaving the video untouched. I immediately went to test my other devices — NVIDIA Shield, Xiaomi Mi TV Stick 4K, Amazon Fire TV Stick 4K Max 2nd gen — and the behavior was different on all of them. That inconsistency made me curious. Why did it work on the Roku TV and not on the others devices? I decided to dig into the server logs from both scenarios and compare them. I asked for help analysing the logs to Claude AI and what came out of that analysis is what I'm sharing here today. --- **Environment** - Emby Server: 4.10.0.8 beta (issue present since at least 4.8.x — December 2022) - Server hardware: NVIDIA Shield TV (2015), Android 11 - Clients affected: Xiaomi Mi TV Stick 4K, Amazon Fire TV Stick 4K Max 2nd gen (Emby for Android TV beta 2.1.44g) - Source files tested: "Arrival (2006)" and "10 Things I Hate About You (1999)" — both AV1 video + Opus 5.1 audio in MKV - Audio output chain: Android TV → TV optical/SPDIF out → AV receiver (AC3/DTS passthrough only, no HDMI audio in) --- **The symptom (known)** When playing an AV1 + Opus 5.1 file on a device whose audio output is limited to SPDIF/optical, triggering Playback Correction to transcode Opus → AC3 causes the video to freeze on the last frame while audio continues normally. --- **Root cause — confirmed from Emby FFmpeg logs** Emby correctly identifies that only audio transcoding is needed and generates the following plan: ``` Stream #0:0 -> #0:0 (copy) ← AV1 stream-copied Stream #0:1 -> #0:1 (opus (native) -> ac3 (native)) ← audio transcoded ``` The output container Emby uses is MPEG-TS segments for HLS (`-f segment -segment_format mpegts`). FFmpeg itself immediately issues this warning upon muxing: ``` [mpegts @ 0x22e9a2c4d0] Stream 0, codec av1, is muxed as a private data stream and may not be recognized upon reading. ``` **This is the precise cause of the freeze.** AV1 is not standardized in MPEG-TS. When the client receives the `.ts` HLS segments, the AV1 stream is flagged as an unknown private data stream and cannot be decoded. The AC3 audio — which TS handles correctly — plays fine. The video freezes on the last frame rendered before the transcode session began. The client request confirms the segment container: ``` SegmentContainer=ts ``` Note also that Emby is bundling **FFmpeg 5.1-emby_2023_06_25_p4** — a June 2023 custom build. Two major FFmpeg versions (6.x and 7.x) have since been released, both with significant AV1 and HLS improvements. --- **Proof that the correct behavior is achievable — from Plex logs on the same server** This is where it gets interesting. Running Plex Media Server on the same NVIDIA Shield, serving the exact same files, the Roku TV client triggers a transcode session that works perfectly: AV1 stream-copied, Opus transcoded to AC3 5.1, video plays without freezing. Here is the actual FFmpeg command Plex generates for the Roku TV client: ``` -codec:0 copy -filter_complex "[0:1] aresample=async=1:ochl='5.1':rematrix_maxval=0.000000dB:osr=48000[0]" -codec:1 ac3 -b:1 640k -f segment -segment_format matroska ``` The difference is one parameter: **`-segment_format matroska`** instead of **`-segment_format mpegts`**. AV1 is fully supported and standardized in the Matroska (MKV) container. Plex uses MKV segments, the AV1 stream copies cleanly, the audio transcodes to AC3 5.1, and everything works. No freeze. No warnings. The Plex log also confirms the profile used: ``` TranscodeUniversalRequest: using augmented profile Roku-7.x ``` The Roku-7.x profile correctly does not list Opus as a supported audio codec, which is why Plex decides to transcode it. The Xiaomi and Fire TV profiles do list Opus as supported, which is why Plex direct plays on those devices — leaving the SPDIF chain stuck with stereo, same as Emby's default behavior. --- **The fix** When the source video codec is AV1 and the transcoding plan is audio-only (video stream-copy), Emby must switch the HLS segment container from MPEG-TS to either: 1. **Matroska segments** (`-segment_format matroska`) — proven working by Plex on the same hardware with the same files, or 2. **Fragmented MP4/CMAF** (`-segment_format fmp4`) — also AV1-compatible and HLS-spec compliant This isn't theory—it's working right now. Plex handles it on the same setup. I'm honestly thrilled I found this... with this info, maybe Emby could get there too? I'd love to help test it. --- **Why this matters** AV1 + Opus is now the dominant encoding combination in scene releases and is increasingly common in personal libraries. Users with older AV receivers limited to SPDIF/optical — a very large installed base worldwide — have had no working path to multichannel audio on AV1 content in Emby for over two years. This will only grow in scope. --- **Attachments** - Emby FFmpeg transcode log (showing the mpegts warning) - Emby server log I am happy to provide any additional testing or logs. I have been patiently testing every beta since December 2022 and will continue to do so. Regards, H. embyserver (1).txt ffmpeg-remux-05dd082b-aa58-4f30-8cb8-f9ea957951c9_1.txt Edited 7 hours ago by hbbs Typo
ebr 16330 Posted 1 hour ago Posted 1 hour ago We are currently in the midst of an ffmpeg update. This should be re-evaluated once that is out in beta.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now