Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.
3075 Discussions

sample_multi_transcode failed on windows (MFX_ERR_MEMORY_ALLOC)

makefriend8
Beginner
3,210 Views

MSDK version: 20.3.0
OS: Microsoft Windows [ 10.0.19041.685]
Graphics Card: Intel(R) UHD Graphics 630    27.20.100.9030

run

sample_multi_transcode.exe -par n16_noface_test_1080p.par

Multi Transcoding Sample Version 20.3.0

Par file is: n16_noface_test_1080p.par

External allocator will be used as some cmd line paremeters request it.
Some inter-sessions do not use opaque memory (possibly because of -o::raw).
Opaque memory in all inter-sessions is disabled.
Session 0:
MFX HARDWARE Session 0 API ver 1.34 parameters:
Input video: AVC
Output video: To child session
MFX dll: C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_f48be35b3d221b44\libmfxhw64.dll

Session 1:
MFX HARDWARE Session 1 API ver 1.34 parameters:
Input video: AVC
Output video: To child session
MFX dll: C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_f48be35b3d221b44\libmfxhw64.dll

Session 2:
MFX HARDWARE Session 2 API ver 1.34 parameters:
Input video: AVC
Output video: To child session
MFX dll: C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_f48be35b3d221b44\libmfxhw64.dll

Session 3:
MFX HARDWARE Session 3 API ver 1.34 parameters:
Input video: AVC
Output video: To child session
MFX dll: C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_f48be35b3d221b44\libmfxhw64.dll

Session 4:
MFX HARDWARE Session 4 API ver 1.34 parameters:
Input video: AVC
Output video: To child session
MFX dll: C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_f48be35b3d221b44\libmfxhw64.dll

Session 5:
MFX HARDWARE Session 5 API ver 1.34 parameters:
Input video: AVC
Output video: To child session
MFX dll: C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_f48be35b3d221b44\libmfxhw64.dll

Session 6:
MFX HARDWARE Session 6 API ver 1.34 parameters:
Input video: AVC
Output video: To child session
MFX dll: C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_f48be35b3d221b44\libmfxhw64.dll

Session 7:
MFX HARDWARE Session 7 API ver 1.34 parameters:
Input video: AVC
Output video: To child session
MFX dll: C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_f48be35b3d221b44\libmfxhw64.dll

Session 8:
MFX HARDWARE Session 8 API ver 1.34 parameters:
Input video: AVC
Output video: To child session
MFX dll: C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_f48be35b3d221b44\libmfxhw64.dll

Session 9:
MFX HARDWARE Session 9 API ver 1.34 parameters:
Input video: AVC
Output video: To child session
MFX dll: C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_f48be35b3d221b44\libmfxhw64.dll

Session 10:
MFX HARDWARE Session 10 API ver 1.34 parameters:
Input video: AVC
Output video: To child session
MFX dll: C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_f48be35b3d221b44\libmfxhw64.dll

Session 11:
MFX HARDWARE Session 11 API ver 1.34 parameters:
Input video: AVC
Output video: To child session
MFX dll: C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_f48be35b3d221b44\libmfxhw64.dll

Session 12:
MFX HARDWARE Session 12 API ver 1.34 parameters:
Input video: AVC
Output video: To child session
MFX dll: C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_f48be35b3d221b44\libmfxhw64.dll

Session 13:
MFX HARDWARE Session 13 API ver 1.34 parameters:
Input video: AVC
Output video: To child session
MFX dll: C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_f48be35b3d221b44\libmfxhw64.dll

Session 14:
MFX HARDWARE Session 14 API ver 1.34 parameters:
Input video: AVC
Output video: To child session
MFX dll: C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_f48be35b3d221b44\libmfxhw64.dll

Session 15:
MFX HARDWARE Session 15 API ver 1.34 parameters:
Input video: AVC
Output video: To child session
MFX dll: C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_f48be35b3d221b44\libmfxhw64.dll

Session 16:

[ERROR], sts=MFX_ERR_MEMORY_ALLOC(-4), TranscodingSample::CTranscodingPipeline::AllocFrames, CalculateNumberOfReqFrames failed at d:\code\mywork\ffmpeg\mediasdk-intel-mediasdk-20.3.0\samples\sample_multi_transcode\src\pipeline_transcode.cpp:3270

[ERROR], sts=MFX_ERR_MEMORY_ALLOC(-4), TranscodingSample::CTranscodingPipeline::Init, AllocFrames failed at d:\code\mywork\ffmpeg\mediasdk-intel-mediasdk-20.3.0\samples\sample_multi_transcode\src\pipeline_transcode.cpp:3848

[ERROR], sts=MFX_ERR_MEMORY_ALLOC(-4), TranscodingSample::Launcher::Init, pThreadPipeline->pPipeline->Init failed at d:\code\mywork\ffmpeg\mediasdk-intel-mediasdk-20.3.0\samples\sample_multi_transcode\src\sample_multi_transcode.cpp:448

[ERROR], sts=MFX_ERR_MEMORY_ALLOC(-4), wmain, transcode.Init failed at d:\code\mywork\ffmpeg\mediasdk-intel-mediasdk-20.3.0\samples\sample_multi_transcode\src\sample_multi_transcode.cpp:1158

content of n16_noface_test_1080p.par

-i::h264 ./classroom.h264  -join -hw  -async 4 -dec_postproc   -o::sink -vpp_comp_dst_x 0 -vpp_comp_dst_y 0 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -fps 30 
-i::h264 ./2.h264 -join -hw  -async 4 -dec_postproc   -o::sink -vpp_comp_dst_x 480 -vpp_comp_dst_y 0 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -fps 30
-i::h264 ./3.h264 -join -hw  -async 4 -dec_postproc   -o::sink -vpp_comp_dst_x 960 -vpp_comp_dst_y 0 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -fps 30
-i::h264 ./4.h264 -join -hw  -async 4 -dec_postproc   -o::sink -vpp_comp_dst_x 1440 -vpp_comp_dst_y 0 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -fps 30

-i::h264 ./4.h264 -join -hw  -async 4 -dec_postproc   -o::sink -vpp_comp_dst_x 0 -vpp_comp_dst_y 270 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270  -fps 30
-i::h264 ./classroom.h264 -join -hw  -async 4 -dec_postproc   -o::sink -vpp_comp_dst_x 480 -vpp_comp_dst_y 270 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -fps 30 
-i::h264 ./2.h264 -join -hw  -async 4 -dec_postproc   -o::sink -vpp_comp_dst_x 960 -vpp_comp_dst_y 270 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270  -fps 30
-i::h264 ./3.h264 -join -hw  -async 4 -dec_postproc   -o::sink -vpp_comp_dst_x 1440 -vpp_comp_dst_y 270 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270  -fps 30

-i::h264 ./2.h264 -join -hw  -async 4 -dec_postproc   -o::sink -vpp_comp_dst_x 0 -vpp_comp_dst_y 540 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -fps 30
-i::h264 ./3.h264 -join -hw  -async 4 -dec_postproc   -o::sink -vpp_comp_dst_x 480 -vpp_comp_dst_y 540 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -fps 30
-i::h264 ./4.h264 -join -hw  -async 4 -dec_postproc   -o::sink -vpp_comp_dst_x 960 -vpp_comp_dst_y 540 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -fps 30

-i::h264 ./classroom.h264 -join -hw  -async 4 -dec_postproc   -o::sink -vpp_comp_dst_x 1440 -vpp_comp_dst_y 540 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -fps 30 

-i::h264 ./3.h264 -join -hw  -async 4 -dec_postproc   -o::sink -vpp_comp_dst_x 0 -vpp_comp_dst_y 810 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270  -fps 30
-i::h264 ./4.h264 -join -hw  -async 4 -dec_postproc   -o::sink -vpp_comp_dst_x 480 -vpp_comp_dst_y 810 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -fps 30
-i::h264 ./classroom.h264 -join -hw  -async 4 -dec_postproc   -o::sink -vpp_comp_dst_x 960 -vpp_comp_dst_y 810 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -fps 30 
-i::h264 ./2.h264 -join -hw  -async 4 -dec_postproc   -o::sink -vpp_comp_dst_x 1440 -vpp_comp_dst_y 810 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270  -fps 30

-vpp_comp 16 -w 1920 -h 1080 -async 4 -threads 2 -join -hw  -threads 3 -i::source -ext_allocator -ec::nv12 -o::h264 comp_out_1080p_2.h264 -b 8000 
0 Kudos
1 Solution
Mark_L_Intel1
Moderator
2,918 Views

Hi Mars,


I had confirmed the video composition is limited to 8 per tile, it is defined in following place:

https://github.com/projectceladon/MediaSDK/blob/master/_studio/mfx_lib/vpp/include/mfx_vpp_defs.h#L43


Can you change your original par file to see if it works by limited to 8?


Mark


View solution in original post

0 Kudos
9 Replies
RaeesaM_Intel
Moderator
3,189 Views

Hi,


Thank you for reaching out to us.

We are trying to figure out your issue internally. We will get back to you on the updates.


Regards,

Raeesa


0 Kudos
RaeesaM_Intel
Moderator
3,148 Views

Hi,


Could you please confirm that the input files and par file are in the same directory.


Raeesa


0 Kudos
makefriend8
Beginner
3,141 Views
0 Kudos
RaeesaM_Intel
Moderator
3,125 Views

Hi,


We are forwarding this case to subject matter experts for much faster and adequate response.


Thank you

Raeesa


0 Kudos
Mark_L_Intel1
Moderator
3,106 Views

Hi Mars,


Sorry for the late response.


I can reproduce it and I have reported to dev team for investigation, I will keep you updated.


Mark


0 Kudos
Mark_L_Intel1
Moderator
3,088 Views

Hi Mars,

 

I got some progress, it seems the composition function has some limitation:

  • Some combination of different FPS videos doesn't work.
  • Some combination of different resolution videos doesn't work
  • The number of input videos should less than 8.

 

I will confirm this, but I think this should be expected. The sample_multi_transcode is a test tool to validate the SDK, it doesn't check all use cases.

I used these sample videos to do the test(I guess these are similar as yours), I used the following command to extract the raw input:

>ffmpeg -i <input.mp4> -vcodec copy -an -bsf h264_mp4toannexb <output.h264>

 

The following par file works for me:

-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 0 -vpp_comp_dst_y 0 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -join -o::sink
-i::h264 ./bottle-detection.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 480 -vpp_comp_dst_y 0  -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -join -o::sink
-i::h264 ./car-detection.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 0 -vpp_comp_dst_y 270  -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -join -o::sink
-i::h264 ./bolt-detection.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 480 -vpp_comp_dst_y 270  -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -join -o::sink

-vpp_comp 4 -fps 10 -ext_allocator -ec::nv12 -o::h264 comp_out_1080p_2.h264 -b 8000 -join -i::source

but if I replace "bolt-detection.h264" with "people-detection.h264", the above par file doesn't work.

The following par file also work when I used the same input:

-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 0 -vpp_comp_dst_y 0 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -join -o::sink
-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 480 -vpp_comp_dst_y 0  -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -join -o::sink
-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 960 -vpp_comp_dst_y 0  -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -join -o::sink
-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 1440 -vpp_comp_dst_y 0  -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -join -o::sink

-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 0 -vpp_comp_dst_y 270 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -join -o::sink
-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 480 -vpp_comp_dst_y 270 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -join -o::sink 
-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 960 -vpp_comp_dst_y 270 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -join -o::sink
-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 1440 -vpp_comp_dst_y 270 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -join -o::sink

-vpp_comp 8 -fps 10 -ext_allocator -ec::nv12 -o::h264 comp_out_1080p_2.h264 -b 8000 -join -i::source

and,

-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 0 -vpp_comp_dst_y 0 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -join -o::sink
-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 480 -vpp_comp_dst_y 0  -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -join -o::sink
-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 960 -vpp_comp_dst_y 0  -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -join -o::sink

-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 0 -vpp_comp_dst_y 270  -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -join -o::sink
-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 480 -vpp_comp_dst_y 270 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -join -o::sink
-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 960 -vpp_comp_dst_y 270 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -join -o::sink 
-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 0 -vpp_comp_dst_y 540 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -join -o::sink
-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 480 -vpp_comp_dst_y 540 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -join -o::sink

-vpp_comp 8 -fps 10 -ext_allocator -ec::nv12 -o::h264 comp_out_1080p_2.h264 -b 8000 -join -i::source

But increase the "-vpp_comp" to 9 make it failed.

Mark

 

0 Kudos
Mark_L_Intel1
Moderator
2,919 Views

Hi Mars,


I had confirmed the video composition is limited to 8 per tile, it is defined in following place:

https://github.com/projectceladon/MediaSDK/blob/master/_studio/mfx_lib/vpp/include/mfx_vpp_defs.h#L43


Can you change your original par file to see if it works by limited to 8?


Mark


0 Kudos
dsncml
Beginner
2,819 Views

Hi,

I set the quantity of tiles to 2 and assign tile_id for each channels of composition (to make sure the limit is not exceeded), but it doesn't work.

-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 0 -vpp_comp_dst_y 0 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -vpp_comp_tile_id 0 -join -o::sink
-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 480 -vpp_comp_dst_y 0  -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -vpp_comp_tile_id 0 -join -o::sink
-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 960 -vpp_comp_dst_y 0  -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -vpp_comp_tile_id 0 -join -o::sink
-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 0 -vpp_comp_dst_y 270  -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -vpp_comp_tile_id 0 -join -o::sink
-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 480 -vpp_comp_dst_y 270 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -vpp_comp_tile_id 0 -join -o::sink
-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 960 -vpp_comp_dst_y 270 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -vpp_comp_tile_id 0 -join -o::sink 
-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 0 -vpp_comp_dst_y 540 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -vpp_comp_tile_id 0 -join -o::sink
-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 480 -vpp_comp_dst_y 540 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -vpp_comp_tile_id 0 -join -o::sink

-i::h264 ./classroom.h264 -hw -async 4 -dec_postproc -vpp_comp_dst_x 0 -vpp_comp_dst_y 810 -vpp_comp_dst_w 480 -vpp_comp_dst_h 270 -vpp_comp_tile_id 1 -join -o::sink


-vpp_comp 9 -fps 10 -ext_allocator -ec::nv12 -o::h264 comp_out_1080p_2.h264 -b 8000 -vpp_comp_num_tiles 2 -join -i::source
0 Kudos
Mark_L_Intel1
Moderator
2,761 Views

Hi Mars,


Sorry for the late response, I somehow missed your post.


Did you got the same error message as before?


Check your command, I noticed "-comp 9" in the last line, since the library only allows 8 input streams, this should be 8.


Could you change this and try again? Or try my tar file and see if it be successful.


Mark


0 Kudos
Reply