AMF icon indicating copy to clipboard operation
AMF copied to clipboard

4K encoding failed

Open vmeisoft opened this issue 8 years ago • 5 comments

In the example project "Simpleencoder", use the macro definition ENABLE_4K, set the AMF_VIDEO_ENCODER_FRAMESIZE property return AMF_OUT_OF_RANGE.

vmeisoft avatar Jan 17 '18 11:01 vmeisoft

On which GPU? use CapabilityManager sample to discover what your GPU can and cannot do.

MikhailAMD avatar Jan 17 '18 14:01 MikhailAMD

Window 7 AMD Radeon R7 200 Series

Code: static wchar_t *pCodec = AMFVideoEncoderVCE_AVC; //static wchar_t *pCodec = AMFVideoEncoder_HEVC;

#define ENABLE_4K

static amf::AMF_MEMORY_TYPE memoryTypeIn = amf::AMF_MEMORY_DX9; //static amf::AMF_MEMORY_TYPE memoryTypeIn = amf::AMF_MEMORY_DX11; static amf::AMF_SURFACE_FORMAT formatIn = amf::AMF_SURFACE_NV12;

Result: 2018-01-18 12:23:41.676 121C [VCEEncoderTrace] Warning: SetProperty FrameSize failed in AMFPropertyStorageExImpl with return code:0x5 2018-01-18 12:23:41.686 121C [SimpleEncoder] Error: c:\users\vmeis\desktop\amf\amf2\amf\public\samples\cppsamples\simpleencoder\simpleencoder.cpp(155):AMF_ERROR 5 : AMF_OUT_OF_RANGE: SetProperty(AMF_VIDEO_ENCODER_FRAMESIZE, 3840x2160) failed

vmeisoft avatar Jan 18 '18 04:01 vmeisoft

These restrictions are unfriendly, increase the workload, out of these range must use other encoders, and I prefer to use other encoders.

AMF version (header): 1000400060000 AMF version (runtime): 1000400040000 DX9: List of adapters: 0: Device ID: 6658 [AMD Radeon R7 200 Series] DX9 : Chosen Device 0: Device ID: 6658 [AMD Radeon R7 200 Series] Querying video decoder capabilities... Codec AMFVideoDecoderUVD_MJPEG is Not supported Codec AMFVideoDecoderUVD_MPEG4 is Hardware-accelerated Decoder input: Width: [32-1920] Height: [32-1080] Vertical alignment: 32 lines. Interlaced support: YES Total of 0 pixel format(s) supported: Total of 1 memory type(s) supported: 0: HOST (native) Decoder output: Width: [32-1920] Height: [32-1080] Vertical alignment: 32 lines. Interlaced support: YES Total of 2 pixel format(s) supported: 0: NV12 (native) 1: BGRA Total of 1 memory type(s) supported: 0: DX9 (native) Codec AMFVideoDecoderUVD_H264_AVC is Hardware-accelerated Decoder input: Width: [32-1920] Height: [32-1080] Vertical alignment: 32 lines. Interlaced support: YES Total of 0 pixel format(s) supported: Total of 1 memory type(s) supported: 0: HOST (native) Decoder output: Width: [32-1920] Height: [32-1080] Vertical alignment: 32 lines. Interlaced support: YES Total of 2 pixel format(s) supported: 0: NV12 (native) 1: BGRA Total of 1 memory type(s) supported: 0: DX9 (native) Codec AMFVideoDecoderUVD_MPEG2 is Hardware-accelerated Decoder input: Width: [32-1920] Height: [32-1080] Vertical alignment: 32 lines. Interlaced support: YES Total of 0 pixel format(s) supported: Total of 1 memory type(s) supported: 0: HOST (native) Decoder output: Width: [32-1920] Height: [32-1080] Vertical alignment: 32 lines. Interlaced support: YES Total of 2 pixel format(s) supported: 0: NV12 (native) 1: BGRA Total of 1 memory type(s) supported: 0: DX9 (native) Codec AMFVideoDecoderHW_H265_HEVC is Not supported Querying video encoder capabilities... Codec AMFVideoEncoderVCE_AVC Acceleration Type:Hardware-accelerated maximum profile:100 maximum level:51 Number of temporal Layers:1 IsBPictureSupported:1

	Max Number of streams supported:16
	Number HW instances:1
	Encoder input:
		Width: [64-1920]
		Height: [64-1920]
		Vertical alignment: 32 lines.
		Interlaced support: NO
		Total of 6 pixel format(s) supported:
			0: NV12 (native)
			1: YUV420P 
			2: YV12 
			3: BGRA 
			4: RGBA 
			5: ARGB 
		Total of 4 memory type(s) supported:
			0: DX9 (native)
			1: OPENCL 
			2: OPENGL 
			3: HOST 
	Encoder output:
		Width: [64-1920]
		Height: [64-1920]
		Vertical alignment: 32 lines.
		Interlaced support: NO
		Total of 1 pixel format(s) supported:
			0: NV12 (native)
		Total of 4 memory type(s) supported:
			0: DX9 (native)
			1: OPENCL 
			2: OPENGL 
			3: HOST 
Codec AMFVideoEncoderVCE_SVC
	Acceleration Type:Hardware-accelerated
	maximum profile:100
	maximum level:51
	Number of temporal Layers:3
	IsBPictureSupported:0

	Max Number of streams supported:16
	Number HW instances:1
	Encoder input:
		Width: [64-1920]
		Height: [64-1920]
		Vertical alignment: 32 lines.
		Interlaced support: NO
		Total of 6 pixel format(s) supported:
			0: NV12 (native)
			1: YUV420P 
			2: YV12 
			3: BGRA 
			4: RGBA 
			5: ARGB 
		Total of 4 memory type(s) supported:
			0: DX9 (native)
			1: OPENCL 
			2: OPENGL 
			3: HOST 
	Encoder output:
		Width: [64-1920]
		Height: [64-1920]
		Vertical alignment: 32 lines.
		Interlaced support: NO
		Total of 1 pixel format(s) supported:
			0: NV12 (native)
		Total of 4 memory type(s) supported:
			0: DX9 (native)
			1: OPENCL 
			2: OPENGL 
			3: HOST 
Codec AMFVideoEncoderHW_HEVC

Not supported Querying video converter capabilities... Converter input: Width: [32-4096] Height: [32-4096] Vertical alignment: 2 lines. Interlaced support: NO Total of 6 pixel format(s) supported: 0: NV12 (native) 1: YV12 (native) 2: BGRA (native) 3: ARGB (native) 4: RGBA (native) 5: YUV420P (native) Total of 4 memory type(s) supported: 0: DX9 (native) 1: OPENCL (native) 2: OPENGL (native) 3: HOST Converter output: Width: [32-4096] Height: [32-4096] Vertical alignment: 2 lines. Interlaced support: NO Total of 6 pixel format(s) supported: 0: NV12 (native) 1: YV12 (native) 2: BGRA (native) 3: ARGB (native) 4: RGBA (native) 5: YUV420P (native) Total of 4 memory type(s) supported: 0: DX9 (native) 1: OPENCL (native) 2: OPENGL (native) 3: HOST DX9: List of adapters: 0: Device ID: 6658 [AMD Radeon R7 200 Series] Invalid Adapter ID Error:AMF_INVALID_ARG DX9: List of adapters: 0: Device ID: 6658 [AMD Radeon R7 200 Series] Invalid Adapter ID Error:AMF_INVALID_ARG

vmeisoft avatar Jan 18 '18 04:01 vmeisoft

Hey, this is not software but hardware restrictions. Your R7 doesn't support 4K encoding. HW is progressing over time and more features and capabilities are added.

MikhailAMD avatar Jan 18 '18 15:01 MikhailAMD

As you see in your own output @vmeisoft :

Encoder output: Width: [64-1920] Height: [64-1920]

Roph avatar Jan 20 '18 23:01 Roph