Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] AMD AMF #98

Open
Saentist opened this issue Jul 31, 2021 · 5 comments
Open

[Feature] AMD AMF #98

Saentist opened this issue Jul 31, 2021 · 5 comments

Comments

@Saentist
Copy link

Saentist commented Jul 31, 2021

Can be added also AMD Advanced Media Framework (AMF)
AMD gpu's also can do some job
https://github.com/GPUOpen-LibrariesAndSDKs/AMF

@cdgriffith
Copy link
Contributor

Took me a bit to figure out how to do this, so putting here to hopefully make it easier. This was added in FFmpeg/FFmpeg@f8ad2dd#diff-3adfff78d6c720bbaa2e75bd85524380 and has the basic instructions as well.

To enable support you must obtain the AMF framework header files(version 1.4.9+) from
@url{https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git}.

Create an @code{AMF/} directory in the system include path.
Copy the contents of @code{AMF/amf/public/include/} into that directory.
Then configure FFmpeg with @code{--enable-amf}.

So in this case, need to add the two folders (and content) components and core from https://github.com/GPUOpen-LibrariesAndSDKs/AMF/tree/master/amf/public/include into workspace/AMF

Then add --enable-amf to the FFmpeg build

@Saentist
Copy link
Author

If can be added as branch for test will be good.

@cdgriffith
Copy link
Contributor

cdgriffith commented Sep 6, 2021

This script currently doesn't support zip files, so would require some additions / testing to the download function, such as:

  make_dir "$DOWNLOAD_PATH/$TARGETDIR"

  if [[ $DOWNLOAD_FILE == *.zip ]]; then 
    if ! unzip "$DOWNLOAD_PATH/$DOWNLOAD_FILE" -d "$DOWNLOAD_PATH/$TARGETDIR" 2>/dev/null >/dev/null; then
        echo "Failed to extract $DOWNLOAD_FILE";
        exit 1;
    fi
  else 
    if [ -n "$3" ]; then
    ...
  fi

Then would need some way to detect if the system has a supported AMD card, and if so then add a section like:

if build "amf"; then
  download "https://github.com/GPUOpen-LibrariesAndSDKs/AMF/releases/download/v.1.4.21/AMF_SDK_1.4.21.0-2021-07-20.zip"
      execute rm -rf ${WORKSPACE}/include/AMF
      execute mkdir -p ${WORKSPACE}/include/AMF
      execute cp -r ${PACKAGES}/AMF_SDK_1.4.21.0-2021-07-20/AMF_SDK_1.4.21.0/amf/public/include/* ${WORKSPACE}/include/AMF/build_done "amf"
fi 
CONFIGURE_OPTIONS+=("--enable-amf")
@Milor123
Copy link

Milor123 commented Sep 8, 2023

Took me a bit to figure out how to do this, so putting here to hopefully make it easier. This was added in FFmpeg/FFmpeg@f8ad2dd#diff-3adfff78d6c720bbaa2e75bd85524380 and has the basic instructions as well.

To enable support you must obtain the AMF framework header files(version 1.4.9+) from
@url{https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git}.

Create an @code{AMF/} directory in the system include path.
Copy the contents of @code{AMF/amf/public/include/} into that directory.
Then configure FFmpeg with @code{--enable-amf}.

So in this case, need to add the two folders (and content) components and core from https://github.com/GPUOpen-LibrariesAndSDKs/AMF/tree/master/amf/public/include into workspace/AMF

Then add --enable-amf to the FFmpeg build

Could you please explain where is my workspace folder in ubuntu?

could be it /home/noe/ffmpeg_sources? or which?

@cdgriffith
Copy link
Contributor

@Milor123 after you run the ./build-ffmpeg --build script once it will create a workspace folder, that is where it needs to go, those updates applied and then re-run (have not worked with this in two years so knowledge is rusty on it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants