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

clvc cannot set video window size and position #80

Open
jjdisplay opened this issue Dec 14, 2022 · 14 comments
Open

clvc cannot set video window size and position #80

jjdisplay opened this issue Dec 14, 2022 · 14 comments

Comments

@jjdisplay
Copy link

Hi

I installed the raspberry pi OS 64bit headless and installed vlc using the command

$ sudo apt install vlc -y

After that, I used the vlc to play the Bunny test video

$ cvlc -R --width=500 --height=500 --video-x=100 --video-y=100 --no-fullscreen Big_Buck_Bunny_360_10s_30MB.mp4

The vlc just play the Bunny test mp4 in fullscreen.

Please advice how to set the video window dimension and position?

@jc-kynesim
Copy link

jc-kynesim commented Dec 16, 2022

As it stands drm output is just fullscreen so no way round it currently. I have added position controls to the next version (--drm-vout-window <width>x<height>+<x>+<y> - similar to the old mmal positioning option), however that will just get you the video in that position on a black screen - drm claims all the output and that isn't easy to change. I suspect that isn't what you were hoping for.

@jamesee
Copy link

jamesee commented Dec 22, 2022

Can we compile OMXPlayer on the PiOS 64-bit?

@cooperbang
Copy link

Why should drm claim all output?

The Direct Rendering Manager was created to allow multiple programs to use video hardware resources cooperatively.
Programs wishing to use the GPU send requests to DRM, which acts as an arbitrator and takes care to avoid possible conflicts.

@jc-kynesim
Copy link

@cooperbang Sadly you are mistaken. That might possibly have been the intent but that's not how it works these days. Feel free to try to prove me wrong.

@cooperbang
Copy link

If the X Sever already has master control over DRM you need to to use the KMS API to create a new DRM plane and display the content there.

@jc-kynesim
Copy link

If you would care to point me any example code that does what you suggest I'll happily do just that. I may have missed the correct API.

@cooperbang
Copy link

@jc-kynesim
Copy link

Nope - that is kernel internals. I mean a userland example where it gets an appropriate drm device fd from X, picks/allocates a plane and assigns a BO (frame buffer) to it - if you can find one of them then making it play video is easy. Most of the trick is getting the drm fd with the correct permissions set on it. After that everything that I've already written just works. Believe it or not - once I've got a good drm device fd I know how to use it.

@jc-kynesim
Copy link

No DRI3 doesn't appear to give sufficient privs; you can get what amounts to a read only drm handle out of it which allows BO allocation but that on its own is not not good enough - I sort of hoped it would do what I & you want but it didn't seem to. (Yes, I have done a bunch of searching the web in the past.)
If it is as simple as you seem to believe someone must have written a working example that uses it and put it somewhere I can can crib. I want something that I can compile and see working - not powerpoint.

@nightside1
Copy link

Hi jc-kynesim and all,
I've just received a new Raspberry PI5. There is a way to install the old vlc version with mmal-vout plugin (--mmal-vout-window)?
The latest working VLC version is: 3.0.17.4 Vetinari (revision 3.0.13-8-g41878ff4f2)
Can someone help me?
Thanks

@jc-kynesim
Copy link

jc-kynesim commented Nov 19, 2023

I think not - its not so much VLC as the firmware/kernel no longer supporting that. There's no point VLC having the plugins if they can't be used.

I too am frustrated by what used to be easy becoming somewhere between hard and impossible in the name of progress. The new world is a lot more standard and secure than the old world but it comes with a price...

@nightside1
Copy link

nightside1 commented Nov 19, 2023

Thank you jc-kynesim.
As I understand it, for now there is no option to use the new plugin --drm-vout-window <width>x<height>+<x>+<y> to run different instances of VLC in different screen positions, for a quad view or something like that, since DRM claims all the output and this is not easy to change. With -drm-vout-window I'm able to set video window size and position, but just 1 stream is allowed on the screen. For now I'm still stay on rpi4 with VLC 3.0.17.4 Vetinari (revision 3.0.13-8-g41878ff4f2) waiting for a possible solution with a new firmware/kernel and VLC release.

I hope that this will be possible in the future.. Is there any chance?

Thanks

@SvenVD
Copy link

SvenVD commented Mar 24, 2024

Is there any update, or alternatives to achieve the same result.? For https://github.com/SvenVD/rpisurv I need the ability to set coordinates for multiple windows.

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

6 participants