richt 94 Posted December 5, 2024 Posted December 5, 2024 I'll start out by stating that I had hardware transcoding working fine under TOS5. Since upgrading to TOS 6, it has not worked correctly. Hardware detection 'appears' to be working correctly as far as i can tell. When I attempt to convert a file, it attempts to use the hardware decoders and encoders but fails and drops to software encoding which completes correctly. Wjile viewing live TV "stats for nerds" indicates that hardware encoding is NOT being used. I've activated debug level logging as the error in the transcode log seemed a bit vague. Debug didn't seem to improve the detail any for me. Here are the appropriate logs. Note that I cancelled the conversion process one it had defaulted to software. Note that the version of Emby installed is 64-bit (TOS 5). Not sure if 64-bit would be more or less appropriate for TOS6. embyserver.txt ffmpeg-transcode-7a43d010-aa1b-4c96-a7d2-01260fdbeeb4_1.txt ffmpeg-transcode-dfc95e40-1152-4afc-9396-ef3f3cd09543_1.txt hardware_detection-63868999235.txt
Luke 42077 Posted December 11, 2024 Posted December 11, 2024 @richtare you still having an issue with this? If so, please try resetting your transcoding customizations and see if that helps: Warning EncoderParametersH264LibX.Preset: Original: veryfast Actual: faster Warning EncoderParametersH264LibX.ConstantRateFactor: Original: 23 Actual: 21 Thanks !
richt 94 Posted December 11, 2024 Author Posted December 11, 2024 (edited) @LukeYes, I am still having the problem. I've looked and the HARDWARE encoders are still set at defaults. See the screen capture below. The SOFTWARE encoder is set as you noted, however my guess is that these parameters are not called until after the hardware decoder has failed. I will however reset the software encoder to defaults and retest. Since reporting the error I have done a little testing directly from the TOS6 command shell. In the shell, I can get VAAPI encoding to work, but so far not QSV. Looks like Emby is using QSV, is there any way to change it to VAAPI? <edit> After resetting all software and hardware encoders, to default, hardware encoding still fails. Attached log. ffmpeg-transcode-1bcba9b0-6c3a-42bc-a6c5-98aa298ad793_1.txt Edited December 11, 2024 by richt
Luke 42077 Posted December 18, 2024 Posted December 18, 2024 @richtwhat model Terramaster do you have?
richt 94 Posted December 18, 2024 Author Posted December 18, 2024 @LukeIt is a Terramaster F4-423 with 32GB RAM.
Luke 42077 Posted December 28, 2024 Posted December 28, 2024 @richtcan you provide a log from TOS 5 transcoding the exact same content? Thanks !
richt 94 Posted December 29, 2024 Author Posted December 29, 2024 Sorry, but no. None left at this time and downgrading isn't an option.
richt 94 Posted December 31, 2024 Author Posted December 31, 2024 I've done a bit more testing and have come up with errors regarding rate control modes. I've gotten some command line items to work with -q (something similar to this). /Volume1/@apps/emby/emby-server/bin/emby-ffmpeg -init_hw_device qsv=hw -filter_hw_device hw -i "${file}" -vf hwupload=extra_hw_frames=64,format=qsv -c:v h264_qsv -q 30 "${filemp4}" I also extracted a command from one of the transcode logs in which HW transcoding had failed. This was the result, sudo -u emby /bin/bash #to run in the context of the emby account /Volume1/@apps/emby/emby-server/bin/emby-ffmpeg -copyts -start_at_zero -init_hw_device "vaapi=dev1:/dev/dri/renderD128" -init_hw_device qsv=qsvdev@dev1 -filter_hw_device qsvdev -f mpegts -c:v:0 mpeg2video -threads:v:0 1 -hwaccel:v:0 vaapi -hwaccel_device:v:0 dev1 -hwaccel_output_format:v:0 vaapi -noautorotate -i "/Volume2/Media/Videos/Emby/TVShow-Recordings/ABC World News Tonight With David Muir (2017)/ABC World News Tonight With David Muir 2024_12_30_18_30_00.ts" -filter_complex "[0:0]hwmap@f1=mode=+read:derive_device=qsv[f1_out0]" -map [f1_out0] -map 0:1 -map 0:2 -sn -c:v:0 h264_qsv -b:v:0 3360000 -g:v:0 360 -maxrate:v:0 3360000 -bufsize:v:0 6720000 -keyint_min:v:0 360 -r:v:0 59.940059661865234 -profile:v:0 high -aud:v:0 1 -c:a:0 aac -ab:a:0 384000 -ac:a:0 6 -metadata:s:a:0 language=eng -disposition:a:0 default -c:a:1 aac -ab:a:1 192000 -ac:a:1 2 -metadata:s:a:1 language=spa -disposition:a:1 0 -avoid_negative_ts disabled -f mp4 -map_metadata -1 -map_chapters -1 "/Volume2/Media/temp/news.mp4" ffmpeg version 5.1-emby_2023_06_25 Copyright (c) 2000-2022 the FFmpeg developers and softworkz for Emby LLC built with gcc 10.3.0 (crosstool-NG 1.25.0) Execution Date: 2024-12-31 18:01:22 [mpeg2video @ 0x7fd0c0] Invalid frame dimensions 0x0. Last message repeated 23 times [mpegts @ 0x7d07c0] PES packet size mismatch [mpegts @ 0x7d07c0] Packet corrupt (stream = 1, dts = 1315713). [mpegts @ 0x7d07c0] PES packet size mismatch [mpegts @ 0x7d07c0] Packet corrupt (stream = 2, dts = 1332993). Input #0, mpegts, from '/Volume2/Media/Videos/Emby/TVShow-Recordings/ABC World News Tonight With David Muir (2017)/ABC World News Tonight With David Muir 2024_12_30_18_30_00.ts': Duration: 00:29:59.56, start: 93659.676144, bitrate: 7950 kb/s Program 3 Stream #0:0[0x31]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, Level 4, 59.94 fps, 59.94 tbr, 90k tbn, Start-Time 93660.130s Side data: cpb: bitrate max/min/avg: 14065600/0/0 buffer size: 7995392 vbv_delay: N/A Stream #0:1[0x34](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 448 kb/s, Start-Time 93659.676s Stream #0:2[0x35](spa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 192 kb/s, Start-Time 93659.804s (visual impaired) Stream mapping: Stream #0:0 (mpeg2video) -> hwmap:default (graph 0) hwmap:default (graph 0) -> Stream #0:0 (h264_qsv) Stream #0:1 -> #0:1 (ac3 (native) -> aac (native)) Stream #0:2 -> #0:2 (ac3 (native) -> aac (native)) Press [q] to stop, [?] for help [h264_qsv @ 0x803780] Selected ratecontrol mode is unsupported [h264_qsv @ 0x803780] some encoding parameters are not supported by the QSV runtime. Please double check the input parameters. Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height [aac @ 0xa4c500] Qavg: 165.766 [aac @ 0xa4c500] 2 frames left in the queue on closing [aac @ 0xd35a80] Qavg: 194.288 [aac @ 0xd35a80] 2 frames left in the queue on closing Conversion failed! EXIT I'll have to see if I can adapt what I have working from my command line tests and create a post processing script.
Luke 42077 Posted January 2, 2025 Posted January 2, 2025 Quote I'll have to see if I can adapt what I have working from my command line tests and create a post processing script. Hi, how would this help in Emby?
richt 94 Posted January 3, 2025 Author Posted January 3, 2025 (edited) It won't help hardware accelerated transcoding errors in Emby or for live TV, but it might help me with workaround to the problem between Emby and TNAS 6 and allow me to convert my recorded files using hardware acceleration. Note the error from my test above using the Emby formatted command [h264_qsv @ 0x803780] Selected ratecontrol mode is unsupported Edited January 3, 2025 by richt 1
richt 94 Posted February 20, 2025 Author Posted February 20, 2025 @Luke Just a quick update on this issue. Emby native hardware transcoding still not working, but I am running a post recording script that does hardware transcodes. My testing has found that CQP works and CBR does not. Tried all kinds of variations on CBR, but so far it always fails. A CBR transcode using QSV fails with the error: [h264_qsv @ 0x2902ac0] Selected ratecontrol mode is unsupported [h264_qsv @ 0x2902ac0] some encoding parameters are not supported by the QSV runtime. Please double check the input parameters. Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height Note that this is a Jasper Lake CPU in TOS 6 so there isn't much I can do about changing the environment. Hoping that Emby can provide a transcode option using CQP at some point in time. If there alrady is one, please let me know how to select it.
Luke 42077 Posted June 17, 2025 Posted June 17, 2025 @richtyou said you're on the stable release? Can you please try these builds for TOS 6? it is version 4.9.0.70: x64: https://github.com/MediaBrowser/Emby.Releases/releases/download/4.8.11.0/emby_TOS6_APP_4.9.0.70_x86_64.tpk arm64: https://github.com/MediaBrowser/Emby.Releases/releases/download/4.8.11.0/emby_TOS6_APP_4.9.0.70_aarch64.tpk Thanks !
richt 94 Posted June 17, 2025 Author Posted June 17, 2025 @Luke Will load it up and try it out. Will test as soon as possible. 1
richt 94 Posted June 18, 2025 Author Posted June 18, 2025 (edited) @LukeSorry to report, it doesn't seem to have helped. I restarted Emby and ran two conversions. I've attached all the logs from those attempts. Both dropped to software encoding. EmbyLogs.zip Edited June 18, 2025 by richt
Luke 42077 Posted June 18, 2025 Posted June 18, 2025 Can you try something with h264 or hevc input? And try just playing in the browser rather than the conversion feature. Thanks.
scout719 1 Posted July 9, 2025 Posted July 9, 2025 Hey @Luke! Just wanted to share that I also had the issue of Hardware acceleration not working after updating to TOS6 and by using the build you shared it worked now! Any plans to have this the normal (Beta) release? Thank you so much for the fix btw , I was already regretting doing the upgrade 1
Luke 42077 Posted July 9, 2025 Posted July 9, 2025 8 minutes ago, scout719 said: Hey @Luke! Just wanted to share that I also had the issue of Hardware acceleration not working after updating to TOS6 and by using the build you shared it worked now! Any plans to have this the normal (Beta) release? Thank you so much for the fix btw , I was already regretting doing the upgrade Hi, we’ll be submitting to terramaster soon. Thanks. 1
Sydo36 2 Posted August 25, 2025 Posted August 25, 2025 Hello. (Sorry for my english) Exactly the same for me. With TOS 5 : Perfect works with software decoding but since i have migrated for TOS 6 and, the hardware decoding isn't available in the transcoding menu. Of course, i owned Emby premiere I will try the version for testing and i am waiting a new version. Thanks You!
Luke 42077 Posted August 27, 2025 Posted August 27, 2025 On 8/25/2025 at 9:26 AM, Sydo36 said: Hello. (Sorry for my english) Exactly the same for me. With TOS 5 : Perfect works with software decoding but since i have migrated for TOS 6 and, the hardware decoding isn't available in the transcoding menu. Of course, i owned Emby premiere I will try the version for testing and i am waiting a new version. Thanks You! Hi, what version number did you try?
Sydo36 2 Posted August 27, 2025 Posted August 27, 2025 (edited) I tried the Last for TOS 5 : The 4.9.1.22. And Now I have installed the Beta Version for Tos 6. It's Work. I have the parameters for Hardware Decode & Recoding Do you know, how this bug will be solved with a new emby version? Thanks you Edited August 27, 2025 by Sydo36 add pics
Luke 42077 Posted August 27, 2025 Posted August 27, 2025 HI, we'll have a new stable release soon. Thanks.
richt 94 Posted September 29, 2025 Author Posted September 29, 2025 @Luke Just a follow up on this issue. After a fresh install of TOS 6 (I had a few reasons to do a factory reset) and install of Emby Beta release 4.9.1.35, hardware transcode is NOT working on my Terramaster F4-423 (JasperLake) but reverts to software transcoding. Hardware transcoding did work on TOS5, but is not working for me on TOS6. Source files are HDHomerun .ts files. I don't have any raw HEVC or h264 source material to test with. embyserver.txtffmpeg-transcode-1ccaa2a3-dc68-4b87-a6a9-b117f7c308a5_1.txt
Luke 42077 Posted October 8, 2025 Posted October 8, 2025 Hi, I would try resetting your customizations: Warning EncoderParametersH264Qsv.BitrateMode: Original: Classic Actual: Vbr
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