Jump to content

Transcoding always required


tmedia
 Share

Recommended Posts

Hi guys,

I was very excited to hook up my Apple TV 4K today and I was really hoping that I would be able to direct play most of my library. Unfortunately, I am seeing that it is not the case. My server and the client are both fully up to date.

Everything I throw at it that is HEVC requires server transcoding. I had a look at this page and it seems like it should be able to direct play.

Here are some stats from a file that I thought would direct play. Can you guys give me any pointers? Thank you!

EDIT: I forgot to mention MPV is ON.

Video

Title 1080p HEVC
Codec HEVC
Codec Tag hev1
Profile Main 10
Level 120
Resolution 1916x808
Aspect Ratio 479:202
Anamorphic No
Interlaced No
Framerate 23.976
Bitrate 555 kbps
Bit Depth 10 bit
Pixel Format yuv420p10le
Reference Frames 1

Audio

Title English AAC stereo (Default)
Language English
Codec AAC
Codec Tag mp4a
Profile LC
Layout stereo
Channels 2 ch
Bitrate 128 kbps
Sample Rate 48,000 Hz
Default Yes
Container mp4
Edited by tmedia
Additional info
Link to comment
Share on other sites

Please post server and ffmpeg logs.  But Dashboard Active device info or stats for nerds during playback should tell you why it is transcoding.

Edited by Happy2Play
Link to comment
Share on other sites

Someone more familiar with Apple will have to step in here but basically the returned support information basically says h265 isn't supported.

&VideoCodec=h264&AudioCodec=aac,eac3,ac3,mp3

 

Link to comment
Share on other sites

Everything I throw at Infuse 6 direct plays on the Apple TV 4K. I wonder if there's something needed for the Emby app to work properly then?

Link to comment
Share on other sites

To me this is why compared to your tag (hev1 vs hvc1), but do not know enough about the device.  Google points to Apple not really liking hev1.

Quote

2020-07-16 17:43:26.086 Info MediaInfoService: Profile: VideoCodecProfile, DirectPlay=false. Reason=Unnamed.VideoCodecTag Condition: Equals. ConditionValue: hvc1. IsRequired: True. Path: /mnt/user/Media/movies/Clementine (2019)/Clementine (2019) WEBDL-1080p.mp4

 

Edited by Happy2Play
Link to comment
Share on other sites

Hmmmm..... I use ffmpeg to convert files to hevc. Now I'm wondering how to tag as hvc1 rather than hev1.

Also, why does Infuse work for EVERY file regardless of container/codec etc? Maybe it uses the Apple TV to transcode?

I'm hoping someone can weigh in that has experience with this issue. 

Thank you for your help so far Happy2Play and also for pointing out that tag problem that I missed!

Link to comment
Share on other sites

It looks like you can add 

-tag:v hvc1

to your ffmpeg command. 

I'm going to try this tomorrow and see if I get better results. 

Link to comment
Share on other sites

I direct play SDR HEVC content using MPV player, are you sure you have MPV player enabled? HDR content is not supported at this time. MP4 HEVC should also direct played using native player as direct streaming is not required, but requires hvc1 tag in your mp4 file. 

But again, that tag is only required when you are using native player.

 

Edited by vdatanet
Link to comment
Share on other sites

BTW I take the opportunity to send a friendly reminder, please add support to MPV player for automatic matching of dynamic range and refresh rate, like Plex, Infuse, MrMC ... and add support for direct playback of MKVs HEVC HDR. 😉

Link to comment
Share on other sites

5 hours ago, vdatanet said:

Maybe you have enabled MPV but it requires to restart the app for the changes to take effect:

https://www.iphonefaq.org/archives/974917

I have made sure to restart the app and yes it is enabled. I think it has to do with the tag as discussed above. My files have hev1 tag rather than hvc1. I'm trying to add the proper tag now on some test files but it seems that my code from above does not work to add the proper tag.

 

 

Link to comment
Share on other sites

I haven't tried this but I'd think you could use ffmpeg to accomplish this pretty quickly doing something similar to this:

ffmpeg -i input.mp4 -vcodec copy -acodec copy -tag:v hvc1 output.mp4

check and adjust if subtitles get copied

Link to comment
Share on other sites

16 minutes ago, cayars said:

I haven't tried this but I'd think you could use ffmpeg to accomplish this pretty quickly doing something similar to this:

ffmpeg -i input.mp4 -vcodec copy -acodec copy -tag:v hvc1 output.mp4

check and adjust if subtitles get copied

That code worked for me, but I wasn't aware that MPV also needed that tag. I no longer have any MP4 without that tag to test.

Link to comment
Share on other sites

OK for me I had to use

-vtag hvc1

rather than

-tag:v hvc1

Now I just need to process a few files and see what happens. Thanks for the feedback and suggestions :)

Link to comment
Share on other sites

I confirm MPV player can direct play MP4 HEVC  without hvc1 tag. That tag is only required using native player:

401028015_Capturadepantalla2020-07-17alas20_27_17.png.9fcd213d48f62b5d3c562b0eefcbaed1.png

1600353919_Capturadepantalla2020-07-17alas20_26_48.png.ab1c1bb654d8704199d3ad2a3139ae05.png

Edited by vdatanet
Link to comment
Share on other sites

26 minutes ago, vdatanet said:

I confirm MPV player can direct play MP4 HEVC  without hvc1 tag. That tag is only required using native player:

401028015_Capturadepantalla2020-07-17alas20_27_17.png.9fcd213d48f62b5d3c562b0eefcbaed1.png

1600353919_Capturadepantalla2020-07-17alas20_26_48.png.ab1c1bb654d8704199d3ad2a3139ae05.png

So I see a few differences in your file compared to my test file. I use 10 bit / Main 10 and it looks like you are using 8 bit. I wonder if you have some different server/client settings than me and that is making a difference?

I have re-verified MPV is ON and it still does not direct play that file. 

When I get home later I am going to try it out on a remuxed version that changes the codec id tag to hvc1.

Link to comment
Share on other sites

This also direct plays using MPV player

726968023_Capturadepantalla2020-07-17alas21_33_11.png.91f5d232d8323a0035634ca819042d69.png

1602539687_Capturadepantalla2020-07-17alas21_35_45.png.19f204770e6e88604acee157b0a63fad.png

The only problem I have using MPV player is HDR content. HDR content look awful.

Edited by vdatanet
Link to comment
Share on other sites

I don't think settings in Apple TV are forcing transcode. Can you share a sample of your media? I will try it in my server.

1702320663_Capturadepantalla2020-07-17alas22_16_54.thumb.png.c1727e825fd3e593dc634b96da6ff1e5.png

 

Edited by vdatanet
Link to comment
Share on other sites

OK, your settings look like mine from what I can tell. If reworking the codec id tag doesn't help with mine I'll try to put together a sample for you to try out.

Link to comment
Share on other sites

It seems strange that Infuse 6 can direct play every single file I've thrown at it regardless of codec/container and the Emby app cannot. I wonder what's going on under the hood?

Link to comment
Share on other sites

Infuse and Emby for Apple TV (mpv player) are similar, both use an MPV implementation for Apple TV, but Infuse implementation is far away from Emby implementation. The worst part is that the Emby mpv player has practically not evolved in the last year and there are no prospects for improvements in the short or medium term.

Edited by vdatanet
  • Like 1
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...