Jump to content

Why is Apple TV converting, transcoding and deinterlacing Live TV?


rdhardi
Go to solution Solved by rdhardi,

Recommended Posts

Hi! A bit of background. I've been out of the IT field professionally for about 10yrs now. We've had Emby since my husband first installed it years ago back in the Media Browser days. I've recently taken over Emby Server admin duties. I only mention this to show that I'm not a noob when it comes to sys admin or Emby. I AM a noob in multimedia though, as it was never a part of my IT duties. I've been trying to educate myself on multimedia terminology, and I have a basic understanding of what's what, but mostly it's all over my head!

I have, what I hope, is an easy question. When I'm playing the same Live TV channel on a Shield Pro and on an Apple TV HD, the Shield plays direct, but the ATV is converting, transcoding and deinterlacing. Why?

Can someone please explain? Please be gentle and use simple words, lol. I've downloaded the embyserver & ffmpeg logs from when the ATV is running. They're not fully anonymized so I don't feel comfortable attaching them here. If necessary I can PM them, please let me know. Thanks in advance for any replies!

emby.png.225f46c5a4194b161dbc91d8f6289da6.png

 

Link to comment
Share on other sites

Thanks for the link @horstepipe. I've spent many many hours reading posts about transcoding/interlacing, etc. but I don't remember that post. I'll take a look at it later and see if I get a better understanding.

Edited by rdhardi
Add member tag
Link to comment
Share on other sites

@Luke Yes, I changed it to Native. Just changed it back to Auto and no there's no change. And the Live TV video quality is so bad it's unwatchable! It's laggy/jerky and the audio & video is out of sync. At times the sound just drops out completely. This must be why I changed it to Native when I first set it up a couple of months ago.

I also just played a movie and a TV show, and they direct play just fine. So my issue seems limited to live tv (HDHomeRun Flex OTA tuner) on the ATV only. All my other devices (Shield Pros) and HTPCs direct play live tv with no problem.

Link to comment
Share on other sites

3 hours ago, rdhardi said:

@Luke Yes, I changed it to Native. Just changed it back to Auto and no there's no change. And the Live TV video quality is so bad it's unwatchable! It's laggy/jerky and the audio & video is out of sync. At times the sound just drops out completely. This must be why I changed it to Native when I first set it up a couple of months ago.

I also just played a movie and a TV show, and they direct play just fine. So my issue seems limited to live tv (HDHomeRun Flex OTA tuner) on the ATV only. All my other devices (Shield Pros) and HTPCs direct play live tv with no problem.

On auto it will be played with a different player (mpv), and it's able to direct play that without transcoding. If you're forcing it to the native apple player, it doesn't support it directly and that's why you're getting server transcoding.

Link to comment
Share on other sites

2 hours ago, Luke said:

On auto it will be played with a different player (mpv), and it's able to direct play that without transcoding. If you're forcing it to the native apple player, it doesn't support it directly and that's why you're getting server transcoding.

Ok, so I just updated from Emby Server 4.7.9 to 4.7.10 and ran updates on the OS (Ubuntu 20.04). I checked for ATV updates and it's up to date. The preferred video player is set to auto, and it's still transcoding. Also, after updating to 4.7.10, I have a new issue...the embyserver log is showing several Error Reports. I'm trying to make sense of it, but I have no idea what's going on. May I pm you my logs?

313256658_Screenshotfrom2022-12-1320-48-40.png.35182ddd4ba57fe86556240d92b6ad52.png

Edited by rdhardi
Resized image
Link to comment
Share on other sites

1 hour ago, rdhardi said:

Ok, so I just updated from Emby Server 4.7.9 to 4.7.10 and ran updates on the OS (Ubuntu 20.04). I checked for ATV updates and it's up to date. The preferred video player is set to auto, and it's still transcoding. Also, after updating to 4.7.10, I have a new issue...the embyserver log is showing several Error Reports. I'm trying to make sense of it, but I have no idea what's going on. May I pm you my logs?

313256658_Screenshotfrom2022-12-1320-48-40.png.35182ddd4ba57fe86556240d92b6ad52.png

Yes you can.

  • Thanks 1
Link to comment
Share on other sites

On 12/13/2022 at 7:23 PM, Luke said:

On auto it will be played with a different player (mpv), and it's able to direct play that without transcoding. If you're forcing it to the native apple player, it doesn't support it directly and that's why you're getting server transcoding.

After looking at the logs you sent me it appears to be using native which Luke explained won't direct play. Set this back to auto and try it again.

Carlo

Link to comment
Share on other sites

27 minutes ago, cayars said:

After looking at the logs you sent me it appears to be using native which Luke explained won't direct play. Set this back to auto and try it again.

Carlo

I changed it to back to auto when Luke told me. Maybe I sent the wrong log. I’ll try again and be sure to send the correct log. 

68666ED5-EAA5-4E7A-87D6-F3F61EFEDDF3.jpeg

  • Thanks 1
Link to comment
Share on other sites

We're looking at this.

It looks to me the result of the probe done on the stream is determining that the file can't be direct played. But right above this I'm seeing an error I've never seen before so I don't know if that is the cause of transcoding or not.  I sent Luke a PM about this and what I found.

Also, when the stream is actually transcoded ffmpeg is showing a 600ms (6/10th of a second) difference in the timing of the video and audio which is a huge number considering we are sending out segments that are only 3 seconds in duration.

This looks like it's an HDHomeRun tuned to channel 7.1.  Is that a Quatro tuner?
Are you having this issue on other SD channels or just 7.1?

Could you PM me a 1 one sample recording from channel 7.1?  You can do this while watching the channel clicking record then 1 minute later stopping the recording.

Thanks,
Carlo

 

Link to comment
Share on other sites

11 hours ago, cayars said:

We're looking at this.

It looks to me the result of the probe done on the stream is determining that the file can't be direct played. But right above this I'm seeing an error I've never seen before so I don't know if that is the cause of transcoding or not.  I sent Luke a PM about this and what I found.

Also, when the stream is actually transcoded ffmpeg is showing a 600ms (6/10th of a second) difference in the timing of the video and audio which is a huge number considering we are sending out segments that are only 3 seconds in duration.

This looks like it's an HDHomeRun tuned to channel 7.1.  Is that a Quatro tuner?
Are you having this issue on other SD channels or just 7.1?

Could you PM me a 1 one sample recording from channel 7.1?  You can do this while watching the channel clicking record then 1 minute later stopping the recording.

Thanks,
Carlo

 

My tuner is HDHomeRun Flex 4K. I'm pretty sure this is happening on other SD channels too, but I'll have to verify that later tonight, at which time I'll make the sample recording from channel 7.1 as you requested. 

Fyi, I also have 5 HEVC channels that I just recently figured out how to manually map (when I chose emby guide data as the source, the hevc channels didn't show up in the list so I mapped to their SD equivalent). HEVC Channel 107.1 throws the same error as SD 7.1 channel.

Thanks for you and Luke's help! I'll pm the sample recording later.

Link to comment
Share on other sites

The video start-time is 71,883,126ms
The audio start-time is 71,882,395ms
=> Offset is 731ms

This can cause problems with certain output formats - specifically HLS.
The segments need to be aligned and synced and when a larger part from one stream is missing, the muxer has to decide about how long to wait for (potentially late) frames. With segment sizes of 3 seconds, there's not much time to wait.

Please update to the latest release version which is 4.7.11.

Test again and if you get an error go into the Transcode menu on the server using Advanced dropdown and deselect VAAPI for MPEG2VIDEO decoding. That will help to determine if this offset is caused by VAAPI or not.
Upload those logs

One more test please.  Go back in to Transcode menu and set HW Transcoding to No in the dropdown.
Run another test and upload the logs for those as well.

Thanks,
Carlo

Link to comment
Share on other sites

7 hours ago, cayars said:

The video start-time is 71,883,126ms
The audio start-time is 71,882,395ms
=> Offset is 731ms

This can cause problems with certain output formats - specifically HLS.
The segments need to be aligned and synced and when a larger part from one stream is missing, the muxer has to decide about how long to wait for (potentially late) frames. With segment sizes of 3 seconds, there's not much time to wait.

Please update to the latest release version which is 4.7.11.

Test again and if you get an error go into the Transcode menu on the server using Advanced dropdown and deselect VAAPI for MPEG2VIDEO decoding. That will help to determine if this offset is caused by VAAPI or not.
Upload those logs

One more test please.  Go back in to Transcode menu and set HW Transcoding to No in the dropdown.
Run another test and upload the logs for those as well.

Thanks,
Carlo

Done!

Link to comment
Share on other sites

  • 2 weeks later...

Thanks @cayars and @Luke for your help. I've tried all of your suggestions, but I'm unable to resolve this issue. To recap, I've tried the following:

  • Updated to server 4.7.11
  • Set the preferred video player to Auto, MPV, & Native (sidenote: Native has the best playback quality for me, when set to Auto or MPV, video is pretty much unwatchable)
  • Deselected VAAPI for MPEG2VIDEO decoding
  • Disabled hardware acceleration

No matter what I've tried, interlaced live tv always transcodes, and on the Apple TV client there is NO option to deinterlace on the server. So, for now, my "solution" is to use the HDHomerun app for live tv on the Apple TV. I will continue to follow the Apple TV forum for updates.

Thanks to the Emby team for all your hard work! And thanks to the awesome community, I've learned so much here over the years.

Happy New Year to all!!!

Link to comment
Share on other sites

18 hours ago, rdhardi said:

Thanks @cayars and @Luke for your help. I've tried all of your suggestions, but I'm unable to resolve this issue. To recap, I've tried the following:

  • Updated to server 4.7.11
  • Set the preferred video player to Auto, MPV, & Native (sidenote: Native has the best playback quality for me, when set to Auto or MPV, video is pretty much unwatchable)
  • Deselected VAAPI for MPEG2VIDEO decoding
  • Disabled hardware acceleration

No matter what I've tried, interlaced live tv always transcodes, and on the Apple TV client there is NO option to deinterlace on the server. So, for now, my "solution" is to use the HDHomerun app for live tv on the Apple TV. I will continue to follow the Apple TV forum for updates.

Thanks to the Emby team for all your hard work! And thanks to the awesome community, I've learned so much here over the years.

Happy New Year to all!!!

I would suggest trying again with the 4.8 server once that is released. Thanks.

Link to comment
Share on other sites

3 hours ago, Luke said:

I would suggest trying again with the 4.8 server once that is released. Thanks.

I installed 4.8.0.21 beta on another machine the other day, but I haven't had a chance to try it yet. I'll give a try later, and if there's no change, I'll wait for the stable version.

  • Thanks 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
×
×
  • Create New...