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.

Sample code for specific frame rate

Steven_S_
Beginner
647 Views

Hi,

 I found the sample codes in Media SDK always complete encode or decode with the highest frame rate (full performance of GPU). I want to specify the frame rate as I need for encode/decode. Is there a sample code can run on a specific frame rate or is there a command can achieve this feature?

Thanks,

Xiaole

0 Kudos
4 Replies
Jeffrey_M_Intel1
Employee
647 Views

Media SDK allows  you to set a playback frame rate, but as you noted this is much different than limiting encode output to a specific rate for live streaming.

This is left to the application.  Basically it just needs to watch for the elapsed time between synchronizations after encode at the end of the pipeline.  This will give the amount of time the encode actually took, which is usually far less than the 1/24th or 1/30th of a second interval needed by the reciever.  One approach could be to have multiple transcode threads where each one sleeps for the rest of the timeslice. 

For example, to maintain 30 frames per second  each new frame should be delivered in 33 milliseconds.  If after encode 32.5 milliseconds are left the thread can sleep for this amount of time before sending the output of the next encode.

 

 

0 Kudos
Steven_S_
Beginner
647 Views

Hi Jeffrey,

Thank you for your feedback. So the frame rate question is answered. But currently we found we couldn't use the HEVC encoder, I attached a picture for the command we used, please check. We case this issue may relate to DLL setting, do you agree? But we aren't sure how to correct the setting, would please provide you suggestions? Thanks a lot.

Best Regards,

Xiaole

 

0 Kudos
Jeffrey_M_Intel1
Employee
647 Views

I can't see all of the command line options in your screenshot, but I was able to reproduce the -9 error by including the -hw parameter.

This is how I ran successfully:

1. Install the  Intel® Media SDK HEVC Software Pack for Windows downloaded from the media solutions portal

2. Copied C:\Program Files\Intel\Media SDK 2014 HEVC Software Pack Evaluation to my desktop

3. cd to samples/sample_encode/x64

4. sample_encode.exe h265 -hevc_encoder_plugin 1 -i c:/Videos/test.yuv -o testout.265 -w 352 -h 288

 

Regards, Jeff

0 Kudos
Steven_S_
Beginner
647 Views

Hi Jeffrey,

Thanks a lot, this case is solved. 

Best Regards,

Xiaole

0 Kudos
Reply