Author Topic: Playing a video-file  (Read 3028 times)

0 Members and 1 Guest are viewing this topic.

Offline catclaw

  • Newbie
  • Posts: 10
    • View Profile
Playing a video-file
« on: October 07, 2019, 11:21:30 pm »
Hey guys!

I was wondering - is there any way to play any kind of video-files in QB64?
I've tried searching, but can't find anything.
I was thinking, like a function that allows you to play a video-file inside a program, and place/re-size it somewhere on the screen?
If QB64 can access windows DLL-files, then it should be possible to use the built-in functions - I don't know, I never messed with DLL/SO-files, but as instructed in the help and tutorial section.
What I really need, is to show a stream of video from a drone... But that's an another story...

I'd be really thankful for any kind of help.

Offline euklides

  • Forum Regular
  • Posts: 128
    • View Profile
Re: Playing a video-file
« Reply #1 on: October 08, 2019, 10:15:35 am »
Why not yes ?

Offline catclaw

  • Newbie
  • Posts: 10
    • View Profile
Re: Playing a video-file
« Reply #2 on: October 09, 2019, 10:39:07 pm »
Perhaps looking this ?   https://www.qb64.org/forum/index.php?topic=608.0

Awesome!!!
Exactly what I'm looking for.
Thanks a lot my friend!
It plays all the supported video and audio files.
I'm going to play around a bit and see if it's usable for the task.

However, I'm trying to figure out how to enable controls, like rewind, fast forward, etc.
I found this page: https://social.msdn.microsoft.com/Forums/vstudio/en-US/81ceb34f-529e-4ce1-8af9-c66d2f553386/playing-video-with-winmmdll?forum=vbgeneral
Turns out that winmm.dll only supports a limited formats of videos and audios. (MOV is not among them.)

The DLL-file is full of functions - but I don't understand how to use them?
See: https://www.win7dll.info/winmm_dll.html

Thankful for any kind of help.

Offline _vince

  • Seasoned Forum Regular
  • Posts: 422
    • View Profile
Re: Playing a video-file
« Reply #3 on: October 11, 2019, 09:24:47 am »
If QB64 can access windows DLL-files, then it should be possible to use the built-in functions - I don't know, I never messed with DLL/SO-files, but as instructed in the help and tutorial section.
What I really need, is to show a stream of video from a drone... But that's an another story...

Definitely possible with DECLARE LIBRARY and some kind of video decoding library like libffmpeg but it would be a fair bit of work in getting it all working in QB64.  Is anyone going to bother?

Offline catclaw

  • Newbie
  • Posts: 10
    • View Profile
Re: Playing a video-file
« Reply #4 on: October 12, 2019, 04:17:47 pm »
I hope so?
Why would we have a forum otherwise?

Anyway - thing is, this code works fine for me IF:

I can get the parameters for different variables, like:
a% = mciSendStringA%("open " + filename$ + " style popup", ReturnString$, LEN(ReturnString$), 0)
Instead of a "style popup", what other options are there?
How do I use them?
And one important thing - how do I analyze a frame in QB64, like say in c%= POINT (x,y)

Thankful for any answer. ;)