QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: Kernelpanic on December 19, 2020, 08:08:54 pm

Title: Video in QB64
Post by: Kernelpanic on December 19, 2020, 08:08:54 pm
Hello, I tried to call an external program that then plays a video. Calling the program also works, but the video does not work. Is that even possible?

Code: QB64: [Select]
  1. 'Versuch ein EXE-Programm aufzurufen
  2.  
  3. returncode% = SHELL("C:\Programme\VideoLAN\VLC\vlc.exe") '+ "KindMitBall.mp4"
  4. PRINT returncode%
  5.  
  6. '"D:\Lab\QuickBasic64\Grafik\KindMitBall.mp4"
  7.  
  8.  

This is the video, downloaded from Twitter:
https://twitter.com/i/status/1297539372749742082 (https://twitter.com/i/status/1297539372749742082)
Title: Re: Video in QB64
Post by: SpriggsySpriggs on December 19, 2020, 08:32:28 pm
@Kernelpanic

The post title is misleading. This isn't "Video in QB64". This is just you trying to launch VLC. I'd recommend reading the documentation for VLC to make sure you are passing the parameter correctly.
Title: Re: Video in QB64
Post by: Pete on December 19, 2020, 09:00:47 pm
Try...

SHELL _DONTWAIT "START vlc KindMitBall.mp4"

Title: Re: Video in QB64
Post by: Cobalt on December 20, 2020, 02:14:53 am
@Kernelpanic

The post title is misleading. This isn't "Video in QB64". This is just you trying to launch VLC. I'd recommend reading the documentation for VLC to make sure you are passing the parameter correctly.

I agree. Although it has been touched on, by DAV I think, using API calls and custom images storage format(no audio) I think.
I would be nice to actually have standard video formats play within a QB64 program without opening an external window to do so.
Or is that somewhere, I can't remember right off hand, it might be.
Title: Re: Video in QB64
Post by: Dav on December 20, 2020, 09:36:03 am
Yes, I did post a video player using API (in the wiki) but it only seems to work in Windows 7 on some systems, and doesn't play many formats. The custom image+audio format thing I did is here: https://www.qb64.org/forum/index.php?topic=2570.msg118220#msg118220

I put together a DLL once made in purebasic that plays video in a QB64 window, not sure if I ever posted that but I can dig it up if anyones interested. It's kind of buggy though if I recall right.

- Dav
Title: Re: Video in QB64
Post by: Kernelpanic on December 20, 2020, 01:26:55 pm
Try...

SHELL _DONTWAIT "START vlc KindMitBall.mp4"

Thanks! Unfortunately, that doesn't work either. There are 1001 commands for the VLC. . .
But it works from the command line.

Code: [Select]
C:\Programme\Videolan\VLC\vlc.exe "[youtube]https://youtu.be/mAWroivNprc[/youtube]" --directx-volume="0.3"  (without [youtube])


  [ This attachment cannot be displayed inline in 'Print Page' view ]  
Title: Re: Video in QB64
Post by: SpriggsySpriggs on December 20, 2020, 04:29:00 pm
Yes, I did post a video player using API (in the wiki) but it only seems to work in Windows 7 on some systems, and doesn't play many formats.

Your code for a video player works in Windows 10 and I've played several videos recorded from my webcam API code. I just had to tweak your code a bit and it worked great in the past. Haven't used it since then, though.