Author Topic: Audio and Video Player Combined into One File  (Read 3573 times)

0 Members and 1 Guest are viewing this topic.

Offline rcamp48

  • Newbie
  • Posts: 62
    • View Profile
Audio and Video Player Combined into One File
« on: February 08, 2021, 03:54:45 pm »
Hello All

This is a huge leap forward, this file will play audio files and video files, IF the video files are WMV files , It will play MP3 files, Wave files in stereo only, I am working on surround sound bt that may take some time.

This is not really my work , all of the credit goes to other people who have written various sections of code, I just combined them all into one file.

Russ

 
 

Russ Campbell
rcamp48@rogers.com
BBS Files Programmer

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Audio and Video Player Combined into One File
« Reply #1 on: February 08, 2021, 03:59:45 pm »
Actually, mciSendString can also play AVI videos. Check my API collection in the link in my signature and navigate to WinAPI. The Webcam API file gives a popup for a webcam selection then, after recording, plays the video. Oops, removed the playing portion of the code. Sorry. Pretty much, as long as the video was encoded with mpeg then you are OK. H.264 won't work.
« Last Edit: February 08, 2021, 04:08:32 pm by SpriggsySpriggs »
Shuwatch!

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: Audio and Video Player Combined into One File
« Reply #2 on: February 08, 2021, 04:42:29 pm »
Looks like you have the last video code I had posted to the old forum.  I believe I only added pause and resume afterwards.  Yeah, I've found out that what @SpriggsySpriggs said is correct, none of my h.264 videos will play, but my mpeg and wmv ones will.  I'll look for the DLL I made, but I *think* it had the same results, no h.264 playback.

- Dav

Offline rcamp48

  • Newbie
  • Posts: 62
    • View Profile
Re: Audio and Video Player Combined into One File
« Reply #3 on: February 08, 2021, 04:59:24 pm »
Yes I noticed that too...they won't play but I can convert them, I have a paid version of Switch, it just takes soooo long.

Russ
Russ Campbell
rcamp48@rogers.com
BBS Files Programmer

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Audio and Video Player Combined into One File
« Reply #4 on: February 08, 2021, 05:01:51 pm »
@rcamp48

Handbrake is free and works really well. I use it all the time for converting full Blu-ray movies to work on my car's radio
Shuwatch!

Offline rcamp48

  • Newbie
  • Posts: 62
    • View Profile
Re: Audio and Video Player Combined into One File
« Reply #5 on: February 08, 2021, 09:11:46 pm »
You will notice that the video player bombs if there are spaces in the filenames, here is a script file for bulk renaming of files with spaces:

 

That should solve problems with spaces in filenames.............

Russ
Russ Campbell
rcamp48@rogers.com
BBS Files Programmer

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Audio and Video Player Combined into One File
« Reply #6 on: February 08, 2021, 09:12:40 pm »
Not necessary. Encapsulate your filename with quotes in the string you send to mciSendString
Shuwatch!

Offline rcamp48

  • Newbie
  • Posts: 62
    • View Profile
Re: Audio and Video Player Combined into One File
« Reply #7 on: February 09, 2021, 06:28:09 am »
None of it is nesessary anymore I changed over to VLC media player, this video shows it off

https://youtu.be/_ArRp1L1UpI
Russ Campbell
rcamp48@rogers.com
BBS Files Programmer

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Audio and Video Player Combined into One File
« Reply #8 on: February 09, 2021, 08:17:27 am »
Yeah, I see you're calling VLC from SHELL and passing it the file as an argument. I've been meaning to look into libraries for playing videos (besides mciSendString, which works rather well) in QB64 but they're rather complex and difficult to compile. It'll probably be a long time from now before I go and really try one out. I'll let you know if I find something that works, though.
Shuwatch!