Author Topic: Video in QB64  (Read 3245 times)

0 Members and 1 Guest are viewing this topic.

Offline Kernelpanic

  • Newbie
  • Posts: 94
    • View Profile
Video in QB64
« 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
« Last Edit: December 19, 2020, 08:10:17 pm by Kernelpanic »
Mark Twain
"Als wir das Ziel endgültig aus den Augen verloren hatten, verdoppelten wir unsere Anstrengungen."
„Having lost sight of our goals, we redoubled our efforts.“

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Video in QB64
« Reply #1 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.
Shuwatch!

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Video in QB64
« Reply #2 on: December 19, 2020, 09:00:47 pm »
Try...

SHELL _DONTWAIT "START vlc KindMitBall.mp4"

Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: Video in QB64
« Reply #3 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.
Granted after becoming radioactive I only have a half-life!

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: Video in QB64
« Reply #4 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

Offline Kernelpanic

  • Newbie
  • Posts: 94
    • View Profile
Re: Video in QB64
« Reply #5 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])


  [ You are not allowed to view this attachment ]  
Mark Twain
"Als wir das Ziel endgültig aus den Augen verloren hatten, verdoppelten wir unsere Anstrengungen."
„Having lost sight of our goals, we redoubled our efforts.“

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Video in QB64
« Reply #6 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.
Shuwatch!