intel-iot-devkit / concurrent-video-analytic-pipeline-optimization-sample-l

Create a concurrent video analysis pipeline featuring multistream face and human pose detection, vehicle attribute detection, and the ability to encode multiple videos to local storage in a single stream.
https://software.intel.com/content/www/us/en/develop/topics/iot/reference-implementations/concurrent-video-analytic-pipeline-optimization.html
Other
51 stars 14 forks source link

Error when running n1_1080p_1080_dp.par #4

Closed vincent911001 closed 4 years ago

vincent911001 commented 4 years ago

Hi, can i know what is causing the error?

vincent@vincent-NUC8i7BEH:~/vincent/ad_hoc/cva_sample$ ./bin/video_e2e_sample -par par_file/n4_1080p_1080p_dp.par
Found 1 par file in command line
Multi Transcoding Sample Version 19.4.0

Par file is: par_file/n4_1080p_1080p_dp.par

Inference: Human Pose Estimation. Model directory ./model
Inference: Human Pose Estimation. Model directory ./model
Inference: Human Pose Estimation. Model directory ./model
Inference: Human Pose Estimation. Model directory ./model
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.
libva info: VA-API version 1.6.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_6
libva info: va_openDriver() returns 0
drmrender:connector number 3, required type 10
drmrender: trying connection: DisplayPort connector_id 86
drmrender: selected crtc already attached to connector
drmrender: succeeded...
drmrender: error: failed to get drm mastership during 3 seconds - aborting
drmrender: connected via DisplayPort to 1920x1080@60 capable display
Session 0:
sink n to 1
MFX HARDWARE Session 0 API ver 1.31 parameters:
Input  video: AVC
Output video: To child session

Session 1:
sink n to 1
MFX HARDWARE Session 1 API ver 1.31 parameters:
Input  video: AVC
Output video: To child session

Session 2:
sink n to 1
MFX HARDWARE Session 2 API ver 1.31 parameters:
Input  video: AVC
Output video: To child session

Session 3:
sink n to 1
MFX HARDWARE Session 3 API ver 1.31 parameters:
Input  video: AVC
Output video: To child session

Session 4:
source n to 1
Vpp enabled
Pipeline surfaces number (EncPool): 2
MFX HARDWARE Session 4 API ver 1.31 parameters:
Input  video: From parent session
Output video: To child session

Pipeline surfaces number (DecPool): 11
Session 0 was joined with other sessions
Pipeline surfaces number (DecPool): 11
Session 1 was joined with other sessions
Pipeline surfaces number (DecPool): 11
Session 2 was joined with other sessions
Pipeline surfaces number (DecPool): 11
Session 3 was joined with other sessions
Session 4 was joined with other sessions

Transcoding started
....drmrender: error: failed to get drm mastership during 3 seconds - aborting

Return on error: error code -1, /home/vincent/vincent/ad_hoc/cva_sample/MediaSDK/samples/video_e2e_sample/src/pipeline_transcode.cpp    1336

[ERROR], sts=MFX_ERR_UNKNOWN(-1), Run, CTranscodingPipeline::Run::Encode() [0x55db4f1e0e90] failed at /home/vincent/vincent/ad_hoc/cva_sample/MediaSDK/samples/video_e2e_sample/src/pipeline_transcode.cpp:4541

 session 4 [0x55db4f1e0e90] failed with status MFX_ERR_UNKNOWN shutting down the application...

session [0x55db4f1a9440] m_bForceStop is set
session [0x55db4f1c4460] m_bForceStop is set
session [0x55db4f1d8910] m_bForceStop is set
session [0x55db4f1da270] m_bForceStop is set
session [0x55db4f1e0e90] m_bForceStop is set
WARNING: m_bForceStop is set, returning NULL ptr from GetFreeSurface
WARNING: m_bForceStop is set, returning NULL ptr from GetFreeSurface
WARNING: m_bForceStop is set, returning NULL ptr from GetFreeSurface
WARNING: m_bForceStop is set, returning NULL ptr from GetFreeSurface

Transcoding finished

Common transcoding time is 32.0362 sec
-------------------------------------------------------------------------------
*** session 0 [0x55db4f1a9440] PASSED (MFX_ERR_NONE) 32.0357 sec, 6 frames, 0.187 fps
-i::h264 /home/vincent/vincent/ad_hoc/cva_data/head-pose-face-detection-male.h264 -join -hw -async 4 -dec_postproc -o::sink -vpp_comp_dst_x 0 -vpp_comp_dst_y 0 -vpp_comp_dst_w 960 -vpp_comp_dst_h 540 -ext_allocator -infer::hp ./model

*** session 1 [0x55db4f1c4460] PASSED (MFX_ERR_NONE) 32.0357 sec, 6 frames, 0.187 fps
-i::h264 /home/vincent/vincent/ad_hoc/cva_data/head-pose-face-detection-male.h264 -join -hw -async 4 -dec_postproc -o::sink -vpp_comp_dst_x 960 -vpp_comp_dst_y 0 -vpp_comp_dst_w 960 -vpp_comp_dst_h 540 -ext_allocator -infer::hp ./model

*** session 2 [0x55db4f1d8910] PASSED (MFX_ERR_NONE) 32.0357 sec, 6 frames, 0.187 fps
-i::h264 /home/vincent/vincent/ad_hoc/cva_data/head-pose-face-detection-male.h264 -join -hw -async 4 -dec_postproc -o::sink -vpp_comp_dst_x 0 -vpp_comp_dst_y 540 -vpp_comp_dst_w 960 -vpp_comp_dst_h 540 -ext_allocator -infer::hp ./model

*** session 3 [0x55db4f1da270] PASSED (MFX_ERR_NONE) 32.0357 sec, 6 frames, 0.187 fps
-i::h264 /home/vincent/vincent/ad_hoc/cva_data/head-pose-face-detection-male.h264 -join -hw -async 4 -dec_postproc -o::sink -vpp_comp_dst_x 960 -vpp_comp_dst_y 540 -vpp_comp_dst_w 960 -vpp_comp_dst_h 540 -ext_allocator -infer::hp ./model

*** session 4 [0x55db4f1e0e90] FAILED (MFX_ERR_UNKNOWN) 32.0343 sec, 0 frames, 0.000 fps
-vpp_comp_only 4 -w 1920 -h 1080 -async 4 -threads 2 -join -hw -i::source -ext_allocator -ec::rgb4 -rdrm-DisplayPort

-------------------------------------------------------------------------------

The test FAILED

[ERROR], sts=MFX_ERR_UNKNOWN(-1), start_video_e2e_thread, transcode.ProcessResult failed at /home/vincent/vincent/ad_hoc/cva_sample/MediaSDK/samples/video_e2e_sample/src/sample_multi_transcode.cpp:1274
drmrender: error: failed to get drm mastership during 3 seconds - aborting
drmrender: warning: failure to restore original mode may lead to application segfault!
drmrender: error: failed to get drm mastership during 3 seconds - aborting
drmrender: warning: failure to restore original mode may lead to application segfault!

It seems to me that it is failing at the composition stage, am I right?

yangli0353 commented 4 years ago

you need:

  1. enter text mode with "init 3"
  2. run the sample with root access to get the DRM master permission
KalaipriyaRajesh commented 3 years ago

Iam also facing same issue : with Sample_decode code: root@Rental32-LaptopU:/home/mamatha/msdk/build/bin/release# ./sample_decode h264 -i ./input_file.h264 -hw -vaapi -calc_latency -async 2 -rgb4 -rdrm libva info: VA-API version 1.13.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so libva info: Found init function vaDriverInit_1_7 libva info: va_openDriver() returns 0 drmrender: trying connection: eDP drmrender: selected crtc already attached to connector drmrender: succeeded... drmrender: connected via eDP to 1920x1080@60 capable display pretending that aspect ratio is 1:1 Decoding Sample Version 8.4.27.0

Input video AVC Output format RGB4 (using vpp) Input: Resolution 1280x720 Crop X,Y,W,H 0,0,1280,720 Output: Resolution 1280x720 Frame rate 10.00 Memory type vaapi MediaSDK impl hw MediaSDK version 1.32

Decoding started drmrender: error: failed to get drm mastership during 3 seconds - aborting DeliverOutput return error = -1 Frame 1, latency=33.93300 ms fread_fps: 3115.265, fwrite_fps: 0.200 Frame 2, latency=35.79100 ms

Latency summary:

AVG=34.86200 ms, MAX=35.79100 ms, MIN=33.93300 ms Decoding finished drmrender: error: failed to get drm mastership during 3 seconds - aborting drmrender: warning: failure to restore original mode may lead to application segfault! drmrender: error: failed to get drm mastership during 3 seconds - aborting drmrender: warning: failure to restore original mode may lead to application segfault!

After root access also it is same and what does "enter text mode with "init 3"" mean?

KalaipriyaRajesh commented 3 years ago

Trying in Linux 5th generation

OrkhanHI commented 3 years ago

Everybody is getting this issue, any solution???