Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vceenc 7.0 is the last version working on my computer, the later ones stop while encoding. #62

Closed
swadomlic opened this issue Aug 21, 2022 · 16 comments

Comments

@swadomlic
Copy link

Hello,
i have AMD Ryzen 7 Pro 4750G and vceenc 7.00 is the last version working on my computer, the later ones stop while encoding without error messages.

@rigaya
Copy link
Owner

rigaya commented Aug 26, 2022

I'm having no problem with RX460 or RX5500XT with 22.7.1 driver.

Would you please let me know which graphics driver you are having problem with?

@swadomlic
Copy link
Author

i have release 22.8.2 of graphics driver

@rigaya
Copy link
Owner

rigaya commented Aug 28, 2022

Thanks, also tried 22.8.2 driver with RX5500XT at Win11 but worked fine at my side.

Would you please provide result of below to give further information?

  1. VCEEncC64.exe --check-hw
  2. VCEEncC64.exe --check-clinfo
  3. the encode log with "--log-level debug" added when it crushes

@swadomlic
Copy link
Author

  1. VCEEncC64.exe --check-hw

VCEEnc (x64) 7.00 (r1066) by rigaya, Apr 30 2022 18:34:01 (VC 1931/Win)
AMF Version 1.4.24
reader: raw, avs, vpy, avhw [H.264/AVC, H.265/HEVC, MPEG2, VP9, VC-1]
VCE available
device #0: AMD Radeon

  1. VCEEncC64.exe --check-clinfo

OpenCL platform #0 [0x0000020246B38350]
AMD Accelerated Parallel Processing Advanced Micro Devices, Inc. OpenCL 2.1 AMD-APP (3444.0)[FULL_PROFILE]
extensions:cl_khr_icd cl_khr_d3d10_sharing cl_khr_d3d11_sharing cl_khr_dx9_media_sharing cl_amd_event_callback cl_amd_offline_devices
device #0 [0x000002024521BD60]
AMD Radeon Graphics (8 CU) @ 2100 MHz (3444.0 (PAL,HSAIL))
name : gfx90c
device type : gpu
vendor : 4098 (Advanced Micro Devices, Inc.)
profile : FULL_PROFILE
version : OpenCL 2.0 AMD-APP (3444.0)
extensions : cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_d3d10_sharing cl_khr_d3d11_sharing cl_khr_dx9_media_sharing cl_khr_image2d_from_buffer cl_khr_subgroups cl_khr_gl_event cl_khr_depth_images cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_amd_liquid_flash cl_amd_copy_buffer_p2p cl_amd_planar_yuv
pcie_id_amd : 5686
topology : ☺
board_name : AMD Radeon Graphics
global_mem_size : 13337 MB
global_free_mem_size_amd : 12 MB
global_mem_channels_amd : 4
global_mem_banks_amd : 4
global_mem_bank_width_amd : 256
global_mem_cache_size : 16 KB
global_mem_cacheline_size : 64 B
max_mem_alloc_size : 9596 MB
mem_base_addr_align : 2048
min_data_type_align_size : 128
local_mem_size : 32 KB
local_mem_size_per_cu_amd : 64 KB
local_mem_banks_amd : 32
max_const_args : 8
max_const_buffer_size : 9826598 KB, preferred 0 KB
image2d max size : 16384 x 16384
image3d max size : 2048 x 2048 x 2048
max_image_args : read 128, write 64
profiling_timer_resolution : 1 ns
max_parameter_size : 1024
max_work_group_size : 256
max_work_item_dims : 0
simd_per_cu_amd : 4
simd_width_amd : 16
simd_instruction_width_amd : 1
wavefront_width_amd : 64
thread_trace_supported_amd : 1
async_queue_support_amd : 2
vec width char: 4/4
short: 2/2
int: 1/1
long: 1/1
half: 1/1
float: 1/1
double: 1/1

thank you for help

@rigaya
Copy link
Owner

rigaya commented Aug 28, 2022

Thank you for the information. I think the information are detected fine in this case, it's hard to find out what is causing the issue.

Would you please also share the output with VCEEnc 7.08 (or the one it crushes)? (I'm sorry I didn't mention about this.)

  1. VCEEncC64.exe --check-hw
  2. VCEEncC64.exe --check-clinfo
  3. VCEEncC64.exe --check-features
  4. the encode log with "--log-level debug" option added (does this still crush without any message?)

That might give us the hint where and why the current version crushes.

@swadomlic
Copy link
Author

  1. VCEEncC64.exe --check-hw

VCEEnc (x64) 7.08 (r1175) by rigaya, Aug 25 2022 13:14:12 (VC 1933/Win)
AMF Version 1.4.26
reader: raw, avs, vpy, avhw [H.264/AVC, H.265/HEVC, MPEG2, VP9, VC-1]
VCE available
device #0: AMD Radeon

  1. VCEEncC64.exe --check-clinfo

OpenCL platform #0 [0x000001DA4DCA2E90]
AMD Accelerated Parallel Processing Advanced Micro Devices, Inc. OpenCL 2.1 AMD-APP (3444.0)[FULL_PROFILE]
extensions:cl_khr_icd cl_khr_d3d10_sharing cl_khr_d3d11_sharing cl_khr_dx9_media_sharing cl_amd_event_callback cl_amd_offline_devices
device #0 [0x000001DA4C309220]
AMD Radeon Graphics (8 CU) @ 2100 MHz (3444.0 (PAL,HSAIL))
name : gfx90c
device type : gpu
vendor : 4098 (Advanced Micro Devices, Inc.)
profile : FULL_PROFILE
version : OpenCL 2.0 AMD-APP (3444.0)
extensions : cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_d3d10_sharing cl_khr_d3d11_sharing cl_khr_dx9_media_sharing cl_khr_image2d_from_buffer cl_khr_subgroups cl_khr_gl_event cl_khr_depth_images cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_amd_liquid_flash cl_amd_copy_buffer_p2p cl_amd_planar_yuv
pcie_id_amd : 5686
topology : ☺
board_name : AMD Radeon Graphics
global_mem_size : 13337 MB
global_free_mem_size_amd : 12 MB
global_mem_channels_amd : 4
global_mem_banks_amd : 4
global_mem_bank_width_amd : 256
global_mem_cache_size : 16 KB
global_mem_cacheline_size : 64 B
max_mem_alloc_size : 9596 MB
mem_base_addr_align : 2048
min_data_type_align_size : 128
local_mem_size : 32 KB
local_mem_size_per_cu_amd : 64 KB
local_mem_banks_amd : 32
max_const_args : 8
max_const_buffer_size : 9826598 KB, preferred 0 KB
image support : yes
image2d max size : 16384 x 16384
image3d max size : 2048 x 2048 x 0
image_pitch_alignment : 256
max_image_args : read 128, write 64
profiling_timer_resolution : 1 ns
max_parameter_size : 1024
max_work_group_size : 256
max_work_item_dims : 0
simd_per_cu_amd : 4
simd_width_amd : 16
simd_instruction_width_amd : 1
wavefront_width_amd : 64
thread_trace_supported_amd : 1
async_queue_support_amd : 2
vec width char: 4/4
short: 2/2
int: 1/1
long: 1/1
half: 1/1
float: 1/1
double: 1/1

  1. VCEEncC64.exe --check-features

device #0: AMD Radeon
H.264/AVC encode features
10bit depth: no
acceleration: Hardware-accelerated
max profile: High
max level: unknown
max bitrate: 100000 kbps
ref frames: 1-16
Bframe support: no
HW instances: 1
max streams: 16
timeout support: yes

H.264/AVC input:
Width: 128 - 4096
Height: 128 - 4096
alignment: 32
Interlace: no
pix format: YUV420P[7], YV12[2], BGRA[3], RGBA[5], ARGB[4], NV121
memory type: DX11(native), OPENCL, OPENGL, HOST

H.264/AVC output:
Width: 128 - 4096
Height: 128 - 4096
alignment: 32
Interlace: no
pix format: NV121
memory type: DX11(native), OPENCL, OPENGL, HOST

H.265/HEVC encode features
10bit depth: yes
acceleration: Hardware-accelerated
max profile: main
max level: unknown
max bitrate: 100000 kbps
ref frames: 1-16
max streams: 16
timeout support: yes

H.265/HEVC input:
Width: 128 - 4096
Height: 128 - 4096
alignment: 32
Interlace: no
pix format: YUV420P[7], YV12[2], BGRA[3], RGBA[5], ARGB[4], NV121, P01010
memory type: DX11(native), OPENCL, OPENGL, HOST

H.265/HEVC output:
Width: 128 - 4096
Height: 128 - 4096
alignment: 32
Interlace: no
pix format: NV121, P01010
memory type: DX11(native), OPENCL, OPENGL, HOST

device #0: AMD Radeon
H.264/AVC decode features
10bit depth: no
acceleration: Hardware-accelerated
max streams: 16

H.264/AVC output:
Width: 32 - 4096
Height: 32 - 2160
alignment: 32
Interlace: yes
pix format: NV121, BGRA[3], RGBA[5]
memory type: DX11(native)

H.265/HEVC decode features
10bit depth: yes
acceleration: Hardware-accelerated
max streams: 0

H.265/HEVC output:
Width: 32 - 7680
Height: 32 - 4320
alignment: 32
Interlace: yes
pix format: NV121, BGRA[3], RGBA[5]
memory type: DX11(native)

MPEG2 decode features
10bit depth: no
acceleration: Hardware-accelerated
max streams: 16

MPEG2 output:
Width: 32 - 1920
Height: 32 - 1080
alignment: 32
Interlace: yes
pix format: NV121, BGRA[3], RGBA[5]
memory type: DX11(native)

VP9 decode features
10bit depth: yes
acceleration: Hardware-accelerated
max streams: 16

VP9 output:
Width: 32 - 7680
Height: 32 - 4320
alignment: 32
Interlace: yes
pix format: NV121, BGRA[3], RGBA[5]
memory type: DX11(native)

VC-1 decode features
10bit depth: no
acceleration: Hardware-accelerated
max streams: 16

VC-1 output:
Width: 32 - 1920
Height: 32 - 1080
alignment: 32
Interlace: yes
pix format: NV121, BGRA[3], RGBA[5]
memory type: DX11(native)

yes, crush without error messages
later i try version 7.08

@rigaya
Copy link
Owner

rigaya commented Aug 29, 2022

Thanks you very much.

Seems like that GPU is detected fine, OpenCL is detected fine, and VCE/VCN features are also detected fine. It's weird that encoding crushes without any error messages even with "--log-level debug", difficult to know what is happening...

Would you please let me know the exact command line you're giving when encoding?

@swadomlic
Copy link
Author

yesterday i used version 7.08 and i was able to encode a 4k 10bit h265 movie without any problem. I hope I have solved it, if that happens I will post the log here with the debug option, but it is a very, very large file.

@swadomlic
Copy link
Author

my friend yesterday vceenc version 7.08 stopped 3 times on three different films, as per your request this is the log file with log level debug.
codifica_vce_4k_out_log.txt

@alex-cccip
Copy link

alex-cccip commented Sep 1, 2022

Dear Rigaya,
Got the same thing happening with discrete RX5700XT. Re-encoding UHD HDR10 titles to HEVC FHD resolution, encoding starts and stops at a random point with no information in the log.
7.00 version works fine, 7.03 7.05 7.08 does not

Here is the report
report.txt

@rigaya
Copy link
Owner

rigaya commented Sep 1, 2022

Thank you for the report.

I'm still not sure what is causing the problem, as 7.01 includes many changes from 7.00, including changes in OpenCL filtering (d9e005c) and HEVC bitstream filter (c88b1bf).

It is possible that the problem is caused by HEVC hw decode, in that case it would be possible to avoid the error by using --avsw (but might be slow...)

@swadomlic
Copy link
Author

I just did an encoding with the --avsw option and version 7.08
it is slower but not too much. All right, no problem ... I hope you solve the problem and in the meantime I use version 7.0

rigaya added a commit that referenced this issue Sep 4, 2022
…定性改善を図る変更。( #62 )

VCEEnc 7.01以降、エンコードが途中で黙って異常終了するという報告があった。
d9e005c でcl_khr_image2d_from_bufferがサポートされないとき、一度確保したimageを使いまわすように変更したが、
このときcl_khr_image2d_from_bufferがサポートされる場合に、bufferから作成したimageの解放タイミングが後ろにずれてしまっており、
これが不安定性の一因ではないかと思われるため、元に戻す。

7.00まで & 今回の変更後
1. image from buffer の作成
2. kernel処理の発行
3. image from buffer の解放指示
4. エンコーダ投入前の同期
-- 次のフレームの処理 --
5. 前段処理からbufferにデータ書き込み指示
1. に戻る

d9e005c の変更後 (7.01-7.08)
1. image from buffer の作成
2. kernel処理の発行
3. エンコーダ投入前の同期
-- 次のフレームの処理 --
4. 前段処理からbufferにデータ書き込み指示
5. image from buffer の解放指示 <<<< 後ろにずれている
1. に戻る
@rigaya
Copy link
Owner

rigaya commented Sep 4, 2022

VCEEnc 7.09 effectively moves back OpenCL related change made in VCEEnc 7.01, which might be the cause of the problem.

Would you please have a try with this?

@alex-cccip
Copy link

alex-cccip commented Sep 4, 2022

Domo origato!
7.09 seems to be right on track, not kicking out so far:

2022-09-04 14:38:59 HOME-PC fastflix-core[14928] INFO [93.7%] 84416 frames: 54.96 fps, 4842 kb/s, remain 0:01:44, GPU 17%, VE 95%, est out size 2169.4MB
2022-09-04 14:39:00 HOME-PC fastflix-core[14928] INFO [100.0%] 84494 frames: 54.98 fps, 4837 kb/s, remain 0:00:00, GPU 19%, VE 95%, est out size 2032.2MB
2022-09-04 14:39:01 HOME-PC fastflix-core[14928] INFO [100.0%] 84572 frames: 55.00 fps, 4833 kb/s, remain 0:00:00, GPU 18%, VE 94%, est out size 2032.3MB
2022-09-04 14:39:01 HOME-PC fastflix-core[14928] INFO [100.0%] 84652 frames: 55.02 fps, 4829 kb/s, remain 0:00:00, GPU 21%, VE 93%, est out size 2032.4MB
2022-09-04 14:39:02 HOME-PC fastflix-core[14928] INFO encoded 84747 frames, 55.05 fps, 4823.50 kbps, 2032.45 MB
2022-09-04 14:39:02 HOME-PC fastflix-core[14928] INFO encode time 0:25:39, CPU: 3.3, GPU: 10.6, VE: 66.7
2022-09-04 14:39:02 HOME-PC fastflix-core[14928] INFO frame type IDR 354
2022-09-04 14:39:02 HOME-PC fastflix-core[14928] INFO frame type I 354, avgQP 16.84, total size 20.10 MB
2022-09-04 14:39:02 HOME-PC fastflix-core[14928] INFO frame type P 84393, avgQP 17.02, total size 2012.35 MB
2022-09-04 14:39:03 HOME-PC fastflix-core[14928] INFO
2022-09-04 14:39:03 HOME-PC fastflix-core[14928] INFO
2022-09-04 14:39:03 HOME-PC fastflix[8352] DEBUG Updating queue from command worker: Response(status='complete', video_uuid='b2210f42-aa57-4844-b5d7-63d2b7a066e2', command_uuid='8beb5475-e00e-4286-92cb-98b71595afb9')
2022-09-04 14:39:03 HOME-PC fastflix[8352] DEBUG System has been allowed to enter sleep mode again
2022-09-04 14:39:03 HOME-PC fastflix[8352] DEBUG System has been allowed to enter sleep mode again

@swadomlic
Copy link
Author

thank you very much, you are the best, with version 7.09 all work fine

@rigaya
Copy link
Owner

rigaya commented Sep 5, 2022

@alex-cccip and @swadomlic
Thank you for confirming.

Thank you for your information and cooperation to debugging this problem with your reports, I'm glad to hear that the problem is gone!

@rigaya rigaya closed this as completed Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants