|
Post by Roger Cabo on May 21, 2022 12:39:53 GMT 1
Hi everyone,
I like to play a YT video *.mp4 file in gb32, then grab a single image from any play position. Would that be possible?
Thanks and kind regards, Roger
|
|
|
Post by (X) on May 21, 2022 17:37:03 GMT 1
|
|
|
Post by Roger Cabo on May 22, 2022 14:58:53 GMT 1
Thanks.. perhaps I didn't explain enough. 1) I must play the mp4 video out of GB32,
2) Goto to frame N of the video, 3) Then capture a rectangular part of the image. Can be possible out of the MCI DC% as well. 4) Then save the part as single bmp file.
___________________________
Long time ago I wrote an avi encoder in the toool Particle elements. Also a desktop grab to display color values under the mouse with screencolor2.
Here is the old get screencolor code. (for one pixel) It's also possible to grab the complete screen by bitblt because you have the DC%.
Attachments:screencolor2.G32 (1.42 KB)
|
|
|
Post by (X) on May 23, 2022 3:24:30 GMT 1
I guess I really want something like this too!
I spent most of the day at it, trying every combinationI could think of.
This site seems to have made progress in VB, but they are talking a lot about temporarily disabling video acceleration.
I am trying to get FFMPEG to work also... I will post if I get something working.
|
|
|
Post by (X) on May 31, 2022 2:23:54 GMT 1
Hi Roger,
It seems that - from the comfort of GFA-BASIC - one can control VLC remotely via Telnet protocol (FFMPEG does not seem to have this) and if I am correct, you'll be able to do all that you requested in your previous post:
I needed to configure VLC for Telnet and specify a prefered snapshot directory.
I've verified that it is possible using Putty (Telnet provided by Win10 does not echo local commands once the connection has been established to VLC, but, Putty and others do.)
Now, I just need to get my GFA Telnet skills up and running to flesh this out.
This is how I configured Putty. You'll have to substitute your IP address instead of '192.168.2.12'. The '4212' port is the one specified by VLC. A Windows OS popup may ask you once to confirm permission to communicate on that port, then, you are good to go.
This is where I got VLC...
www.videolan.org/vlc/download-windows.html
|
|
|
Post by (X) on May 31, 2022 12:48:46 GMT 1
|
|
|
Post by (X) on Jun 1, 2022 3:23:30 GMT 1
I translated all the comments reorganized the code (read alphabetized) and grouped similar code together and have successfully connected to VLC via Telnet and got a YouTube video to play. Yaaa!!! It is all done rather blindly, so I'm trying to get more feedback from VLC. Yaa!! I am struggling with about 3 flavours of the WinSock connect() function... They all seem to want to use different data types for the internet address. Ya! I tried importing GFA's "WinSock" library but that's when the trouble started. Oh? As this can lead to many other usefull projects I am determined to continue wrestling this bull to the ground! Ouf!
Don't worry. I'm on top of it! Got him right where I want him!
|
|
|
Post by wbtcpip on Jun 1, 2022 11:54:03 GMT 1
you don't need to use that complicated socket to control VLC. You can use liblvlc directly in Gb32 as a shared library
i attach a simple example.
of course you must download vlc libs and its plugins, if you want you can use my ready autoinstall www.mbradio.it/service/MBVLCInstall3017.exe put the exe in your gb32 folder and execute it. it will silently install the libvlc dll and the vlc plugins folder and lua folder
Attachments:VLCExample.zip (11.2 KB)
|
|
|
Post by (X) on Jun 1, 2022 12:05:24 GMT 1
Thanks wbtcpip!
I definitely feel like I am just scratching the surface of what VLC can do.
I took a quick look at the library. This seems intriguing... Type libvlc_video_viewpoint_t f_yaw As Single '< view point yaw in degrees ]-180;180] */ f_pitch As Single '< view point pitch in degrees ]-90;90] */ f_roll As Single '< view point roll in degrees ]-180;180] */ f_field_of_view As Single '< field of view in degrees ]0;180[ (default 80.)*/ EndType It seems one can skew the video projection to match just about any orientation.
I gotta get me some-o-that!
|
|
|
Post by (X) on Jun 1, 2022 13:01:12 GMT 1
Did I say I was programming for fun for about 30 years and I don't know what 'lua' is!
It seems - in programming and perhaps in all aspects of life - there is a non-stop attempt to grab your attention. Hey Look at me! Look what I can do! I love it and I also find it challenging and daunting at times.
|
|
|
Post by (X) on Jun 3, 2022 3:31:16 GMT 1
I got a fun little Telnet terminal going to call up a VLC connection and I can play, pause, snapshot etc. I just have to clean up the controls on the form and I will post the Demo.
This shows the Demo Lib_Telnet.G32 app with a full screen YouTube video playing in the background. The previous programmer created all the controls in code, so, it will take me a while to set things up properly. I am aware that the Telnet "remote control options" are somewhat limited compared to the VLC library.
This will definitely be my next focus.
|
|
|
Post by (X) on Jun 9, 2022 22:44:05 GMT 1
I have much better GFA program control over the exchange of data via Telnet than previous days! I am just ironing out a few bugs and I will post my little "chef d'oeuvre" :)
I had a lot of fun combining sound effects from one of my favourite movies.
|
|
|
Post by (X) on Jun 15, 2022 4:11:33 GMT 1
I am moving everything I can over to a Library.
It is a bit more time consuming than I anticipated. I am making good progress though.
It's too bad we can't put data resources (for example sound files) inside a library file without resorting to creating a "printable character" data dump that needs to be unpacked to disk before it can be accessed. I am new to this dilemma. I just wish I could pack everything into the exec without the need for external files.
|
|
|
Post by (X) on Jun 15, 2022 17:00:04 GMT 1
Here are my orientation notes for this project to help me see the bigger picture.
|
|
|
Post by (X) on Jun 15, 2022 18:54:54 GMT 1
Eureka! I captured an MP4 video screen without using any external program, just GFA and Microsoft API calls. I revised an old web cam capture program and tried directing the capture sequence to a window playing an MP4 video via MCI command and I was stunned that it worked! I will post the demo asap.
|
|