jrhessey 21 Posted March 1, 2023 Posted March 1, 2023 I've been noticing more 4k videos have been transcoding here recently and decided to try to figure out why. After a couple days of googling and looking at logs, I think I've noticed the culprit. Any 4K hevc files with the format profile where the tier is set to high transcodes. I'm not sure if this is an Emby thing or a Shield thing though. I'm transcoding a video that is Main@L5@High down to Main@L5@Main to see if it direct plays. Has anyone else noticed this with Emby and the Shields? If so, is there a fix? Thanks!!
GrimReaper 4739 Posted March 1, 2023 Posted March 1, 2023 (edited) Provide one of the ffmpeg logs and something might - and likely will - be visible in respect to profiles (i.e. reported client capabilities vs. media encode). Edited March 1, 2023 by GrimReaper 1
rbjtech 5284 Posted March 1, 2023 Posted March 1, 2023 (edited) There is nothing wrong with using the 'High' profile - but using it in conjunction with the wrong Profile overall will result in transcodes. 4K @ 60fps fits into a 5.1 profile - if higher profiles have been used (unnecessarily) then this is why they are likely being transcoded. But as Grim says - we need an ffmpeg or mediainfo of the file to be sure. Edited March 1, 2023 by rbjtech
jrhessey 21 Posted March 1, 2023 Author Posted March 1, 2023 here are the ffmpeg files for the file that transcoded. ffmpeg-transcode-b6c3ecb5-5aa9-44a0-b5e2-da6e0e18b260_1.txtffmpeg-remux-0bc93a4f-4f87-43df-889e-7a2d11bd89e0_1.txt
rbjtech 5284 Posted March 1, 2023 Posted March 1, 2023 Both of these are main profiles (150 ?) The are transcoding for other reasons - likely subs ?
GrimReaper 4739 Posted March 1, 2023 Posted March 1, 2023 (edited) Famous DirectPlayError, "informative" as always. Anyway, those are both Main profile items: Quote {"Codec":"hevc","ColorTransfer":"bt709","ColorPrimaries":"bt709","ColorSpace":"bt709","TimeBase":"1/1000","VideoRange":"SDR","DisplayTitle":"4K HEVC","IsInterlaced":false,"BitRate":8958047,"BitDepth":8,"RefFrames":1,"IsDefault":true,"IsForced":false,"Height":2160,"Width":3840,"AverageFrameRate":23.976025,"RealFrameRate":23.976025,"Profile":"Main","Type":"Video","AspectRatio":"16:9","Index":0,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Protocol":"File","PixelFormat":"yuv420p","Level":150,"IsAnamorphic":false,"AttachmentSize":0} Quote {"Codec":"hevc","ColorTransfer":"bt709","ColorPrimaries":"bt709","ColorSpace":"bt709","TimeBase":"1/1000","VideoRange":"SDR","DisplayTitle":"4K HEVC","IsInterlaced":false,"BitRate":8958047,"BitDepth":8,"RefFrames":1,"IsDefault":true,"IsForced":false,"Height":2160,"Width":3840,"AverageFrameRate":23.976025,"RealFrameRate":23.976025,"Profile":"Main","Type":"Video","AspectRatio":"16:9","Index":0,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Protocol":"File","PixelFormat":"yuv420p","Level":150,"IsAnamorphic":false,"AttachmentSize":0} that your device reports support for: Quote &h264-profile=high,main,baseline,constrainedbaseline,high10&h264-level=52&hevc-profile=Main,Main10 However, you have global bitrate limit at 2 MBps: Quote Global Remote Bitrate Limit: 2,000,000 bps and you're playing back 8+ Mbps item. Since your IPs are anonymized and no server log, don't know whether that was remote or local playback? Edit: @Luke, can we please get rid of DirectPlayError as a reason at last, there must've been some criteria decision to transcode was based on, something must've triggered it - can we please get that noted as a reason in the log, however senseless it might seem as it would likely be more informative than current iteration, as that is not a reason but a consequence. Thanks. Edited March 1, 2023 by GrimReaper Plea 1
speechles 2055 Posted March 1, 2023 Posted March 1, 2023 (edited) 48 minutes ago, GrimReaper said: Famous DirectPlayError, "informative" as always. Edit: @Luke, can we please get rid of DirectPlayError as a reason at last, there must've been some criteria decision to transcode was based on, something must've triggered it - can we please get that noted as a reason in the log, however senseless it might seem as it would likely be more informative than current iteration, as that is not a reason but a consequence. Thanks. I can speak to this. The answer is not so easy. The reason it didn't Direct Play isn't so simple to know. For example on the Roku it doesn't tell you anything. It just sends it back (immediately stops) with a generic error code. It might have had an error in the stream, a hiccup, and that causes it. Also, if we could know why it wasn't working with a direct play error we could tailor the profile for that device so that those would not occur. So knowing what to tell users isn't exactly possible in most scenarios. DirectPlayError means: We tried our best to direct play the item, based on what we know about that device, but for some reason it refused to play that item. Edited March 1, 2023 by speechles 1
GrimReaper 4739 Posted March 1, 2023 Posted March 1, 2023 1 minute ago, speechles said: I can speak to this. The answer is not so easy. The reason it didn't Direct Play isn't so simple to know. For example on the Roku it doesn't tell you anything. It just sends it back with a generic error code. Also, if we could know why it wasn't working with a direct play error we could tailor the profile for that device so that those would not occur. So knowing what to tell users isn't exactly possible in most scenarios. DirectPlayError means: We tried our best to direct play the item, based on what we know about that device, but for some reason it refused to play that item. Appreciate your input, would've thought that Android(TV) platform would be a bit more informative. Nevertheless, in those off-chances it would tell something other than generic error code/refused by device, it'd take some percentage of these undetermined cases off the table.
rbjtech 5284 Posted March 1, 2023 Posted March 1, 2023 I now just use the Emby Support tool - in both the cases above, its suggestion was subtitles in both cases. It's usually spot on. @softworkz
GrimReaper 4739 Posted March 1, 2023 Posted March 1, 2023 (edited) Ditto, when I'm in front of a PC and online - which won't happen for another 3-4 months, sentenced to mobile phone only for forseeable future. Though those look like generic recommendations in these particular cases, items have SUBRIPs only which shouldn't (doesn't mean they don't) create issues. Edited March 1, 2023 by GrimReaper 1
jrhessey 21 Posted March 1, 2023 Author Posted March 1, 2023 1 hour ago, GrimReaper said: However, you have global bitrate limit at 2 MBps: and you're playing back 8+ Mbps item. Since your IPs are anonymized and no server log, don't know whether that was remote or local playback? It was a local playback. Where can I get that Emby Support Tool? Would it transcode even if I wasn't displaying the subs? I can post a log file, but mine are always full of tvdb errors getting images. I can create a new log when I got to play the file again tonight. When you guys said they were main profiles, is that the first Main or the second Main in the format profiles. I attached the pictures of the media info data with the TIER highlighted. They both appear to have subtitles with the text stream, right?
GrimReaper 4739 Posted March 1, 2023 Posted March 1, 2023 7 minutes ago, jrhessey said: Would it transcode even if I wasn't displaying the subs? Easy to test, ain't it? 8 minutes ago, jrhessey said: When you guys said they were main profiles, is that the first Main or the second Main in the format profiles. I attached the pictures of the media info data with the TIER highlighted. I think you might've provided wrong logs as they're both for the same CSI episode (Main profile only) played at different times. 9 minutes ago, jrhessey said: They both appear to have subtitles with the text stream, right? Yes, they both have embedded text subs.
jrhessey 21 Posted March 1, 2023 Author Posted March 1, 2023 20 minutes ago, GrimReaper said: Easy to test, ain't it? Sorry, I worded that wrong. I wasn't displaying the subtitles. Should it have transcoded if the cause was the subtitles and they weren't being displayed.
GrimReaper 4739 Posted March 1, 2023 Posted March 1, 2023 24 minutes ago, jrhessey said: I wasn't displaying the subtitles. That's not what your logs show. 25 minutes ago, jrhessey said: Should it have transcoded if the cause was the subtitles and they weren't being displayed. If the subs were reason for transcoding - then it wouldn't transcode. However, if the underlying reason is different, it'd transcode nevertheless with subs disabled.
jrhessey 21 Posted March 1, 2023 Author Posted March 1, 2023 OK, that's what I thought would happen. I'll run both videos and grab the ffmpeg logs and server log and upload. I appreciate all the quick replies everyone!!
jrhessey 21 Posted March 1, 2023 Author Posted March 1, 2023 Here you go guys. I played CSI Vegas Season 2 Episode 5 (Direct Play) and Episode 14 (Transcode). I included both the remux and transcode log but they are both from Episode 14. The emby server log shows the direct play of Episode 5. I included the hardware detection too just in case. Episode 14 and 5 txt files are the media info for each episode. One weird thing I see on the activity is that the transcode episode was played twice and it said it was recovered from a playback error. I've attached a couple screenshot as well showing the tier bandwidth settings (fCOdRus and HEVC Wiki) . That's the only thing I can see that is different between the 2 and I am wondering if the shield or emby can't handle the bandwidth difference, 25 for main and 100 for high. Thanks for any help everyone!! ffmpeg-transcode-9c35cb75-6440-4548-88ff-b2cb6aabdcd5_1.txt ffmpeg-remux-2fcdc82f-b029-4840-b56f-db4a9997a71f_1.txt embyserver.txt hardware_detection-63813288508.txt Episode 14.txt Episode 5.txt
jrhessey 21 Posted March 2, 2023 Author Posted March 2, 2023 I'm not sure if I ruled anything out or not, but I have a samsung TV with the Emby for Samsung app installed and that plays these episodes without transcoding. If the samsung app is written in android as well, at least that is what it looks like, maybe that narrows it down to the shield device.
rbjtech 5284 Posted March 2, 2023 Posted March 2, 2023 1 minute ago, jrhessey said: I'm not sure if I ruled anything out or not, but I have a samsung TV with the Emby for Samsung app installed and that plays these episodes without transcoding. If the samsung app is written in android as well, at least that is what it looks like, maybe that narrows it down to the shield device. No the samsung uses the Tizen OS. Usually it's the other way around, the Shield device is much more compatible than the samsung player. Is it just these files or all files ?
jrhessey 21 Posted March 2, 2023 Author Posted March 2, 2023 It's all 4k files where the last chunk (tier) of the hevc format profile is set to high. So far, I've only seen Main@L5@High. It's the files that the have the HIGH set for the tier section of the hevc profile. That's what I thought too about the shield being more compatible, which is why I got them.
rbjtech 5284 Posted March 2, 2023 Posted March 2, 2023 29 minutes ago, jrhessey said: It's all 4k files where the last chunk (tier) of the hevc format profile is set to high. So far, I've only seen Main@L5@High. It's the files that the have the HIGH set for the tier section of the hevc profile. That's what I thought too about the shield being more compatible, which is why I got them. I have many 4k remux's set to main/high - and they direct play just fine ... It's a strange one for sure - as I would expect all the files above to direct plat without issue on the Shield ..
Luke 42077 Posted March 2, 2023 Posted March 2, 2023 Hi. Can you try sideloading our standard android app on the same device and see how that compares? https://emby.media/emby-for-android.html Thanks.
jrhessey 21 Posted March 12, 2023 Author Posted March 12, 2023 Sorry for the long delay, just got back from vacation. I installed the emby for android apk in Lukes post above and the videos all direct play. 1
Luke 42077 Posted March 12, 2023 Posted March 12, 2023 4 hours ago, jrhessey said: Sorry for the long delay, just got back from vacation. I installed the emby for android apk in Lukes post above and the videos all direct play. Thanks. Are you happy continuing to use that?
jrhessey 21 Posted March 13, 2023 Author Posted March 13, 2023 Yeah. The only thing I miss is the long press button to bring up stats for nerds... lol! Everything else appears to be working great! 1
Carlo 4560 Posted March 21, 2023 Posted March 21, 2023 On 3/1/2023 at 11:48 AM, jrhessey said: here are the ffmpeg files for the file that transcoded. ffmpeg-transcode-b6c3ecb5-5aa9-44a0-b5e2-da6e0e18b260_1.txt 143.36 kB · 5 downloads ffmpeg-remux-0bc93a4f-4f87-43df-889e-7a2d11bd89e0_1.txt 12.78 kB · 4 downloads There's a limit of 2GB set for the client which forced it to transcode. It was software transcoding and it could only transcode the 4K file at speed=0.448x which is a bit less than half the speed it needed to transcode at to be successful. Subtitles looked fine. Your problem might have only been a setting limiting bandwidth to 2MB. The filtergraph looks a little strange to me. @softworkzcan you take a look at this: We have 0 HLS with H.264, audio, no subs and also 1 HLS with sub and HEVC but no audio.. I don't know if it's just a funky graph drawn this way but the ffmpeg file look a bit strange as well.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now