Jump to content

Emby AppleTV + HomePod Mini = Play/Pause Delay


Recommended Posts

zaHrecsohbiw
Posted

@LukeIs there a chance that somehow the order of operations changes in this failover circumstance that causes ffmpeg to run before the transcoding folder is created? 

Posted
On 7/9/2024 at 1:27 AM, zaHrecsohbiw said:

@Lukeso I tried to play the same media file that I mentioned in the previous post. It seems that the server is _attempting_ to transcode the file, but parameters that are fed to ffmpeg are causing it to fail.

I've included the ffmpeg log for you to inspect.

04:40:32.985 Could not write header for output file #0 (incorrect codec parameters ?): No such file or directory
04:40:32.985 Error initializing output stream 0:0 -- 
04:40:32.986 [libmp3lame @ 0x1ccf080] 3 frames left in the queue on closing
04:40:32.988 Conversion failed!
04:40:32.988 EXIT

emby-debug.txt 8.52 kB · 3 downloads

Hi, can you please attach the emby server and ffmpeg log files together? Thanks.

zaHrecsohbiw
Posted

@LukeAll StreamTranscode processes in this log are for the same url, which is the same one that I've been using as an example throughout this thread. I don't have a clue why there are so many 404 responses in the beginning, and I can't say if this behavior is common. I'll have to pay attention to that for the next few days. However, Emby gets a success response from the server at least by 05:42:45.242. 

ffmpeg-transcode-c38e5765-c617-4c74-8119-2a3d3147a036_1.txtembyserver.txt

Posted
2 hours ago, zaHrecsohbiw said:

@LukeAll StreamTranscode processes in this log are for the same url, which is the same one that I've been using as an example throughout this thread. I don't have a clue why there are so many 404 responses in the beginning, and I can't say if this behavior is common. I'll have to pay attention to that for the next few days. However, Emby gets a success response from the server at least by 05:42:45.242. 

ffmpeg-transcode-c38e5765-c617-4c74-8119-2a3d3147a036_1.txt 13.72 kB · 0 downloads embyserver.txt 182.26 kB · 0 downloads

The 404's are from when emby server tried to access the url in the strm file, and whatever server that was sent back a 404 response.

Also I would try removing the strmextract plugin just to rule out anything being caused by that.

zaHrecsohbiw
Posted (edited)
29 minutes ago, Luke said:

The 404's are from when emby server tried to access the url in the strm file, and whatever server that was sent back a 404 response.

Also I would try removing the strmextract plugin just to rule out anything being caused by that.

I apologize. I meant to convey that I don't know whether or not the 404's are a _common_ occurrence on this or other remote files (implying blame on the part of the service provider). I dont' think so, but it was odd that the errors showed up when I went to capture this information, and I didn't want to influence your troubleshooting.

I had this problem well before I added that plugin, but I will happily remove it just in case.

 

Thank you for looking into this!

Edited by zaHrecsohbiw
Posted
6 hours ago, zaHrecsohbiw said:

I apologize. I meant to convey that I don't know whether or not the 404's are a _common_ occurrence on this or other remote files (implying blame on the part of the service provider). I dont' think so, but it was odd that the errors showed up when I went to capture this information, and I didn't want to influence your troubleshooting.

I had this problem well before I added that plugin, but I will happily remove it just in case.

 

Thank you for looking into this!

Yea the plugin might not be causing any problem, but given that it isn't built by Emby, it's best to remove just while we're troubleshooting. Please let us know if this keeps coming up. Thanks.

  • 1 month later...
zaHrecsohbiw
Posted

@LukeI've not been commenting on this thread because I did not want to be a pest, and you/your team have a full plate, but I've had so many issues with Emby, specifically with media playback and conversions, that I feel like I should provide more debug information. I will save the conversion issues for another thread, as they are not related to this particular problem. 

We are having so much trouble getting Emby to reliably play back any media from a .strm file that my wife has completely stopped using Emby. I continue to use it because I love the software (and pay for Emby Premiere) and I put a lot of effort into getting everything set up to work, but I must admit that I often find myself just copying the .strm URLs at the bottom of an Emby item page and pasting it into IINA or some other media player. 

Besides the issues with the Apple TV app not correctly failing over to convert for the native player, and besides the issues with the HomePod audio getting out of sync when MPV, I usually cannot pause (for more than a few seconds), rewind, skip ahead, etc, any transport actions, on a strm file, without ffmpeg failing and the media player closing. once it closes, I cannot resume from where I left off. I _must_ start the video over again, but even that sometimes won't work. It is inconsistent and frustrating and 10 out of 10 times, if I just copy the URL and open it in another media player, it works absolutely as it should. 

This does not seem to be a problem with any of the live tv streams, even though they are from the same provider as the movies and other media.

These problems DO occur for every type of app that I use (iOS, tvOS, iPadOS, safari/web), but to varying degrees. The least reliable, by far, is the Apple TV app, and the most reliable is safari/web

With all of that complaining out of the way, I am super determined to do whatever I can to help make Emby work because I think it's tremendous software, and I think that a lot of the problems that I am having could come down to options passed to ffmpeg, or perhaps even tunable parameters on my end. 

I use intel qsv/vaapi and that seems to be a problem with some of the ffmpeg filters (I've seen some internet posters who get the same errors as I do claim that a newer build of ffmpeg fixed their problems)

I tried to watch a movie (to be clear, like my other examples, a remote media file referenced in a .strm file) this morning, using the web app, that Emby simply refuses to play, but produces no errors in either the ffmpeg logs or the embyserver log. The file/url plays just fine with IINA, but it does take a surprisingly long time to load. For this particular file, the embyserver logs just show that the player closed the session (Info SessionManager: Playback stopped reported by app Emby Web 4.9.0.30 on Safari macOS ...). (This is copied from the logs of the beta release, but I run that alongside Emby 4.8.8.0 which exhibits the same behavior.) It occurs to me that perhaps the player is just giving up before the media file is actually ready. 

Anyway, I apologize for the frustrated tone of my post. I'm fighting with my wife over a media file failing every time we have to pause, and I'm taking it out on you and your team. But she doesn't know that I'm on your side in all of this!

zaHrecsohbiw
Posted

Issue: Here is a _local_ media file that took a long time to load on the same Apple TV, but eventually did. However, when I tried to scrub +30 minutes into the video, the playback failed on the Apple TV. Watching the same media file on the web app worked without issue, including scrubbing +30 minutes into the file. 

ffmpeg-2.log

zaHrecsohbiw
Posted

Oops, I did not realize that there was a time limit for editing a post. I will make sure to have both logs together before posting, for any future examples of a failure.

embyserver-snippet-2.log

zaHrecsohbiw
Posted

Also curious why Emby decides to transcode HEVC to AVC when the Apple TV, using the native player, starts playback of a media file that is HEVC encoded? 

This request from the Apple TV app appears to explicitly call for h264, but it seems as though hevc should be an acceptable format for the native player?

 

2024-09-02 19:05:00.441 Info Server: http/1.1 GET http://host1:8096/emby/videos/4249540/master.m3u8
?DeviceId=010F8C35-069E-44D2-A040-58FCFB7C522F
&MediaSourceId=0dfa3b665c052cac9249638958703ad2
&PlaySessionId=50ebe9a25c444e418391ea96b6932b69
&api_key=x_secret2_x
&VideoCodec=h264
&AudioCodec=ac3,eac3,mp3,aac
&VideoBitrate=199808000
&AudioBitrate=192000
&MaxWidth=3840
&AudioStreamIndex=1
&TranscodingMaxAudioChannels=6
&SegmentContainer=ts
&SegmentLength=3
&MinSegments=1
&BreakOnNonKeyFrames=True
&SubtitleStreamIndexes=-1
&ManifestSubtitles=vtt
&h264-profile=high,main,baseline,constrainedbaseline
&h264-deinterlace=true
&h264-level=42
&aac-audiochannels=2
&TranscodeReasons=ContainerNotSupported.

 

  • Thanks 1
  • 2 weeks later...
Posted

Hi, we are looking into this. Thanks.

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...