pdeliot 10 Posted February 27, 2023 Posted February 27, 2023 (edited) Hi, I've recently noticed that HEVC direct play do not seems to work anymore... I'm using Windows Server 4.7.11.0, and with latest Adnroid, Windows or XBOX client, any HEVC content are no more played with direct play, but transcoded to H264. Maybe I have missed semething in the configurations.. But this was functional in the past. I do no know exactly when it stopped working. Test done: If I'm preventing "Video re-encode if required" for the user... The video is taking more time to start.. But functionning well with direct HEVC play. ffmpeg-transcode-6b58529d-9c4d-401e-981d-a2839de1ff3e_1.txt ffmpeg-remux-ebe6fd12-517d-46a5-b68e-6a194f49a4f2_1.txt ffmpeg-directstream-604fc4f4-7646-48ed-9c56-f5b92f4370e3_1.txt Edited February 27, 2023 by pdeliot
Happy2Play 9780 Posted February 27, 2023 Posted February 27, 2023 @pdeliotDevs will have to comment but looks related to the "CodecTag":"HEVC". As playback info is limited to "hevc-codectag=hvc1,hev1". 1
Luke 42079 Posted February 28, 2023 Posted February 28, 2023 HI, it can still direct play hevc, but only the hevc profiles that the device supports. Does this answer your question?
pdeliot 10 Posted March 6, 2023 Author Posted March 6, 2023 (edited) It was working on any tested devices in the past... HEVC is working on all these device when diabling "auto convert" in Emby sever! (as shown in the attached logs.. and properly displayed) All target devices are supporting HEVC... Tested on: -Various Samsung phones -Windows 10 and 11 with HEVC extention (operational on other video player, including Windows film and TV) -XBOX one, XBOX X It looks like a lack in Emby client HEVC support detection... ffmpeg-directstream-604fc4f4-7646-48ed-9c56-f5b92f4370e3_1.txt Edited March 6, 2023 by pdeliot
ebr 16184 Posted March 6, 2023 Posted March 6, 2023 3 hours ago, pdeliot said: It looks like a lack in Emby client HEVC support detection Hi. Actually I believe the issue is what was identified above. The codec tag on these items is unexpected. 1
GrimReaper 4740 Posted March 6, 2023 Posted March 6, 2023 But what would Codec Tag:HEVC even indicate? Thought that there are only 2 codec tags with main difference between hvc1 and hev1 being where the parameter sets are stored - where does HEVC fall-in there? And it is based on what specs? 1
Happy2Play 9780 Posted March 6, 2023 Posted March 6, 2023 I will guess a bad encode or non-standard encode as I can't seem to find anything on that "CodecTag":"HEVC". As the device only technically supports "hevc-codectag=hvc1,hev1". But yes this can be overridden occasionally depending on differences. 1
pdeliot 10 Posted March 9, 2023 Author Posted March 9, 2023 (edited) Encoded with ffmpeg with hevc_nvenc The same using hevc (libx265)... (attached log) ffmpeg-transcode-c6ea1ba9-d175-4aed-bf21-d8a96a265f22_1.txt Edited March 9, 2023 by pdeliot
pdeliot 10 Posted March 9, 2023 Author Posted March 9, 2023 A quick sample thereroseaux-152740.ts ffmpeg-transcode-892ea417-3710-4a9e-b072-1ee1bfe62f44_1.txt
Darkseidd 59 Posted March 9, 2023 Posted March 9, 2023 idk about others setup, but this is my setup to ensure DirectPlay is always in place. its been years since last i saw log with *transcode* name on the log's name.
GrimReaper 4740 Posted March 9, 2023 Posted March 9, 2023 38 minutes ago, Darkseidd said: idk about others setup, but this is my setup to ensure DirectPlay is always in place. its been years since last i saw log with *transcode* name on the log's name. I would assume that you either don't have a very wide variety of clients or you're very meticulous about pre-processing/formatting your media, as that setup would result in trouble-free operation in very limited number of installations, and is way more likely to create additional issues than it is to solve them if it were applied more widely in general. 1
Luke 42079 Posted March 9, 2023 Posted March 9, 2023 2 hours ago, pdeliot said: Encoded with ffmpeg with hevc_nvenc The same using hevc (libx265)... (attached log) ffmpeg-transcode-c6ea1ba9-d175-4aed-bf21-d8a96a265f22_1.txt 44.02 kB · 2 downloads What was the command line?
pdeliot 10 Posted March 9, 2023 Author Posted March 9, 2023 46 minutes ago, Luke said: What was the command line? Very trivial: ffmpeg -i myinputfile.mp4 -map 0 -c:v hevc myoutputfile.ts Using ffmpeg 6.0 on windows.. but the behavior can bee seen with video encoded by 5.1 or older...
pdeliot 10 Posted March 9, 2023 Author Posted March 9, 2023 (edited) I've got a mp4/hevc taken from my phone... Native file format: no transcode Remuxing (not rencoded) to mp4 with ffmpeg: no transcode ffmpeg.exe -i 20221222_133612.mp4 -map 0 -c:a copy -c:v copy T1.mp4 Remuxing (not rencoded) to ts with ffmpeg: transcode ffmpeg.exe -i 20221222_133612.mp4 -map 0 -c:a copy -c:v copy T2.ts Edited March 9, 2023 by pdeliot
Happy2Play 9780 Posted March 9, 2023 Posted March 9, 2023 My upstanding it should be hev1 by default not "CodecTag":"HEVC". But sound like you have to add the tag. ffmpeg -i input-hev1.mp4 -c:v copy -tag:v hvc1 -c:a copy output-hvc1.mp4 ffmpeg - Encode H265 to hvc1 codec - Stack Overflow 1 hour ago, pdeliot said: Rebuilt (not rencoded) to ts with ffmpeg: transcode ffmpeg.exe -i 20221222_133612.mp4 -map 0 -c:a copy -c:v copy T2.ts Not enough info as changing containers is not always that simple. 1
pdeliot 10 Posted March 9, 2023 Author Posted March 9, 2023 (edited) 45 minutes ago, Happy2Play said: My upstanding it should be hev1 by default not "CodecTag":"HEVC". But sound like you have to add the tag. ffmpeg -i input-hev1.mp4 -c:v copy -tag:v hvc1 -c:a copy output-hvc1.mp4 ffmpeg - Encode H265 to hvc1 codec - Stack Overflow Not enough info as changing containers is not always that simple. I guess this is the default way for ffmpeg to "tag" HEVC for some stream containers... Unfortunatelly changing the "tagging" (then at least remuxing) on the 12 000+ video files I have in my library is not an option. And this was not a issue with older Emby versions... Then .. What has changed? How to make it work without modifiying the files? Edited March 9, 2023 by pdeliot
Happy2Play 9780 Posted March 9, 2023 Posted March 9, 2023 3 minutes ago, pdeliot said: I guess this is the default way for ffmpeg to "tag" HEVC for some stream containers... Unfortunatelly changing the "tagging" on the 12 000+ video files I have in my library is not an option. And this was not a issue with older Emby versions... Then .. What has changed? How to make it work without modifiying the files? Will have to test but have never seen that as a tag. As there is no documentation anywhere on anything that supports it even if you can get it to work. Can you find any documentation that is a legitimate codec_tag. But just adding support for something can cause more issues than it is worth also.
pdeliot 10 Posted March 9, 2023 Author Posted March 9, 2023 8 minutes ago, Happy2Play said: Will have to test but have never seen that as a tag. As there is no documentation anywhere on anything that supports it even if you can get it to work. Can you find any documentation that is a legitimate codec_tag. But just adding support for something can cause more issues than it is worth also. I agree you technically that implementing something out the standard can cause issue... But.. ffmpeg is the most popular tool to encode video today (including Emby)... ffmpeg default implementation can be wrong.. but is probably one of the most used. Secondly: this has always worked with Emby. I've chosen Emby because it is was open source.. And because it is a great tool. Regarding the way my files are encoded... I've chosen HEVC and m2ts, ffmpeg encoder and associated encoding options, after extensive tests of Emby behavior with resulting files... Unfortunately today, I'm facing more and more regression with Emby, including now this one... It is becoming scary to loos all this Investment, and painful..
pdeliot 10 Posted March 9, 2023 Author Posted March 9, 2023 HEVC FOURCC is at least supported by ffmpeg... But also Microsoft: https://learn.microsoft.com/en-us/windows/win32/medfound/video-subtype-guids
Happy2Play 9780 Posted March 9, 2023 Posted March 9, 2023 Devs and/or experienced encoders will have to comment as I am just going off the togs and what the device says. Have never seen that codec_tag and can't find anything on it on the internet so to me suggest a problem. But personally, don't encode anything into ts or utilize it unless the serve is doing it behind the scenes. But with the little research I have done correcting them defective encoding tagging should resolve the issue. With testing it appears to the "TS" container as in mkv or mp4 it does not have that codec_tag but still something a dev would have to explain.
pdeliot 10 Posted March 9, 2023 Author Posted March 9, 2023 VLC also use HEVC tag... https://code.videolan.org/videolan/vlc/-/blob/master/include/vlc_fourcc.h#L142
Happy2Play 9780 Posted March 9, 2023 Posted March 9, 2023 (edited) Codec is not the problem the tags are. And neither of those show anything about supported "&hevc-codectag=hvc1,hev1". @Luke@softworkz But in a mp4 container the attached file above is "codec_tag_string": "hev1",' And mkv is "codec_tag_string": "[0][0][0][0]",. But in a ts container it is "codec_tag_string": "HEVC",. So this becomes a specific Container issue with the way the TAG is handled. Only did "-c copy" to change containers. Spoiler MP4 "index": 0, "codec_name": "hevc", "codec_long_name": "H.265 / HEVC (High Efficiency Video Coding)", "profile": "Main", "codec_type": "video", "codec_tag_string": "hev1", "codec_tag": "0x31766568", MKV "index": 0, "codec_name": "hevc", "codec_long_name": "H.265 / HEVC (High Efficiency Video Coding)", "profile": "Main", "codec_type": "video", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", TS "index": 0, "codec_name": "hevc", "codec_long_name": "H.265 / HEVC (High Efficiency Video Coding)", "profile": "Main", "codec_type": "video", "codec_tag_string": "HEVC", "codec_tag": "0x43564548", Edited March 9, 2023 by Happy2Play
rbjtech 5284 Posted March 14, 2023 Posted March 14, 2023 (edited) The HEVC tag is 'now' valid as that is what ffmpeg (emby + I guess a recent ffmpeg change, just tested the nightly build) has made for TS files. An older ffmpeg does not use 'HEVC' - it uses codec_tag_string=[36][0][0][0] on the particular ffmpeg version I was testing. So I think emby just needs to accommodate both - or maybe raise a bug report to ffmpeg to get them to revert it to as it was for TS files ? Edited March 14, 2023 by rbjtech 1
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