Gecko 61 Posted September 23, 2022 Share Posted September 23, 2022 (edited) Hello guys, I discovered a strange behavior using Emby iOS app recently after changing my nginx setup and doing some tests. It seems that for some times now, playback from iOS app is always triggering a "recovering from playback error" whenever I start a stream (either locally directly from Emby server's IP, locally through proxy or remotely through proxy). Every playback started from the iOS app takes a while to start and creates 4 transcode sessions in the logs but I cannot find why. If, going through web app, no playback error is triggered and the streaming starts immediately (with only one transcode session created in the logs). Attached are the logs for a single playback session started from iOS. I rotated the logs just before. Can someone look for some clues as fro why this behavior occurs? I'm directly connected to Emby server for this test, so my proxy is not involved at all. EDIT: Here are the differences I found in all 3 failed transcode sessions vs the successful one : Tentative #1 : No DirectPlayError&allowVideoStreamCopy=false in url 0.ts instead of 638.ts ffmpeg not using -ss 00:31:54.000 (I was resuming a movie) Tentative #2 : No DirectPlayError&allowVideoStreamCopy=false in url Everything seems to be the same Tentative #3 : 0.ts instead of 638.ts ffmpeg not using -ss 00:31:54.000 (I was resuming a movie) It seems that the app is trying something with various parameters before falling back to the correct transcode session where DirectPlay and StreamCopy are not usable and started at the correct movie position. I assume this is normal behaviour for a mpv app that is trying to avoid transcoding at all costs. As the quality has been manually set to a specific value, can't those checks be skipped, remembered or hasten ? I think Emby does know the movie's bitrate before starting any Session so it should know that DirectPlay and StreamCopy isn't possible in this scenario right ? Many thanks for your help solving this ! Gecko ffmpeg-transcode-51f02f5f-663a-4400-bdc2-6b297cbf05ba_1.txt ffmpeg-transcode-a1c7b4d6-3ae2-49ab-a67c-9797a23a5f67_1.txt ffmpeg-transcode-c5e88388-3dc2-4eb2-8d10-66394d8d9972_1.txt ffmpeg-transcode-c634fe9b-a555-4e06-8f70-cec086972c0b_1.txt embyserver-12.txt Edited September 23, 2022 by nSGecko Comparing all transcoding files Link to comment Share on other sites More sharing options...
Luke 37099 Posted September 23, 2022 Share Posted September 23, 2022 Hi, have you compared your nginx setup to this: Link to comment Share on other sites More sharing options...
Gecko 61 Posted September 23, 2022 Author Share Posted September 23, 2022 Hi @Luke, Like i said, i’m directly connected to emby server, but i noticed the issue because i change my proxy. and yes i followed the recommended nginx config topic Link to comment Share on other sites More sharing options...
Luke 37099 Posted September 23, 2022 Share Posted September 23, 2022 How does your setup compare to that one? Link to comment Share on other sites More sharing options...
Gecko 61 Posted September 23, 2022 Author Share Posted September 23, 2022 I copied the nginx config from the forum but activated buffering because i had subtitles out of sync. web app through proxy is working like a charm but iOS app is triggering 4 transcode sessions instead of one as explained above Link to comment Share on other sites More sharing options...
Gecko 61 Posted September 28, 2022 Author Share Posted September 28, 2022 (edited) Ok so after some more trials, the issue is not linked to the iOS app because I get the same error on the web app when I playback a mkv file from various browser and when the quality setting is set to a bitrate higher than the mkv's bitrate : Stream MKV (1 mbps) -> HLS (3 mbps 365 fps) Converting to compatible container Recovering from playback error Video 1080p HEVC Main 120 1 mbps 23.976 fps -> Transcode (H264 3 mbps) Dropped Frames 0 Corrupted Frames 0 Audio English AC3 stereo 192 kbps 48000 Hz When asking for a bitrate lower than the file's bitrate, the transcode kicks in and no error to report : Stream MKV (1 mbps) -> HLS (1,000 kbps 1029 fps) Reducing bitrate due to quality setting Video 1080p HEVC Main 120 1 mbps 23.976 fps -> Transcode (H264 808 kbps) Dropped Frames 0 Corrupted Frames 0 Audio English AC3 stereo 192 kbps 48000 Hz @softworkz maybe you have an idea what's happening here ? EDIT: ok, i figure it out : When the source media is HEVC and no subtitles needs to be burned in and no quality reduction is needed, then the "Recovering from playback error" occurs. Files encoded in h264 or even and old MPEG2 is playing fine. Question is: why is there an error with HEVC? Edited September 28, 2022 by nSGecko Link to comment Share on other sites More sharing options...
Bagul 147 Posted September 29, 2022 Share Posted September 29, 2022 Hey! I also have the error since version 2.2.5 on iOS. I have the error on the beta version and on the stable version of the server whether locally or through my reverse proxy. On the other hand, I also have the error on a media in h264 and HEVC but I have the impression I don't have the error when the audio is in stereo. Link to comment Share on other sites More sharing options...
Gecko 61 Posted September 30, 2022 Author Share Posted September 30, 2022 (edited) 16 hours ago, Bagul said: Hey! I also have the error since version 2.2.5 on iOS. I have the error on the beta version and on the stable version of the server whether locally or through my reverse proxy. On the other hand, I also have the error on a media in h264 and HEVC but I have the impression I don't have the error when the audio is in stereo. Hi @Bagul, When the error occurs, did the auto-start works or do you see the play/pause button in the middle of the screen switch back and forth and just wait that you click on it to start playback ? I was wondering for months why some videos auto started and some others not, but now I wonder if this is not because of this error. I disabled the option "Allow changing of container formats, if necessary, during media playback" and noticed improvements for that issue. I still get the error but the video autostart every time now. Edited September 30, 2022 by nSGecko tagging bagul Link to comment Share on other sites More sharing options...
Bagul 147 Posted September 30, 2022 Share Posted September 30, 2022 8 hours ago, nSGecko said: Hi @Bagul, When the error occurs, did the auto-start works or do you see the play/pause button in the middle of the screen switch back and forth and just wait that you click on it to start playback ? I was wondering for months why some videos auto started and some others not, but now I wonder if this is not because of this error. I disabled the option "Allow changing of container formats, if necessary, during media playback" and noticed improvements for that issue. I still get the error but the video autostart every time now. I can't tell you. I have noticed this with my users. I don't watch video with my iPhone. Link to comment Share on other sites More sharing options...
Luke 37099 Posted October 11, 2022 Share Posted October 11, 2022 Are you able to test it on your phone to try and reproduce? Link to comment Share on other sites More sharing options...
Gecko 61 Posted October 12, 2022 Author Share Posted October 12, 2022 (edited) 10 hours ago, Luke said: Are you able to test it on your phone to try and reproduce? Yes, but like I said, the issue is not tied to iOS. I also have it under web app on multiple browser. Logs and dashboard info attached. "Recovering from playback error" does not appears immediately if that helps. ffmpeg-transcode-4fa05bd3-a2ae-4416-a10a-031776178e71_1.txt ffmpeg-transcode-e58d4b7a-ca28-4394-9622-801a38110d4d_1.txt embyserver-14.txt Edited October 12, 2022 by nSGecko Link to comment Share on other sites More sharing options...
Chiefmas 26 Posted October 13, 2022 Share Posted October 13, 2022 On 9/28/2022 at 5:38 AM, nSGecko said: Question is: why is there an error with HEVC? I just searched to see what the deal was with this error. I don't think it's HEVC related, I have a user playing back right this moment on an iPhone, H.264, with AC3 audio, and it says it's direct playing both streams. The only conversion happening is to HLS, so maybe something in that? HLS remuxing seems to be the commonality between all of us. Link to comment Share on other sites More sharing options...
Luke 37099 Posted October 27, 2022 Share Posted October 27, 2022 Are you still having an issue with this? Link to comment Share on other sites More sharing options...
hnorgaar 1 Posted November 4, 2022 Share Posted November 4, 2022 (edited) I am with the latest 3 betas on Nvidia Shield Edited November 4, 2022 by hnorgaar Link to comment Share on other sites More sharing options...
Gecko 61 Posted November 6, 2022 Author Share Posted November 6, 2022 On 10/27/2022 at 9:25 PM, Luke said: Are you still having an issue with this? @Luke Yes, just tell me when you have time to look at it and I can provide you anything you need. Link to comment Share on other sites More sharing options...
Luke 37099 Posted November 6, 2022 Share Posted November 6, 2022 Hi. Can you try sideloading our standard android app on the same device and see how that compares? https://emby.media/emby-for-android.html Thanks. Link to comment Share on other sites More sharing options...
hnorgaar 1 Posted November 6, 2022 Share Posted November 6, 2022 Tried but it is 32 bit and wont work on Nvidia Shield @FrostByte Link to comment Share on other sites More sharing options...
FrostByte 5052 Posted November 6, 2022 Share Posted November 6, 2022 (edited) 28 minutes ago, hnorgaar said: Tried but it is 32 bit and wont work on Nvidia Shield @FrostByte Use the 64bit file if you have anything other than the tube. You will have to go directly to GitHub to get it. I've been using it for months on mine. Emby.Releases/android at master · MediaBrowser/Emby.Releases (github.com) the file you're look for is emby-android-google-arm64-v8a-release.apk Edited November 6, 2022 by FrostByte Link to comment Share on other sites More sharing options...
Bagul 147 Posted November 6, 2022 Share Posted November 6, 2022 The initial thread is for iOS devices not android. Link to comment Share on other sites More sharing options...
Gecko 61 Posted November 6, 2022 Author Share Posted November 6, 2022 +web app as i said earlier i can reproduce directly connected to emby on safari depending on the source format. Link to comment Share on other sites More sharing options...
Luke 37099 Posted November 6, 2022 Share Posted November 6, 2022 This sounds to me like reverse proxy configuration. Have you taken a look at this? Link to comment Share on other sites More sharing options...
Bagul 147 Posted November 6, 2022 Share Posted November 6, 2022 21 minutes ago, Luke said: This sounds to me like reverse proxy configuration. Have you taken a look at this? I have the problem locally and @nSGecko mentioned it in his first post "either locally directly from the Emby server IP, locally via a proxy or remotely via a proxy" Link to comment Share on other sites More sharing options...
Chiefmas 26 Posted November 7, 2022 Share Posted November 7, 2022 On 10/27/2022 at 3:25 PM, Luke said: Are you still having an issue with this? My people on iPhones(where I was seeing the issue) haven't been on recently, so I can't report on if I'm still seeing the issue or not myself. I'm still watching for it though. Thanks! 1 Link to comment Share on other sites More sharing options...
Gecko 61 Posted November 7, 2022 Author Share Posted November 7, 2022 Tested right now on my iphone directly connected to emby. Latest version of everything. The error message is still there as reported here: How can I sideload an android app on an iPhone ? I never had this error on my shield for example (at least, never saw it) Link to comment Share on other sites More sharing options...
pir8radio 1292 Posted November 10, 2022 Share Posted November 10, 2022 On 11/7/2022 at 12:34 AM, nSGecko said: Tested right now on my iphone directly connected to emby. Latest version of everything. The error message is still there as reported here: How can I sideload an android app on an iPhone ? I never had this error on my shield for example (at least, never saw it) you can't ios and android totally different. Link to comment Share on other sites More sharing options...
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