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.

Hello_encode oneVPL project

Zanaboni__Gabriele
7,132 Views

Hi

I am doing some tests with the project Hello_encode of oneAPI (release beta 08).

The project (visual studio 2017 c++ )work fine with HEVC codec, for my use I would like to encode the same input file to h264, so I changed this line of code

mfxU32 codecID = MFX_CODEC_HEVC;

to

mfxU32 codecID = MFX_CODEC_AVC;

Run the program it exit with error.

What is the problem, I have other thing to fix in a code?

thanks

regards

0 Kudos
29 Replies
JesusE_Intel
Moderator
5,667 Views

Hi Zanaboni__Gabriele,

 

Thank you for contacting Intel Customer Support. What error are you seeing when changing the codecID?

 

Update:

I believe the error you are seeing is due to AVC not being implemented. Per the Intel® oneAPI Base Toolkit Release Notes (Beta Update 8):

"CPU plugin implementation with H.265 & AV1 SW Decode/Encode"

 

Regards,

Jesus

 

0 Kudos
Zanaboni__Gabriele
5,654 Views

Hi Jesus

So you are saying that we lose the compatibility with the previous version of oneAPI?

Because from release notes, since beta 04, I read:

Intel® oneAPI Video Processing Library

  • Basic Encode (AVC, HEVC) for GEN9
  • Transcode (AVC, HEVC)
  • Enhanced VPL Memory; Improved extension design and Decode (AVC, HEVC)

Regards

Gabriele

0 Kudos
JesusE_Intel
Moderator
5,639 Views

Hi Gabriele,


Thanks for pointing that out, since AVC was introduced at an earlier release it should also be included. Let me check with my peers to see if this is a bug.


Regards,

Jesus


0 Kudos
Mark_L_Intel1
Moderator
5,615 Views

Hi Zanaboni__Gabriele,


The issue you saw is expected in Beta08. We have added AVC encode support in Beta09 which will be released soon, please check our new release.


oneVPL is under development, so there are and will be changes until the official release at the end of the year. I am sorry for any inconvenience and please let me know your feedback.


Beta09 will be a CPU only release, because of the license restriction, there will be extra steps to enable AVC encoder except the source code change. Please read our get started guide and sample document after the release.


Mark


0 Kudos
Zanaboni__Gabriele
5,580 Views

Hi Mark_L_intel1

Sorry sir, what you means when you say,

...there will be extra steps to enable AVC encoder...

there is something to pay (or get a licence in some way) for encode AVC in software?

Regards

Gabriele

0 Kudos
Mark_L_Intel1
Moderator
5,571 Views

Hi Zanaboni__Gabriele,


Sorry for the late response since I want to wait for Beta09 release to explain easily. So here is our new release at GitHub:

https://github.com/oneapi-src/oneVPL

If you go to the build section under "optionally enable h264 encoder":

https://github.com/oneapi-src/oneVPL#optionally-enable-h264-encode


You can see the license I meant is the GPL license, for AVC encoder, the software library we used has a license limitation.


But you can try with Beta09 release with AVC encoder now.


Mark


0 Kudos
Zanaboni__Gabriele
5,556 Views

Hi Mark_L_intel1

I installed the Intel oneAPI beta09, then as you suggested I downloaded the code from Git-Hub and run
from console the bootstrap gpl command.
Almost at the end of the batch, soon after cloning into 'ffmpeg', unfortunately the batch had some problems, and stopped the execution, It seems like it freeze without exit. Probably it has problems when  does the Git config, anyway I can't complete the install.
Do you have some hints to complete the batch bootstrap and continue with build?

Thanks

Regards

Gabriele

0 Kudos
Mark_L_Intel1
Moderator
5,536 Views

Hi Zanaboni__Gabriele,


Apology for my mistake and thanks so much to support our product.


The process you tried is from our open source site, not the official landing page for release.


I believe your goal is to try our sample code, the easy way to start to install the release package.


Here is our landing page:

https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onevpl.html


oneVPL belongs to our Base Toolkit of our oneAPI product, so it is one component among the list of the installer. You can download the installer and following the Get Started Guide to run the sample.


Let me know if you have any issues.


Mark




0 Kudos
Zanaboni__Gabriele
5,531 Views

Hi Sir,

As I said in the post before, I already installed the oneAPI Beta09, and as a firsth attempt
I created the Hello_encode project with the wizard present in visual studio, the program works fine, encoding an input file I420 to HEVC. Well, then I would like to use the same project to encode in h264. To do so I thought was enough change one line of code (see Image), no true. The program quit during initialization.

What should I do to encode in h264?

Regards

Gabriele

0 Kudos
Mark_L_Intel1
Moderator
5,523 Views

Hi Zanaboni__Gabriele,


Sorry my mistake, this is the new release so I didn't go through the build process yet. It looks like your first try has the right direction.


I did try READM.md at https://github.com/oneapi-src/oneVPL and here is the steps you can try, it works for me:

  1. Clone the source code
  2. Following "BUILD.md" to setup the environment.
  3. "source ./script/bootstrap gpl" to build the library and dependency, it will create a directory _extBuild.
  4. "build gpl" to build the oneVPL and sample code.
  5. Run hello_encode according to README.md
  6. Change the hello_encode.cpp so it output AVC.
  7. Re-run "build gpl"
  8. Run hello_encode again, this time, it should output AVC output


Let me know if you have any questions.


Mark


0 Kudos
Mark_L_Intel1
Moderator
5,291 Views

Hi Zanaboni__Gabriele,


Did my solution work for you?


There are several releases published since my last post, you are welcome to try our 2021.1 Gold release, this is the first official release, let me know if you can build hello_encode with H.264 by using our document.


Mark


0 Kudos
Zanaboni__Gabriele
5,282 Views

Hi mark,

Did my solution work for you?   I am sorry, no

I am been trying to develop the library on Git-Hub in different attempts without any success.

First of all the solution you suggest is not documented, at least not here https://github.com/oneapi-src/oneVPL, but we may find the same procedure explained here  oneVPL-cpu,  as a new CPU reference implementation, with a different repository to download. Is the procedure the same and valid for both?...I don't know. Anyway I tried to build the library on both side.

On https://github.com/oneapi-src/oneVPL I followed the steps suggested:

  1. Clone the source code                                                              OK
  2. Following "BUILD.md" to setup the environment.             There is no BUILD.md
  3. "source ./script/bootstrap gpl" to build the library and dependency, it will create a directory _extBuild.                                                                                    It seems did nothing
  4. "build gpl" to build the oneVPL and sample code.            OK, _extBuild and the solutions in there are created without errors
  5. Run hello_encode according to README.md               I run the exe, I got an error (see attached file)
  6. Change the hello_encode.cpp so it output AVC.
  7. Re-run "build gpl"
  8. Run hello_encode again, this time, it should output AVC output

And with an error as above I stopped to investigate.

Anyway keep present that, if I build and run the same project Hello_encode, created from inside visual studio, It works (with h265 as default output, I meant)

On oneVPL-cpu I followed the README.md instructions:

  • I set up the environment as requested, and this went fine.
  • run 'script\bootstrap gpl'           OK, even though ends up with an error installing libx264
  • run 'script\build gpl'                    continuous errors stop the built

In this case I am trying to fix building errors one by one

Regard

Gabriele

 

0 Kudos
Mark_L_Intel1
Moderator
5,269 Views

Hi Zanaboni__Gabriele,

Thanks so much for the detailed report and nice descriptions. I have contact with dev team to address issue.

Dev team wants to solve this issue and let's start. Could you confirm the following info?

  • Are you using the latest release in Windows? How did you installed?
  • What the exact error did you got when you run 'script\bootstrap gpl' and 'script\build gpl'?

 

Mark

 

0 Kudos
Zanaboni__Gabriele
5,248 Views

Hi Mark,

Apologize me, many of the building issues probably comes from my wrong choices, anyway
I would write down the steps done till now and the issues found.

I started a brand new built of oneVPL-cpu

1) get the repo from Git
2) configured the environment throught MSYS2    (OK)
3) run the bootstrap from MinGW64 shell
(as a first attempt I run the bootstrap from a windows console, but I had some problems during build,
probably due to some my missleading setting, I don't know, anyway now I want to use mingw)

   3.1) export VPL_INSTALL_DIR=<vpl-install-location> [Enter] (where for <vpl-install-location> I used the root of oneVPL installation, https://github.com/oneapi-src/oneVPL)
   3.2) script/bootstrap gpl [Enter]
          output on console:
          VPL_BUILD_DEPENDENCIES is not set in the environment and the script is not
          being sourced. Export VPL_BUILD_DEPENDENCIES or call like this:

          source script/bootstrap

   3.3) Set VPL_BUILD_DEPENDENCIES with a full path to the install folder, like -
           export VPL_BUILD_DEPENDENCIES=/C/_TRAINING/oneAPI/oneVPL-cpu/install

   3.4)  script/bootstrap gpl [Enter]     (OK, all went fine)

   3.5) script/build gpl
           script/build: line 31: /C/_TRAINING/oneAPI/oneVPL/env/vars.sh: No such file or directory

           changed the script/build file as: source "$VPL_INSTALL_DIR/env/bash/vars.sh"

    3.6) script/build gpl
           CMake Error at CMakeLists.txt:17 (message):
           Unsupported architecture: only 64-bit supported

Here we are....any hint?

regards

Gabriele

0 Kudos
Mark_L_Intel1
Moderator
5,253 Views

Hi Zanaboni__Gabriele,


Thanks for the detailed report, I have transfer the info to dev team and will keep you updated.


Can you also share the Windows 10 version and the processor ID?


Mark


0 Kudos
Zanaboni__Gabriele
5,224 Views

Hi Mark

In attach all the info needs.

Regards

Gabriele

0 Kudos
Mark_L_Intel1
Moderator
5,148 Views

Hi Zanaboni__Gabriele,


Sorry for delayed response, thanks for the system info.


We have reviewed your report, and we realize you might have a wrong assumption with the environment. You seem mix Windows and Linux build steps.

The instructions assume that all steps are run from the DOS cmd prompt only.  Unfortunately use of the msys64 prompt is not supported. 


I have had some success working from the msys64 prompt and typing 'cmd' before running the steps from our readmes.  However, the best path is probably to open a new DOS cmd prompt and 

  1. follow the build steps for oneVPL
  2. follow the build steps for oneVPL-cpu


Your work is valuable to us, we recognize that build fragility is an issue and are working to improve the process (and documentation) in the next release.


Mark


0 Kudos
Zanaboni__Gabriele
5,122 Views

Hi Mark

thanks for the reply

In your post you wrote:

The instructions assume that all steps are run from the DOS cmd prompt only. Unfortunately use of the msys64 prompt is not supported.

The use of MSYS2 is a requirement for setting up the environment, as indicated in the instructions on the web-page:

NOTE While the msys2 shell is used in initial setup, it is not otherwise supported as a build or run environment.

and this is what I did, point 2 of my previous post. So I had two ways (or what I thought) to proceed -

1) open a new MinGw console and follow the instructions to build the library, this is what I did in a previous post. It is not valid?

2) open a new DOS console and follow the instructions to create the library. And this is what I have done currently

from dos prompt

* script\bootstrap.bat gpl                                (OK, It works fine)
* script\build.bat gpl

first error:
""C:\_TRAINING\oneAPI\oneVPL\env\vars.bat"" not recognized as internal or external command, an exe program or a file batch.

to fix it I changed the batch (script/build) at line 32 as:
call "%VPL_INSTALL_DIR%\env\cmd\vars.bat" || exit /b 1

then I run it again
* script\build.bat gpl

but the script end up with an error (see attached image)

regards

0 Kudos
Mark_L_Intel1
Moderator
5,111 Views

Hi Gabriele,


Thanks for the great help and quick response, I have posted your feedback to dev team.


Yes, even they have the notes in the web-page, it seems still confused user.


build.bat seems still have an issue.


I will keep you updated.


Mark


0 Kudos
Mark_L_Intel1
Moderator
4,853 Views

Hi Gabriele,


Sorry for the delay, I just got dev team's review of this issue. It seems have the problem with the installation process which might cause the product registration problem.


I will keep working with them closely to solve your problem. As a start point, can you tell me?

  • In your latest trial, Could you check CMAKE_PREFIX_PATH after running script\build.bat gpl?
  • How did you install the release when you had the issue in your latest try?
  • Which release did you used?


Mark


0 Kudos
Reply