Jump to content

LiveTV Transcode at the Tuner?


BrianG
Go to solution Solved by Luke,

Recommended Posts

BrianG

Now that I have the HDHomerun Extend tuner all set up with EmbyTV, including a fully functioning program guide (big thanks to rkulagow for his help), I noticed that the Emby server is doing the transcoding of TV streams. Is there a way to offload the transcoding load to the tuner box since it supports it? Or is it best (faster and/or better quality) to just let the server handle it?

 

I've been trying to eliminate any need to transcode on the server as much as possible. Along with being an Emby media server, it's also a SQL database and IIS web server for other in-house apps. The CPU load on an i3 CPU is a bit high (understandably) when transcoding which may affect my other applications. I was hoping to avoid getting a stronger CPU since it draws more power and the server is on 24/7, but if it's the best option, then I may just do that despite the cost of an "old"  socket 1155 i7.

 

Mods: I wasn't sure if this was EmbyTV-specific, so please feel free to move this thread accordingly.

Edited by BrianG
Link to comment
Share on other sites

  • 2 weeks later...
kmarq13

Now that I have the HDHomerun Extend tuner all set up with EmbyTV, including a fully functioning program guide (big thanks to rkulagow for his help), I noticed that the Emby server is doing the transcoding of TV streams. Is there a way to offload the transcoding load to the tuner box since it supports it? Or is it best (faster and/or better quality) to just let the server handle it?

 

I've been trying to eliminate any need to transcode on the server as much as possible. Along with being an Emby media server, it's also a SQL database and IIS web server for other in-house apps. The CPU load on an i3 CPU is a bit high (understandably) when transcoding which may affect my other applications. I was hoping to avoid getting a stronger CPU since it draws more power and the server is on 24/7, but if it's the best option, then I may just do that despite the cost of an "old"  socket 1155 i7.

 

Mods: I wasn't sure if this was EmbyTV-specific, so please feel free to move this thread accordingly.

Any update on this? I keep debating buying the extend model of tuner vs sizing my Emby server to be able to transcode. 

Link to comment
Share on other sites

kmarq13

Did you read the blog?

Yup, I did. It didn't quite clear up my questions, and unfortunately since my HDHomerun isn't a DLNA model I can't try anything.

 

1) Will EmbyTV make smart use of HDHomerun Extend transcoding? (ie if target system can handle native stream send that, if not engage HDHomerun transcode) 

2) If two clients are watching the same channel will EmbyTV use only one tuner, or does it use a tuner per client?

 

I'm trying to decide if it makes more sense to buy an Extend model tuner, or to buy a beefier server. If I buy Extend tuners I can add more to my network as needed and the server sizing doesn't change. If I try to rely on server transcoding then adding another TV could potentially be an issue in the future.

 

I currently have two primary systems, an HTPC and a FireTV. The HTPC can easily handle mpeg-2, however the FireTV (in Emby) can't. I did catch another post that VLC will hopefully be adding support for mpeg-2 that Emby would be able to use. It is clearly possible as Kodi handles it very well now. 

Link to comment
Share on other sites

BrianG

Yup, I did. It didn't quite clear up my questions, and unfortunately since my HDHomerun isn't a DLNA model I can't try anything.

 

1) Will EmbyTV make smart use of HDHomerun Extend transcoding? (ie if target system can handle native stream send that, if not engage HDHomerun transcode) 

2) If two clients are watching the same channel will EmbyTV use only one tuner, or does it use a tuner per client?

 

I'm trying to decide if it makes more sense to buy an Extend model tuner, or to buy a beefier server. If I buy Extend tuners I can add more to my network as needed and the server sizing doesn't change. If I try to rely on server transcoding then adding another TV could potentially be an issue in the future.

 

I currently have two primary systems, an HTPC and a FireTV. The HTPC can easily handle mpeg-2, however the FireTV (in Emby) can't. I did catch another post that VLC will hopefully be adding support for mpeg-2 that Emby would be able to use. It is clearly possible as Kodi handles it very well now. 

 

I have the Extend model, so I can try to help:

 

1) Currently, Emby does not utilize the transcoding feature of the HDHR. Although, I think I recall reading something here a few days ago about a future update to Emby which will allow that if the tuner supports it. So I'd stay tuned (pun intended :))

 

2) I've tried having two clients watching two seperate channels, which obviously is utilizing both channels. But I've never tried two clients watching the same channel; but I'd imagine it would use separate tuners because of the transcoding streams to each IP. But don't quote me on that.

 

My "server" is a core i3-3220 CPU, 8GB ram, yadda yadda. CPU usage with one tuner channel being transcoded is ~30%, so not too bad. My server is also being used as a MS SQL server and IIS intranet server, so it probably has more static load than yours does. Even if two or more clients were to transcode at the same time, the worst that would happen is a little bit longer buffering time. But given that Emby plans to take advantage of tuner transcoding at some point, I'm not sure a beefy server is worth it.

 

Not sure if that helped any...

Edited by BrianG
Link to comment
Share on other sites

I have the Extend model, so I can try to help:

 

1) Currently, Emby does not utilize the transcoding feature of the HDHR. Although, I think I recall reading something here a few days ago about a future update to Emby which will allow that if the tuner supports it. So I'd stay tuned (pun intended :))

 

2) I've tried having two clients watching two seperate channels, which obviously is utilizing both channels. But I've never tried two clients watching the same channel; but I'd imagine it would use separate tuners because of the transcoding streams to each IP. But don't quote me on that.

 

My "server" is a core i3-3220 CPU, 8GB ram, yadda yadda. CPU usage with one tuner channel being transcoded is ~30%, so not too bad. My server is also being used as a MS SQL server and IIS intranet server, so it probably has more static load than yours does. Even if two or more clients were to transcode at the same time, the worst that would happen is a little bit longer buffering time. But given that Emby plans to take advantage of tuner transcoding at some point, I'm not sure a beefy server is worth it.

 

Not sure if that helped any...

 

This is incorrect. We do use the transcoding features of HDHR. It's mentioned in the blog.

Link to comment
Share on other sites

BrianG

This is incorrect. We do use the transcoding features of HDHR. It's mentioned in the blog.

 

Really? I must check again then. I thought I was on the latest version of everything. My apologies! 

Link to comment
Share on other sites

mellomade
I currently have two primary systems, an HTPC and a FireTV. The HTPC can easily handle mpeg-2, however the FireTV (in Emby) can't. I did catch another post that VLC will hopefully be adding support for mpeg-2 that Emby would be able to use. It is clearly possible as Kodi handles it very well now. 

 

Playback on the FireTV should pass the h.264 stream but is likely still transcoding the ac3 stream because, if I remember correctly, the FireTV only supports ac3 in the .mp4 container.  And video (h.264 or MPEG-2) is delivered in the .ts container.

 

@@BrianG - you don't mention which player you are using.  FireTV or Roku will always transcode either video or audio or both from the HDHomeRun.  These devices suck for anything but MKV and MP4 as far as broad codec support.

 

For confirmation on what is happening there is always the transcoding log!

Edited by mellomade
Link to comment
Share on other sites

BrianG

@@BrianG - you don't mention which player you are using.  FireTV or Roku will always transcode either video or audio or both from the HDHomeRun.  These devices suck for anything but MKV and MP4 as far as broad codec support.

 

I've used the web client (on Windows and Android), the Win8 app, or the Android app - so no FireTV or Roku. When I get some free time, I'll try various combinations of devices if nothing but to confirm to myself that I'm not crazy; I could have sworn just a few days ago I saw transcoding happening when using the tuner.

Link to comment
Share on other sites

mellomade

Viewing video in a web browser will always cause Emby to transcode.  The Android app should be similar to FireTV (as it is Android too) and you will likely have lots of transcoding happening.  The Win8 app does not support MPEG2 directly yet (I think) but should be OK with h.264/ac3 directly - but I haven't tried that one.

Link to comment
Share on other sites

BrianG

OK, I had a chance to test various things and here is what I've found when watching Live TV:

  • Android App: transcodes
  • Android web client (chrome browser): transcodes
  • Windows 10 App: transcodes
  • Windows 10 web client (chrome browser): transcodes

This is on Server 3.0.5675.1 and all apps/browsers are up to date. Tuner is the HDHR extend model.

 

When transcoding, CPU usage on an i3-3240 fluctuates between 10% and 25%.

 

Other observations about Live TV:

  • When using the web client in Chrome on Windows10, some channels are either squished or stretched. No way to adjust the view like some players can. Changing the streaming setting does nothing to help. I know there is little you can do to change how web clients do stuff, I just thought I'd throw it out there.
  • When using the app in Android, using an external player (MX player) doesn't work. I like to use MX because the native player in the app doesn't play many of my movies (get playback error) despite them all being pre-encoded to MP4 (H.264/AAC) and I can change the view (stretch as needed). I tried VLC and it has the same problems as some of the movies as the native app. It would be nice if the native app played everything, or the external player did; but I have to remember to use MX for movies and the native app player (or VLC) for LiveTV.
Edited by BrianG
Link to comment
Share on other sites

You have to go look at the requirements for each device as well as any in-app settings that might effect whether it direct plays or not. We do utilize the HDHR transcoding, but that does not always mean we can eliminate Emby transcoding. HDHR has no aac audio option, therefore any web browser will always require transcoding. The android app and windows 10 can direct play it though.

Link to comment
Share on other sites

  • 1 month later...

Why does Emby need to transcode video when playing to a browser or Roku? Ffmpeg seems to be able to transcode audio only while using only about 25% CPU on a Raspberry Pi, while Emby maxes out a Celeron 2955U playing the same stream.

  • Like 1
Link to comment
Share on other sites

browsers don't support mpeg2 and neither does roku. if your live tv feed is h264, they do support it, although the bitrate setting in the app you're using will affect how much of a transcode is required.

Link to comment
Share on other sites

I understand that some clients can't handle MPEG2, but this thread is talking about the Extend which can transcode to h264 at the tuner.

 

Is there a way I can tell Emby not to transcode video at the server? (I understand that ffmpeg will still have to transcode audio.) The video transcoding is maxing out my Emby server.

Edited by jancona
Link to comment
Share on other sites

the intention is for it to stream copy the video although i can see an issue with that in the web interface that would prevent it from happening. i will resolve that for the next release. it you're running windows it will be on the dev build later today.

Link to comment
Share on other sites

PhilWhite

Wow, great improvements, Luke.

 

Version 3.0.5768.7​  on Freenas server using FireTV to stream and two HDHR extends.  I had to turn off the vlc player for other reasons, but with it off and the TV stream transcoding my CPU usage went from roughly 20% with the previous server version to almost imperceptible with the current one.  Max system use is 1.34%.

 

Love the new updates.  I can't wait to see what you improve next.

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

  • 3 weeks later...

I'm now running 3.0.5781.2, but I still see high CPU usage due to transcoding when playing live TV. Does this version have the fix to stream copy video? If not, is there an ETA for a Linux release?

  • Like 1
Link to comment
Share on other sites

we have to look at specific examples. stream copy is never guaranteed. it all depends on what client reports to the server as supported and whether or not the incoming stream fits within those requirements and any in-app settings that might have an impact.

Link to comment
Share on other sites

  • 4 months later...
razzfazz

I'm seeing the same thing; for LiveTV from my HDHR Extend, both video and audio are always transcoded when playing through either the web interface or the iOS client, even when the maximum bitrate is set to "auto" or "1080p - 60Mbps" in the clients. What information is needed to figure out what's going on? Transcode logs? Server logs?

Edited by razzfazz
Link to comment
Share on other sites

I'm seeing the same thing; for LiveTV from my HDHR Extend, both video and audio are always transcoded when playing through either the web interface or the iOS client, even when the maximum bitrate is set to "auto" or "1080p - 60Mbps" in the clients. What information is needed to figure out what's going on? Transcode logs? Server logs?

 

Hi there, take a look at our Transcoding Wiki.

 

Scroll down to the section "Why Is My Media Transcoding?". It will help you determine that, as what info to supply so that we can look at it. Thanks!

Link to comment
Share on other sites

razzfazz

As others have mentioned earlier in the thread, what triggers transcoding is the fact that the HDHomeRun Extend streams audio data in AC3 format, which the iOS and web clients don't support. The question I'm having is why both audio and video get transcoded, given that the video stream is H264 already. (This happens even when I set the bitrate limit to 60Mbps, which is several times higher than the actual bit rate.)

Link to comment
Share on other sites

razzfazz

As in, the following seems somewhat unnecessary:

 

Input #0, mpegts, from 'http://172.20.2.13:5004/auto/v7.1?transcode=heavy':

  Duration: N/A, start: 53570.686156, bitrate: N/A

  Program 3 

    Stream #0:0[0x31]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv), 1280x720 [sAR 1:1 DAR 16:9], Closed Captions, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc

    Stream #0:1[0x34](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s

[...]
Output #0, hls, to '/tmp/transcoding-temp/23817f5e3624a8047017ea4560c7d657.m3u8':

  Metadata:

    encoder         : Lavf56.40.101

    Stream #0:0: Video: h264 (libx264), yuv420p, 1280x720 [sAR 1:1 DAR 16:9], q=-1--1, 15000 kb/s, 59.94 fps, 90k tbn, 59.94 tbc

    Metadata:

      encoder         : Lavc56.60.100 libx264

    Stream #0:1: Audio: aac, 48000 Hz, 5.1, fltp, 320 kb/s

    Metadata:

      encoder         : Lavc56.60.100 aac

Stream mapping:

  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))

  Stream #0:1 -> #0:1 (ac3 (native) -> aac (native))

Edited by razzfazz
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...