Media (Intel® oneAPI 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

How to use the Media SDK Tracer on Linux ?

Robby_S
New Contributor I
318 Views

Greetings, I have a question on how to use the Media SDK Tracer on Linux. All the documents and Q/A's I found so far seem to be for the Windows version.

My platform is MSS SDK 2015R6 on CentOS 7.1 (kernel-3.10.0-229.1.2.39163.MSSr4.el7.centos.x86_64) . I tried to follow the file /opt/intel/mediasdk/tools/tracer/README, like this:

1) cd /opt/intel/mediasdk/lib64

2) rm libmfxhw64.so

3) ln -s /opt/intel/mediasdk/tools/tracer/libmfx-tracer.so libmfxhw64.so

4) cd /opt/intel/mediasdk/tools/tracer

5) ./mfx-tracer-config core.type file core.log  /myplace/mfxtracer.log

6) cd /myplace

7) make clean; make; 

8) ./my_code

I was expecting to see mfxtracer.log generated in the directory /myplace, but I didn't see it. I repeated the steps above, using the relative path in 3). Still no log file was generated.

What am I missing?

Thanks,

Robby

0 Kudos
1 Solution
Surbhi_M_Intel
Employee
318 Views

Hi Robby, 

So I am able to successfully generate the tracer file with existing tracer. I did the experiment on a Broadwell system and same mechanism will work on the rest of supported hardware as well. I am following the readme present in tracer tool with small changes according to the latest version and here is the step by step procedure - 

Step1

cd /opt/intel/mediasdk/lib64/
rm libmfxhw64.so
mv libmfxhw64-p.so.1.16 libmfxhw64-p-REAL.so.1.16

Step 2-  
export LD_LIBRARY_PATH=/opt/intel/mediasdk/tools/tracer:$LD_LIBRARY_PATH

Step3
cd /opt/intel/mediasdk/tools/tracer/
ln -s libmfx-tracer.so libmfxhw64.so

Step4 – 
/opt/intel/mediasdk/tools/tracer/mfx-tracer-config --default            
/opt/intel/mediasdk/tools/tracer/mfx-tracer-config core.type file

/opt/intel/mediasdk/tools/tracer/mfx-tracer-config core.log ~/mfxtracer.log
/opt/intel/mediasdk/tools/tracer/mfx-tracer-config core.lib /opt/intel/mediasdk/lib64/libmfxhw64-p-REAL.so.1.16

Step5 - 
Run the sample application and you will see the output in the folder with above steps.
./sample_decode_drm h264 -i content/test_stream.264 -o out

Hope this will help you! If not then please let me know your exact configuration, I can try on that and we can check if the libraries are present and linkers are set properly on your system. 

Thanks,
Surbhi

 

 

 

View solution in original post

0 Kudos
5 Replies
Robby_S
New Contributor I
318 Views

Hi, could someone help me with this question? Without the tracer, I have to put a lot of msdk_printf() in my code to debug, which is messy, insufficient, and (I believe) not thread-safe. Thanks!

-Robby

0 Kudos
Surbhi_M_Intel
Employee
318 Views

Hi Robby, 

Similar issue got reported by another customer as well and we have a CQ open for it. 
We don't have workaround for this right, will get back to you as soon as I have some information. 
For us to to debug- Are you seeing this for particular application because issue got reported only when doing multiple transcode and work in all another scenario. 

Thanks,
Surbhi 


 

0 Kudos
Robby_S
New Contributor I
318 Views

Hi Surbhi, thanks for telling me that someone else also reported the problem with the tracer. However, in my case, it does not work at all. I tried running the sample_decode as well as my own code. None generated the tracer log file. Do I need to build the code with some specific options?

-Robby

0 Kudos
Surbhi_M_Intel
Employee
319 Views

Hi Robby, 

So I am able to successfully generate the tracer file with existing tracer. I did the experiment on a Broadwell system and same mechanism will work on the rest of supported hardware as well. I am following the readme present in tracer tool with small changes according to the latest version and here is the step by step procedure - 

Step1

cd /opt/intel/mediasdk/lib64/
rm libmfxhw64.so
mv libmfxhw64-p.so.1.16 libmfxhw64-p-REAL.so.1.16

Step 2-  
export LD_LIBRARY_PATH=/opt/intel/mediasdk/tools/tracer:$LD_LIBRARY_PATH

Step3
cd /opt/intel/mediasdk/tools/tracer/
ln -s libmfx-tracer.so libmfxhw64.so

Step4 – 
/opt/intel/mediasdk/tools/tracer/mfx-tracer-config --default            
/opt/intel/mediasdk/tools/tracer/mfx-tracer-config core.type file

/opt/intel/mediasdk/tools/tracer/mfx-tracer-config core.log ~/mfxtracer.log
/opt/intel/mediasdk/tools/tracer/mfx-tracer-config core.lib /opt/intel/mediasdk/lib64/libmfxhw64-p-REAL.so.1.16

Step5 - 
Run the sample application and you will see the output in the folder with above steps.
./sample_decode_drm h264 -i content/test_stream.264 -o out

Hope this will help you! If not then please let me know your exact configuration, I can try on that and we can check if the libraries are present and linkers are set properly on your system. 

Thanks,
Surbhi

 

 

 

0 Kudos
Robby_S
New Contributor I
318 Views

Hi Surbhi, thanks for the feedback. Comparing your steps with mine, I can see that I did not set the environment variable LD_LIBRARY_PATH. That should be the cause.

I'll test with your steps, and if they work, I'll update here.

[ I probably sub-consciously neglected LD_LIBRARY_PATH as I've heard some negative comments about it. Guess I might have just proven those points. ;-)  ]

Update:

Following the steps you listed, I was able to generate the tracer log file. Thanks!

0 Kudos
Reply