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

Vaapi not working #92

Closed
5 tasks done
frdbr opened this issue Apr 5, 2021 · 9 comments
Closed
5 tasks done

Vaapi not working #92

frdbr opened this issue Apr 5, 2021 · 9 comments

Comments

@frdbr
Copy link
Contributor

frdbr commented Apr 5, 2021

For VAAPI to work we must include:

Also ffmpeg must be built with the following flags:

--extra-cflags="-I/usr/local/include" \
--extra-ldflags="-L/usr/local/lib" \
--enable-libmfx
--enable-vaapi

@Erick555
Copy link

Erick555 commented Apr 11, 2021

See #111 (comment)

--extra-cflags="-I/usr/local/include"
--extra-ldflags="-L/usr/local/lib" \

There is no /usr/local path in flatpak so this doesn't make any sense.

--enable-vaapi

it's already there.

@frdbr
Copy link
Contributor Author

frdbr commented Apr 11, 2021

See #111 (comment)

--extra-cflags="-I/usr/local/include"
--extra-ldflags="-L/usr/local/lib" \

There is no /usr/local path in flatpak so this doesn't make any sense.

How can I point to the libs then? Where are they located at?

--enable-vaapi

it's already there.

Yes, we only need libmfx now.

@Erick555
Copy link

How can I point to the libs then? Where are they located at?

Libs are in /app/lib and /usr/lib but they should be detected automatically, why do you think you need setting them?

@frdbr
Copy link
Contributor Author

frdbr commented Apr 11, 2021

How can I point to the libs then? Where are they located at?

Libs are in /app/lib and /usr/lib but they should be detected automatically, why do you think you need setting them?

This is how ffmpeg works it seems, one needs to explicitly pass this instructions at config stage. It is also the case for nvidia:

--extra-cflags=-I/usr/local/cuda/include 
--extra-ldflags=-L/usr/local/cuda/lib64

@frdbr
Copy link
Contributor Author

frdbr commented Apr 11, 2021

@Erick555 should I send a mr for intel-media-sdk or shall I open a request at freedesktop to include it?

@Erick555
Copy link

Erick555 commented Apr 11, 2021

This is how ffmpeg works it seems, one needs to explicitly pass this instructions at config stage. It is also the case for nvidia:

Do you have any example of something isn't working without this currently? There are couple of ffmpeg deps build here and there are no extra-cflags set so either ffmpeg is broken right now or you don't need to set those options.

I didn't saw any other app that build ffmpeg setting such options.

@frdbr
Copy link
Contributor Author

frdbr commented Apr 11, 2021

This is how ffmpeg works it seems, one needs to explicitly pass this instructions at config stage. It is also the case for nvidia:

Do you have any example of something isn't working without this currently? There are couple of ffmpeg deps build here and there are no extra-cflags set so either ffmpeg is broken right now or you don't need to set those options.

I didn't saw any other app that build ffmpeg setting such options.

I will add these changes to Kdenlive's flatpak nightly and ask some testing from the community to see if it works without the extra-cflags. But afaik this is the recommended way of doing in the ffmpeg docs and nvidia docs (as well as many posts on stackoverflow.)

@Erick555
Copy link

It may be recommended when something doesn't work. You didn't specified what doesn't work right now and you want to provide solution without stating what the problem is.

You don't need people to test this as it's enough to read the buildlog where you can see if ffmpeg can see external libraries or if it can't. You may also see that flatpak sets LDFLAGS=-L/app/lib, LD_LIBRARY_PATH=/app/lib,and PKG_CONFIG_PATH=/app/lib/pkgconfig:/app/share/pkgconfig automatically so if you not inventing some fancy install prefixes for libraries they should be detected ootb. Only when they aren't you may try hacks from stackoverflow or elsewhere.

@frdbr
Copy link
Contributor Author

frdbr commented Apr 16, 2021

The official documentation for both intel and nvidia recommend adding the extra flags. Will keep testing and if we encounter issues will open a new report.

Closed via #115

@frdbr frdbr closed this as completed Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants