![]() |
|
SPV Video library. - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Expanding Horizons (Libraries) (https://qb64phoenix.com/forum/forumdisplay.php?fid=21) +---- Forum: One Hit Wonders (https://qb64phoenix.com/forum/forumdisplay.php?fid=24) +---- Thread: SPV Video library. (/showthread.php?tid=4336) Pages:
1
2
|
SPV Video library. - ahenry3068 - 01-16-2026 I've previously posted my X16 Movie Maker here on the Forum under programs. This is a set of Library's to enable X16 Movie Maker Videos to be used in QB64PE programs easily if anyone has a need for that. The library is OS Independent and doesn't rely on any other external libraries only built in QB64PE capabilities. Home base for the X16 Movie Maker project is HERE: https://cx16forum.com/forum/viewtopic.php?p=35595#p35595 The X16 Movie Maker has a Back Door for creating Higher Resolution and frame rate videos specifically for this library. It's undocumented for philosophical reasons, (the project is centered on producing Video content FOR the X16) Videos created through this Back Door will not play on the X16), I'll document that Back Door here later or contact me if interested. Steve McNeil suggested I have this added to the QB64PE library pack. I'm not opposed to that but I don't know how. To any of the gurus that do know all about that I'm happy to cooperate in that endeavor if it's deemed useful. About that BACK DOOR on the X16 Movie Maker. To access the Back door for creating Higher Resolution Videos that DO NOT PLAY ON THE COMMANDER X16 you must start the Movie Maker on the command line. ./MakeX16Movie -NOLIMITS The -NOLIMITS parameter enables the Back door. It is still a bit hidden. The Movie Maker has three Main categorys. You need to choose STANDARD BITMAP (Not Hi Bandwidth !) You then need to choose the option CUSTOM RESOLUTION When you hit F1 (Go) you will get a Dialog asking if you want to create a 256 color Desktop Video. Selecting yes will enable 8 bpp color which is not normally available from the Standard bitmap menu. If you select NO you can still continue but the 1bpp, 2bpp or 4bpp color depth previously selected will be used 1 bpp & 2bpp don't work at ALL resolutions because of alignment issues. 8bpp can work at almost any resolution 4bpp should work on any Horizontal resolution that's an Even number. You then enter Horizontal res, Vertical res and FrameRate. Without regards to X16 bandwidth limits. Very large files can result. I typically stay with 640 x 480 or something like that. But I have done 1024 x 768 successfully !. 4 bit videos can sometimes look surprisingly good and will take 1/2 the storage space. Each frame gets a custom palette, This isn't CGA/EGA. You'll still have the Audio Frame restriction, But at 24 fps 48000 khz 8 bit Audio fits fine. This library resizes the Video to the source Aspect ration (either 4:3 or 16:9) regardless of actual vertical resolution ! You can save some file size by doing something like 640 x 300 rather than a full 640 x 480 You do lose some detail but the video will be sized properly on play ! RE: SPV Video library. - vince - 01-19-2026 i see this is an organized high effort project, nice work note: i don't see a reason to put zip files inside zip files, why not folders? RE: SPV Video library. - Pete - 01-19-2026 Dammit, you cut the song short! 99 Luftballoons in the air 99 Luftballons You shoot one down It falls to the ground 98 Luftballoons in the air Ah, that takes me back! Anyway, I think this is a very accomplished project, I'm with Rick... I mean Vince on that, but I do have some curiosities. About 6 or so years ago I made a video app that simply slaved a play list to VLC; so a question I have is this... What control benefits did you see by having videos play in a QB64 window? I mean I get that if you are distributing software, this makes it unnecessary to include VLC in the package, and that's pretty great for developers, but did you find other benefits? Pete RE: SPV Video library. - ahenry3068 - 01-19-2026 (01-19-2026, 05:33 PM)vince Wrote: i see this is an organized high effort project, nice work Thanks for the kind words Vince. The zip inside zip is because I was also putting those individual archives elsewhere. It just kind of worked out that way. I didn't see any harm ! (01-19-2026, 05:46 PM)Pete Wrote: Dammit, you cut the song short!This started as an offshoot to the X16 Movie Maker project just to have preview capability after conversion. But I see the benefit of having control over Video play within a program too. Just a couple examples off the top of my Head ! 1. Your spaceship control panel in your Space battle game receives a video message from the Fleet commander ! You play it right there on your control panel. ( This has a lot of offshoots ! ) 2. Control of Video segments in a program that's a tutorial for doing some other activity ! RE: SPV Video library. - Pete - 01-19-2026 WOW You are working on an interactive program, not just a player. That's impressive. About 30 years go the QBasic Forum was working on jpeg encoders. On the simple side we had the makings of a child's learning tool. Multiple choice this picture is A) Apple B) Orange C) Pear D) Something Steve grew that's unrecognizable. Just being able to get a jpeg in the QB64 window was a feat back then. You could still shell out to whatever Windows jpeg viewer was the default, back then, but it looked sloppy. Anyway, making the controls to manipulate the video is amazing. Just now thinking of the video tracks, indexing them, and making a menu system of a golf swing. YOu could take the same swing, index the components, and make the video run slow mo, regular speed, repeat, or just run a segment or pause at different points without the need to keep pressing keys. Pete RE: SPV Video library. - ahenry3068 - 01-19-2026 (01-19-2026, 06:37 PM)Pete Wrote: WOW I'm pretty sure the SUBs I already have in the library could manage that. (I haven't quite got slow motion play figured out. The Video is timed against the sound track directly to maintain sync. But with the Callback hooks I've put in the library something could be done. (Could always spoof the stored audio sample rate after opening the Vid file ). You would have to source an appropriate video somewhere . RE: SPV Video library. - SMcNeill - 01-20-2026 (01-19-2026, 09:48 PM)ahenry3068 Wrote:(01-19-2026, 06:37 PM)Pete Wrote: WOW Add a deliberate stutter to your stuff, or make a video without sound. ![]() DO Play Video Pause Sound Pause Video Delay 0.01 'as desired for slow mo Resume Sound Resume Video LOOP It's a small delay stretched out between frames. In the end, it should produce either a slow motion effect, or a stutter to the video. I would think, at least, it should. RE: SPV Video library. - ahenry3068 - 01-20-2026 (01-20-2026, 12:52 AM)SMcNeill Wrote:The stutter approach would work. The videos allow various Sample Rate for the Audio so I should add a sub to spoof that rate too. (Your going to get that dragging audio tape or high pitch fast voices effect depending on which way you tweak it. But Audio can also be muted) It would also be very easy to create a Video with a silent sound track. One of the video options in the Movie Maker is to use a seperate SVA file for the sound track of a Video (This is determined by the Video type in the Header). The library supports these. In that case the Sample rate is determined by the size of the SVA file and the Video FPS, The Audio format (8 or 16 bit & Mono or Stereo) and the Size of the SVA file (The SVA file itself is raw PCM without a Header, That info is in the SPV header) In that case a "Silent file" of different size could be output prior to calling the OpenVideo proc. (Just write an SVA file with all 0 content)(01-19-2026, 09:48 PM)ahenry3068 Wrote:(01-19-2026, 06:37 PM)Pete Wrote: WOW And manually change the TRUE_FPS variable in the code prior to opening the Audio. This was my ORIGINAL format on the X16 as it was actually easier at first. Embedding the Audio in the SPV file took a bit more pre-calc for Video playback. I kept support in after figuring out the embedded Audio. I also kept it because it more easily allows switching soundtracks for a Video. RE: SPV Video library. - ahenry3068 - 01-20-2026 Another demo written on the Library. Using the CALLBACK feature. The code (requires SPV Vid Library above) Code: (Select All)
RE: SPV Video library. - ahenry3068 - 01-20-2026 I added the X16 Movie Maker Hi-res video back door instructions on the Top post. The X16 Movie Maker itself is not posted on this thread but a link to it's home is provided. |