Page 1 of 1

Using C++, creating VLC externally as a process, setting the window width and height? [SOLVED]

Posted: 29 Jun 2015 20:40
by markhansaven
Hello there,

The reason I'm writing this program, is purely for both fun and experimentation.

I've been using Visual C++ 2010 to try to create an instance of a VLC Media Player process playing a video. I've used CreateProcess() to create the process, and used the command line to initialize the player. Now, when trying to resize the window via GetWindowPos() I've been having a lot of trouble. I've read up on this, and found that VLC Media Player constantly resizes it's window or something, and even worse that there is currently a bug that makes it so that you cannot resize via running --autoscale --width --height through the command line.

Isn't there a way, using C++, I can just override all of this and resize the programs window anyway? Any help pointing me in the right direction is much appreciated. I'm not really sure that I would want to get into the complexities of using the libVLC library directly, I'm only testing out running the program.

____________________________________________________________________________________________

EDIT: I won't even post again, sorry for making this thread. For any programmer that looks this question up online or for future reference:

If you run the command line --fullscreen --aspect-ratio 4:3. You can then resize the window to whatever size you'd like programatically with SetWindowPos() and passing in the xsize and ysize properties. This will also take away the gui completely and paste your movie to the screen without window borders (so that takes care of two birds with one stone in a sense). I think you may have to also put --autoscale in the command line and possibly --no-embedded-video.

Thank you very much and sorry for bothering you guys. :o

____________________________________________________________________________________________

EDIT:Edit AGAIN sorry :geek: : You actually have to punch in the aspect ratio that you'd like like 16:9 or 4:3 etc... Ummm....yeah sorry extremely obvious but yeah.