user84 46 Posted August 3, 2024 Posted August 3, 2024 I previously reported this issue, but it remains unsolved and I have taken many steps to fix it since I originally reported it, so I thought I would start a new thread. After I pause ANY video, when I press play, the media glitches until I do "playback correction." By glitch I mean that it either stalls and then starts playing again, or it stalls and then rewinds 1-2 seconds and starts playing again. This happens all on its own. This persists despite a brand new Roku 4k+ and remuxing all of my media into MKV. I have no other issues except when I pause. Logs attached. embyserver.txt ffmpeg-remux-d1232cfd-846f-425a-89b2-e30665030f88_1.txt ffmpeg-remux-2ae89d17-b9db-4522-9579-59bd3e515010_1.txt
ebr 16169 Posted August 3, 2024 Posted August 3, 2024 Hi. Is the audio always 5.1 AAC when this problem occurs? Is all your media like that? The Roku does nots support it which is what is causing the remux in the first place.
user84 46 Posted August 3, 2024 Author Posted August 3, 2024 46 minutes ago, ebr said: Hi. Is the audio always 5.1 AAC when this problem occurs? Is all your media like that? The Roku does nots support it which is what is causing the remux in the first place. I'm not sure, but I can pay attention. What is the alternative setup to avoid this?
speechles 2055 Posted August 4, 2024 Posted August 4, 2024 (edited) @Blam84How do you have the setting above set? The Roku will convert multi-channel AAC into stereo AAC on the device, no transcoding necessary, but you lose surround sound. You have to decide. Would you would rather: 1) direct play of the audio stream 2) keep surround sound always Because if it direct plays the Roku is going to convert that AAC 5.1 -> AAC 2.0 on the device itself and you will lose all surround. But at the same time if the glitching of the video stream during repackage is the issue, I am sure this is an acceptable loss, and you would rather direct play. Personally I keep the setting shown above always at "NO" because I am not too concerned at the loss of surround as I am versus transcoding. But you may feel differently. The setting allows you to be in control of how this is handled entirely. We default this to NO so if it is set to YES you have changed it at some point. With the setting set to YES your Emby server will realize you don't want the Roku to change AAC 5.1 -> AAC 2.0 and instead want Emby server to transcode into AC3 5.1 if the Roku supports it. This will cause audio stream transcoding and HLS is used. Also.. if you are using "Volume Mode" on your Roku with anything other than "OFF" it will disable all surround codecs. Volume mode will only work with stereo sound so the capabilities of the Roku will change when you change Volume Mode to Night or Leveling. Using OFF will allow surround sound again. Just FYI. The change does not take immediate effect. You must stop and restart what you had playing after changing the volume mode for this to happen. The stream cannot change until the player respawns it is a Roku requirement. https://support.roku.com/article/226802507 Edited August 4, 2024 by speechles 1
user84 46 Posted August 4, 2024 Author Posted August 4, 2024 12 minutes ago, speechles said: @Blam84How do you have the setting above set? The Roku will convert multi-channel AAC into stereo AAC on the device, no transcoding necessary, but you lose surround sound. You have to decide. Would you would rather: 1) direct play of the audio stream 2) keep surround sound always Because if it direct plays the Roku is going to convert that AAC 5.1 -> AAC 2.0 on the device itself and you will lose all surround. But at the same time if the glitching of the video stream during repackage is the issue, I am sure this is an acceptable loss, and you would rather direct play. Personally I keep the setting shown above always at "NO" because I am not too concerned at the loss of surround as I am versus transcoding. But you may feel differently. The setting allows you to be in control of how this is handled entirely. We default this to NO so if it is set to YES you have changed it at some point. With the setting set to YES your Emby server will realize you don't want the Roku to change AAC 5.1 -> AAC 2.0 and instead want Emby server to transcode into AC3 5.1 if the Roku supports it. This will cause audio stream transcoding and HLS is used. Also.. if you are using "Volume Mode" on your Roku with anything other than "OFF" it will disable all surround codecs. Volume mode will only work with stereo sound so the capabilities of the Roku will change when you change Volume Mode to Night or Leveling. Using OFF will allow surround sound again. Just FYI. The change does not take immediate effect. You must stop and restart what you had playing after changing the volume mode for this to happen. The stream cannot change until the player respawns it is a Roku requirement. I am new to much of this, so thank you for the helpful response. I do have this setting on "Yes" and haven't had any issues with getting surround sound. The only issue I have is the glitching. -If this is set to "Yes" and the surround sound isn't a problem...why is the Video a problem? -All of my files are not 5.1 AAC, but some are. If "playback correction" fixes the issue, why not force that on 5.1 AAC files after they are paused? -I am trying to just get my library set and be done with it and I keep hitting these issues. Can you tell me what markers I should look for in both video and audio that will make sure my media plays how it is expected? Thanks for the help
speechles 2055 Posted August 4, 2024 Posted August 4, 2024 (edited) The Roku uses the audio signal to time the video segments. HLS is used because you have unsupported AAC 5.1 audio and the audio must be transcoded. Because of this the Roku might get segments fed to it, but it wants keyframes at the start which are missing. The segments don't have to start on keyframes because we want 3 second segments. But the Roku will want to start on keyframes. It will then ask for 1-2 seconds before the point you wanted to start in an attempt to get those keyframes. Everything must be aligned into 3 second segments when using HLS. That is why I suggested you might try with the option set to NO. Then you can see if that solves the glitching. If this is a brand new Roku device you may not lose surround sound and the device might support AAC 5.1 correctly. If the media is direct playing entirely it should fix those issues you are having with HLS. Edited August 4, 2024 by speechles
user84 46 Posted August 4, 2024 Author Posted August 4, 2024 4 minutes ago, speechles said: The Roku uses the audio signal to time the video segments. HLS is used because you have unsupported AAC 5.1 audio and the audio must be transcoded. Because of this the Roku might get segments fed to it, but it wants keyframes at the start which are missing. The segments don't have to start on keyframes because we want 3 second segments. But the Roku will want to start on keyframes. It will then ask for 1-2 seconds before the point you wanted to start. Everything must be aligned into 3 second segments when using HLS. That is why I suggested you might try with the option set to NO. Then you can see if that solves the glitching. If this is a brand new Roku device you may not lose surround sound and the device might support AAC 5.1 correctly. If the media is direct playing entirely it should fix those issues you are having with HLS. Gotcha. That makes sense. I will set it to "No" and see what happens and report back.
user84 46 Posted August 4, 2024 Author Posted August 4, 2024 9 hours ago, speechles said: The Roku uses the audio signal to time the video segments. HLS is used because you have unsupported AAC 5.1 audio and the audio must be transcoded. Because of this the Roku might get segments fed to it, but it wants keyframes at the start which are missing. The segments don't have to start on keyframes because we want 3 second segments. But the Roku will want to start on keyframes. It will then ask for 1-2 seconds before the point you wanted to start in an attempt to get those keyframes. Everything must be aligned into 3 second segments when using HLS. That is why I suggested you might try with the option set to NO. Then you can see if that solves the glitching. If this is a brand new Roku device you may not lose surround sound and the device might support AAC 5.1 correctly. If the media is direct playing entirely it should fix those issues you are having with HLS. Unfortunately I do lose surround sound when I turn that setting to No.
ebr 16169 Posted August 4, 2024 Posted August 4, 2024 32 minutes ago, Blam84 said: Unfortunately I do lose surround sound when I turn that setting to No. Correct, as stated before - the Roku doesn't support the audio format you are using. Are you ripping to AAC 5.1 intentionally for some reason? That is not going to be widely supported. You'd be much better off with something like AC3 (Dolby). The issues you are seeing are related to us trying to convert the unsupported format to Dolby but that can sometimes not always work perfectly - depending on the source.
user84 46 Posted August 4, 2024 Author Posted August 4, 2024 4 hours ago, ebr said: Correct, as stated before - the Roku doesn't support the audio format you are using. Are you ripping to AAC 5.1 intentionally for some reason? That is not going to be widely supported. You'd be much better off with something like AC3 (Dolby). The issues you are seeing are related to us trying to convert the unsupported format to Dolby but that can sometimes not always work perfectly - depending on the source. I wasn't aware of the support issues around AAC. Many of my files are ripped in that way. I am fairly new to all of this. Can you suggest a tool I could use to convert the audio in my files from AAC to AC3?
Happy2Play 9780 Posted August 4, 2024 Posted August 4, 2024 21 minutes ago, Blam84 said: I wasn't aware of the support issues around AAC. will have a client/app variable. But now Dolby is burned into everything these day compared to the past. 19 minutes ago, Blam84 said: Can you suggest a tool I could use to convert the audio in my files from AAC to AC3? Any file encoding software. Depending on your existing audio bitrate change accordingly ffmpeg -i "in_file" -c:v copy -c:a ac3 -b:a 640K -ac 6 -c:s copy "out_file"
user84 46 Posted August 6, 2024 Author Posted August 6, 2024 On 8/4/2024 at 1:52 PM, Happy2Play said: will have a client/app variable. But now Dolby is burned into everything these day compared to the past. Any file encoding software. Depending on your existing audio bitrate change accordingly ffmpeg -i "in_file" -c:v copy -c:a ac3 -b:a 640K -ac 6 -c:s copy "out_file" Sorry, one last newbie question - If I re-ecode from AAC to AC3, is there any loss? Should I just encode with AC3 from the start?
pwhodges 2012 Posted August 6, 2024 Posted August 6, 2024 There will be a loss. They are both "lossy" codecs, and what they lose will be subtly different, so the losses will be cumulative. That said, if the bit rates are decent, you may very well not be able to detect any change; there is an incredible amount of confirmation bias in most reports of how different audio can be. Paul 1 1
ebr 16169 Posted August 6, 2024 Posted August 6, 2024 1 hour ago, Blam84 said: Should I just encode with AC3 from the start? If that's an option, yes. 1
user84 46 Posted August 6, 2024 Author Posted August 6, 2024 4 hours ago, ebr said: If that's an option, yes. Ok...so I am trying to read up on audio encoding and what I am reading says that AAC will allow for widest compatibility because most clients can transcode to accommodate. Again, I am new to this, so forgive the incorrect terminology if I am off base. But I am realizing that the vast majority of my files are AAC, so if converting to AC3 isn't necessary, I'd rather avoid. On 8/3/2024 at 11:13 PM, speechles said: The Roku uses the audio signal to time the video segments. HLS is used because you have unsupported AAC 5.1 audio and the audio must be transcoded. Because of this the Roku might get segments fed to it, but it wants keyframes at the start which are missing. The segments don't have to start on keyframes because we want 3 second segments. But the Roku will want to start on keyframes. It will then ask for 1-2 seconds before the point you wanted to start in an attempt to get those keyframes. Everything must be aligned into 3 second segments when using HLS. That is why I suggested you might try with the option set to NO. Then you can see if that solves the glitching. If this is a brand new Roku device you may not lose surround sound and the device might support AAC 5.1 correctly. If the media is direct playing entirely it should fix those issues you are having with HLS. So based on what you have said above, is it possible to either: 1. Adjust how Emby handles files that are transcoding audio to give Roku the keyframes it needs to avoid the glitches OR 2. Force a "playback correction" when the media is paused and audio transcoding is taking place? I just can't imagine I am the only person with this problem. But who knows, my Mama always said I was special.
speechles 2055 Posted August 7, 2024 Posted August 7, 2024 (edited) 1. There is no way to adjust the transcoding. This is how the Roku handles HLS. The only way to avoid it is to remove the restriction which causes transcoding in the first place. 2. The playback correction will cause a full encode of the video stream and audio stream. That will fix it because the HLS container is converting both streams at once. The Roku uses the audio signal to time the video. If you convert the audio stream but copy the video stream there may be issues with timing when seeking. What you can do for maximum compatibility is include two audio tracks. Keep the AAC 5.1 and also include AC3 5.1. Then you can use the pass-through AC3 codec when you want the Roku to play surround. The AAC 5.1 the Roku will manipulate to stereo which will work with "Volume Mode" . This will allow you to direct play both the video/audio and you can choose which track you wish to play that is most appropriate for the time. Make sure the "Convert Multi-Channel AAC" option is set to No. You do _not_ want to use playback correction as that will cause the video stream to get re-encoded as well as the audio stream. You want to maximize the chance you will be able to direct play rather than always use playback correction. Playback correction is fine if the intent is just so you can watch something once. But if you plan on keeping it around to watch later and for others it is better to fix these to maximize the direct play ability for all clients. Edited August 7, 2024 by speechles
user84 46 Posted August 7, 2024 Author Posted August 7, 2024 2 hours ago, speechles said: 1. There is no way to adjust the transcoding. This is how the Roku handles HLS. The only way to avoid it is to remove the restriction which causes transcoding in the first place. 2. The playback correction will cause a full encode of the video stream and audio stream. That will fix it because the HLS container is converting both streams at once. The Roku uses the audio signal to time the video. If you convert the audio stream but copy the video stream there may be issues with timing when seeking. What you can do for maximum compatibility is include two audio tracks. Keep the AAC 5.1 and also include AC3 5.1. Then you can use the pass-through AC3 codec when you want the Roku to play surround. The AAC 5.1 the Roku will manipulate to stereo which will work with "Volume Mode" . This will allow you to direct play both the video/audio and you can choose which track you wish to play that is most appropriate for the time. Make sure the "Convert Multi-Channel AAC" option is set to No. You do _not_ want to use playback correction as that will cause the video stream to get re-encoded as well as the audio stream. You want to maximize the chance you will be able to direct play rather than always use playback correction. Playback correction is fine if the intent is just so you can watch something once. But if you plan on keeping it around to watch later and for others it is better to fix these to maximize the direct play ability for all clients. Thanks so much for the response. I've been doing everything I can to avoid using the fire stick because I simply don't like the interface, and I don't like ads for movies being thrown in my face. But I think I'm simply working too hard to overcome the problems that the Roku has with Emby. I'm going to bite the bullet and try to switch over to fire stick rather than make massive changes to my library. I really appreciate the help in figuring all this out. I have learned a lot. I do hope the Roku experience improves in the future, but for now, and as long as I decide to continue to use Emby, I think I need to do it on the firestick.
ebr 16169 Posted August 7, 2024 Posted August 7, 2024 16 hours ago, Blam84 said: what I am reading says that AAC will allow for widest compatibility Two-channel AAC is widely supported but not 5.1. If you want widely supported 5.1 I think DD (AC3) wins there. 1
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