Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video player doesn't work on Apple TV HD #790

Open
makoni opened this issue Jun 14, 2023 · 18 comments
Open

Video player doesn't work on Apple TV HD #790

makoni opened this issue Jun 14, 2023 · 18 comments
Labels
bug Something isn't working

Comments

@makoni
Copy link

makoni commented Jun 14, 2023

Describe the bug

The player doesn't start video playback on Apple TV HD running tvOS 16.4

I've cloned the repo and checked on tvOS simulator and it's easy to reproduce:

  1. Run the app on Apple TV HD Simulator
  2. Try to play a video from a server (I've tried a 1080p video). It won't start playing.

At the same time when I try Apple TV 4K Simulator everything works fine.

I've also tried on a real device - the default player and the native player from experimental settings doesn't work.

Application version

1.0.0(74)

Where did you install the app from?

App Store

Device information

Apple TV HD

OS version

tvOS 16.4

Jellyfin server version

10.8.10

@makoni makoni added the bug Something isn't working label Jun 14, 2023
@makoni makoni changed the title Video doesn't play on Apple TV HD Video player doesn't work on Apple TV HD Jun 14, 2023
@iamnewtogithubhelpme
Copy link

I want to add that I too have same issue. I have 16.x Tvos on apple tv hd and some videos won't Start playing on the apple tv but if I look at the dashboard using my phone on jellyfin, it says the video is playing on apple tv and time too progresses. But on apple tv, it just shows spinning circle on left side at bottom.

@holow29
Copy link
Contributor

holow29 commented Jun 28, 2023

What video codec are these videos in? I'd wager that since Apple TV HD has A8 chip, it is being hindered by the current Device profiles. If that is the issue here, #519 will help.

@makoni
Copy link
Author

makoni commented Jun 29, 2023

I tried both HEVC and H.264, same result.

@freaky-m0
Copy link

freaky-m0 commented Sep 16, 2023

It's the same on my Apple TV 4.

@purevertigo
Copy link

What's the update on this? Some movies don't even play.

@gmacarthur
Copy link

For me its every video that requires transcoding on the Apple TV HD, the same content plays perfectly on the Apple TV 4K's in the house.

@micer
Copy link

micer commented Nov 7, 2023

I have the same issue, looks like if I force direct play, the playback is working.

Settings > Experimental > Force Direct Play

@Mickey016
Copy link

I have the same issue with my Apple TV HD. Some movies are not playing, and I can't narrow it down to one parameter only : it's not consistent with the codec, the resolution, the bitrate...

I made a lot of tests by forcing a low value bitrate streaming at the user level (between 3 and 10Mbps) so that the server transcodes every file in x264 and common codecs for the Apple TV HD.
I think I have tested every combination of options with Direct Play / fmp4 with HLS / Native Player but nothing succeed.

My results :
Native Player breaks every movies
Some movies requires the Direct Play option and play fine.
But this option breaks other movies (black screen no sound, sometimes with a navigation bar that shows the movie is playing, sometimes with an infinite spinning wheel) that play well with fmp4 with HLS. And vice & versa.

Overall, I think that the best compromise at the time is everything off in the experimental options.
It's very strange because some huge BluRay rips are transcoded and played flawlessly. But "smaller" encoded files aren't.

I can confirm that the same user with Swiftfin works flawlessly on Apple TV 4K / iPad Pro 2018 / iPhone 13 mini without any experimental option and with every level of transcode.

@ShadowJonathan
Copy link

Other jellyfin clients automatically transcode videos when the current device doesn't work with the file as-is. Together with #678 and #184 I think that currently Swiftfin only pulls the original file without regard for compatibility.

@Mickey016
Copy link

Other jellyfin clients automatically transcode videos when the current device doesn't work with the file as-is. Together with #678 and #184 I think that currently Swiftfin only pulls the original file without regard for compatibility.

I guess you're right. But I wonder if it's the only problem.
What surprises me is that, even when forcing a "very low bitrate" transcode (in order to get a x264 file that should be easily OK to process for this device), the playback doesn't work. I would have thought that we could find a solution via transcoding to circumvent this bug till a future fix.

@ShadowJonathan
Copy link

even when forcing a "very low bitrate" transcode

If you mean the "maximum allowed Mbps" setting in jellyfin, that's exactly what I'm talking about; Swiftfin bypasses even that.

@Mickey016
Copy link

Yes, that's what I meant.
What's strange, is that the FFMpeg logs from the server show that the transcode starts with the correct parameters (1616kb/s in this example) :

Output #0, mpegts, to '/config/transcodes/dce8ebdb850e08dbe6b94f5cf581b091.ts':
  Metadata:
    encoder         : Lavf59.27.100
  Stream #0:0: Video: h264, qsv(tv, bt709, progressive), 720x300 [SAR 1:1 DAR 12:5], q=2-31, 1616 kb/s, 23.98 fps, 90k tbn (default)
    Metadata:
      encoder         : Lavc59.37.100 h264_qsv
    Side data:
      cpb: bitrate max/min/avg: 1616000/0/1616000 buffer size: 3232000 vbv_delay: N/A
  Stream #0:1: Audio: aac, 48000 Hz, 5.1, s16, 384 kb/s
    Metadata:
      encoder         : Lavc59.37.100 libfdk_aac
frame=    1 fps=0.0 q=0.0 size=       0kB time=00:00:00.42 bitrate=   0.0kbits/s speed=   5x    
frame=   79 fps=0.0 q=17.0 size=     512kB time=00:00:03.60 bitrate=1163.4kbits/s speed=6.14x 

Despite the transcoding process looks OK and keep on going on the server side, nothing but black screen on the Apple TV :'(

@ShadowJonathan
Copy link

Might be then that swiftfin simply doesn't send over the correct profile to jellyfin to encode to, hmm.

@ShadowJonathan
Copy link

I found some things:

  1. The way the Transcoding URL got constructed does not work, it causes the player to exit immediately
  2. The profile selection is way too liberal for the Apple TV HD, it requires better tuning, which i will submit

@Mickey016
Copy link

I don't think I understand everything you just said but looks like (great?) progress :)
Thanks for your help @ShadowJonathan

@holow29
Copy link
Contributor

holow29 commented Nov 18, 2023

  1. The profile selection is way too liberal for the Apple TV HD, it requires better tuning, which i will submit

Some work on this in #519 as I said earlier in the thread if you want to look.

@ShadowJonathan
Copy link

I'm looking at that PR right now, it seems to fix/work ATVHD for me

@Ronzkie88
Copy link

I have the same issue, looks like if I force direct play, the playback is working.

Settings > Experimental > Force Direct Play

Worked for me thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants