OpenLLM-France/wikimedia huggingface dataset:
# Video Production/Tutorial on using auto gordian knot
### Using Auto Gordian Knot to Encode a DVD to an xvid file
#### Requirements

Auto Gordian Knot Full Package - http://www.autogk.me.uk/modules.php?name=Downloads
Xvid codec - http://www.koepi.org/xvid.shtml [download and install latest stable binary]
Ac3 codec - http://www.softpedia.com/get/Multimedia/Video/Codec-Packs-Video-Codecs/AC3-ACM-Decompressor.shtml

#### Method

Put a DVD in your DVD drive.
Open Auto Gordian Knot
Step One.
Open the IFO file of your DVD this is a small file which has information about which of the data VOB files to open to encode. There may be more than one on your DVD. If the DVD is one long film it is likely that the IFO file you want will be called something like xx_01_0.IFO . If you are not sure you can use the Preview button to check you have the correct film from the DVD
Step Two
1) If your DVD has more than one language audio on it you should choose the appropriate one from the list.
2) You can also include subtitle tracks in the end avi file too. If you want to do that select a language from the list.
Step Three
1) Select how big you want the end file to be. There are three ways of doing this we are going to select the Custom file size option.
2) If it is a full 90 minute film then select 700MB. If you have a 10 minute film then select 100M - a guideline of 8-10 M per minute should give good results.
3) Then click on Add Job.
4) Now click Start.
This will probably take a long time. Encoding is quite intense on your computer's abilities so don't be surprised if it is an overnight job for a full film.
# How to create Mpeg1 files with TmpegEnc: encoder.

http://www.tmpgenc.net/e_download.html Download Tmpeg Enc </a>
Some of this help file is taken from
Save your project as a DV avi [which might be useful anyway if you archiving to DVD]
And then Open the File in TMpegEnc - Load the Mpeg1 Pal Setting. See below for a visual interpretation.
Problems and solutions.
You get lines or fuzzyness in your final file...#
This is caused by the fact that your original file is Interlaced. So we need to put on a de-interlace filter.
You can do that by clicking on Settings and then Advanced and ticking the De-Interlace box then OK.

### You get an error Message when Encoding from a DVavi

For some reason my set up wouldn't work encoding DVavi straight away and I found this post on a forum which worked.
   In TMPGEnc, go to Options -> Environmental setting ... -> VFAPI plug-in
   Right click on the DirectShow entry, and select Higher Priority (you may have to do this a couple of times to get it to top priority). Basically then it will use DirectShow to read AVI files, so it can use the Microsoft DV codec.
# Creating subtitle Files in subtitle workshop

Firstly you need your file to be encoded. This may be a Xvid file or an Mpeg1.
Then download Subtitle workshop and install it.
Loading a video file To load a video file simply click the "Movie/Open" menu or press the [Ctrl]+[P] keys, or drag and drop an existing subtitle if in the same folder as the video file. If you get the "File is not a valid video file" error message, make sure you have the right codecs installed. If you don't, download Coda Codec Pack, it should fix most of the playback problems.
Create a new file Using Subtitle Workshop you can easily create new files from scratch, and then save them in any format. To do so, click the "File/New subtitle..." menu or press [Ctrl]+[N] keys. Once you have done this, you can start adding subtitles, and then save the file by the "File/Save" menu or pressing [Ctrl]+[S] keys.
When you get the miriad of options, I recommend SubRip format which creates an *.srt file.
Give your file a relevant name. Remember that if you want subtitles to come up automatically in some players you should name it the same name as the Video file in the same directory.
So if the Video file is here c:/geekvids/freesoftwaresong.avi Then save your subtitle file here c:/geekvids/freesoftwaresong.srt
Creating the Individual Titles
You just need to press the Insert key or click the "Edit/Insert subtitle" menu. The subtitle will always be added right after the focused item. The default duration of the new subtitle is one second, and the start time of it is always going to be the final time of the previous one plus 1 millisecond. If you are adding the subtitle in a blank list, the initial time of it will be zero.
If you want to insert a subtitle before the selected item, press [Shift]+[Insert] keys or the "Edit/Insert before" menu.
Create each subtitle line
This can be done by playing and pausing the Video by clicking the play/pause button (and then pressing the [Ins] key) [1]
And setting the In and Out points for the Video [2]
Adding the Text in the Text Box [3]
Afterwards if needed you can Manually edit a subtitle Every subtitle is composed by three parts:
a. The initial time - the time in which the subtitle is shown. b. The final time - the time in which the subtitle is hidden. c. The text - the subtitle itself. [3]
Subtitle Workshop lets you easily edit any of these fields.
To edit the initial time just click the "Show" field, set the time (or frames) you wish and press [Enter]. To edit the final time click the "Hide" field, set the time (or frames) you wish and press [Enter]. Note that you can also edit the final time of a subtitle by changing the "Duration" field. Additionally, you can edit any of this time values using the Up-Down buttons at the right side of each text box.
To edit the text, simply click the "Text" box and write the desired text. In the list of subtitles, the character "|" (pipe) represents new line.
# Video Production/Save dvavi from premiere pro

To save a timeline from Premiere pro to a DVavi
This is useful when you need a dvavi for an external encoding application, or for archiving files. DVAVI files are as good a quality as you can get when editing with Premiere Pro. They are also large in filesize so are not very good for archiving but a DV avi file may be more readily accessible than storing the Video on tape.
Select File > Export > Movie
Then click on settings button
Select the General tab on the left and make sure that Microsoft DVAVI is selected under File Type
Select the Video tab on the left and make sure Compressor is set to DV(PAL) [only NTSC if you are in N.America]
Select the Audio tab on the left and make sure the Sample type is set to 48000
Click OK
Give the file a name and save it
# Super Mario World/Valley of Bowser/Sunken Ghost Ship

Flying and Flower powerups are useless! All you really need is to be 'big' Mario with a backup mushroom. This level is basically a ghost house, but underwater! This course will take quite a while to finish and never jump a head, you may die a few times but this will help you get used to the course!, them ghosts are bluddy annoying!

## Walkthrough

Swim to the right, and hit the ? block that's above the Bullet Bill machine to get a powerup. Go up and right, then down after passing the crates, and enter the yellow pipe to the right to go down inside the ship. Inside, swim up and right while avoiding two passing ghosts. When you reach the crates, then ghosts will appear from nowhere. You will see them just before they appear and can hurt you, so then go into a position so that you don't touch them, and go onward right. After a while some ghosts will come from the right, so watch out for them, and carry on. When you see a normal Boo, then the ghosts that appear from nowhere will stop. Keep an eye on the two Boo's here, and enter the circle of Boo's when you can, and exit at the top. Enter the one to the right, then exit below so you can enter the pipe.
Now you will drop automatically and collect a Starman to make you invincible. Keep falling and collect some items on the way. Stay to the middle and you will land on a platform; renew your invincibility status here by hitting the block and collecting the starman. Keep falling onward to the bottom, where there is water and a island in the middle. Walk into the green circle with the ? on to complete the level, and to unlock the opening to the Valley of Bowser.
# Super Mario World/Valley of Bowser/Valley Ghost House

This is the most complex of all Ghost Houses within the game, with a key that will lead to Larry Koopa's Castle. If you want to get a better score, however, do this with out the key.
This house has three rooms:
Room 1 has a supermushroom/fireflower block, ghostly-green death orbs, and a door to Room 2.
Room 2 has a P-block that'll make a star drop and some platforms appear, ghosts everywhere, a door on the far-left that'll take you to Room 1, and a hallway on the far-right with five doors. For the special key, you'll need Door 5, which means you gotta be fast (cape helps). The Hallway -
Room 3 is divided in the middle by a barrier which can only be traversed from the left side (Door 5). The left side has a P-block and a dragon coin. Don't hit the P-block just yet; take it with you to the right side of the room pass the barrier (Unless you really need that last dragon coin, of coarse). On the room's right side is a remote-control coin block, which you'll use with the P-Block to make stairs to the key in the upper-right corner. You'll need to be small to fit.
# Super Mario World/Valley of Bowser/Valley of Bowser 3

Flying best for this level, Blue Yoshi is extremely helpful, thus flying in this level makes you take 45% time less time you do with others, because you would more likely stay mid-air the whole time (your in the air, very little ground)
# Super Mario World/Valley of Bowser/Valley Fortress

Arguably the most difficult level in the game outside of the Special World. This fortress is full of spikes. The key to getting through the level is patience. There are 3 sets of spikes. Each set has several safe areas to wait in while the spikes move. Each set is progressively faster.
For the first set, run to the bottom of the 'valley.' If you've hit the green switch palace, grab the feather down here. When the spikes start to rise, follow them up and run through the spiky tube. If you cape-spin while running, you don't need to wait for the rusty spikes to fall, and can take out the baddies.
The second set consists of 3 groups of pillars (1, 1, and 3 pillars wide). To make it, start jumping as they start to rise. Wait in between groups. After completing this, feel free to grab the mushroom available in the yellow switch block.
The final set is the most difficult and consists of several clusters of spikes. Waiting in between each pair of spikes tends to help the timing for the jumps. Start running when you think the spike is about to go up and you should make it.
At the end is a Reznos. Beat him and you'll have the second shortest path to Bowser!
# Super Mario World/Valley of Bowser/Valley of Bowser 1

The Monty Mole hole, the first Bowser level that requires to not get in front of Monty Moles, EAT them if you have Yoshi, but don't run and eat at once, it will damage you. No Secret Paths.
# Super Mario World/Valley of Bowser/Valley of Bowser 2

Secret Exit - Pass through the Midway Gate, come out the first pipe, make your way through the rising and falling ceiling maze part, and go through that pipe. Now, you have to be Caped Mario at the part where you see your first Mega Mole. Kill him with your cape, build up enough speed and fly up and to the left onto the top of the ceiling. Continue to the left until you drop down to the Key.
Also, just before the falling ceiling maze, there's two Q-Blocks. The first (and visible) ?-block releases some Yoshi-wings for a secret bonus area, if you have Yoshi with you. Which is cool, as Mario riding Yoshi is too big to survive the ceiling maze. The other block is hidden off-view in the upper-left above the pipe you just came in through, and always has a feather (it's probably a green block).
# Super Mario World/Valley of Bowser/Back Door

Your reward for making your way through the Valley Fortress? A MUCH easier pathway to get to Bowser. It's dark at first, but hit the question mark block to turn on the light above you. Right before the door to Bowser is a checkpoint. Go through the doors, where you will find Bowser in a flying contraption. Be careful of the propeller! He'll swoop back and forth across the screen; just stand in a corner to avoid him. Once he stops, he'll throw 2 Mecha Koopas over the side of his flying machine. Jump onto one of the Mecha Koopas, then throw it up so that it hits Bowser from up above. Do this again, and Bowser will fly off. Avoid the flames that drop from the sky. Peach will appear and throw you a mushroom right before Bowser reappears. Your second bout with him will be slightly more difficult, as he drops gigantic black marbles that will flatten you if you don't jump. Toss Mecha Koopas at him again, and after hitting him twice, dodge the flames as you wait for a second mushroom from Peach. When Bowser reappears, he's MAD. This time, he'll try to land his propeller on you. If you can dodge him long enough, he'll throw 2 more Mecha Koopas down. Throw them back up at him. After hitting him twice more, he'll go flying off out of control into the darkness, and Peach will appear. Congratulations! You've beaten Bowser!
# Super Mario World/Valley of Bowser/Front Door

Here's what you've been waiting for, Bowser, well his castle, you'll have to make way to the Back side (going through door 1-4 and after what ever number there's 5-8) and all is explained like at the Section I posted, the Back Door, but below is how you defeat Bowser.
All you do is throw his MechaKoopas at him when you jump on the MechaKoopas (don't spin jump or you'll have to wait for Bowser to throw new ones = \ ), wait till Bowser disappears for 30 seconds while dodging his little fires and Toadstool will appear and hand you a mushroom (if you lost both or 1 power up)and Second round will happen, first Bowser will pull out 2 Giant Marbles and you jump over until he throws his lackeys, do what you did last time on First round, now again, wait till he disappears when he gets hit and dodge the flames....But wait until 3rd round, he will CHASE YOU by pouncing on the ground, this time he's furious, he will pounce on you and you have to shoot his lackeys. Of course, then when you do that, congratulations! You finally beat the game!
# Super Mario World/Valley of Bowser/Larry's Castle

Larry's castle is the most difficult out of all the castles.
Must handle with care!!!
# Super Mario World/Valley of Bowser/Valley of Bowser 4

To get to secret exit, get Yoshi in the beginning. Keep him till you see the key near the end. Use him to grab and hold the key in his mouth, then walk into the keyhole.--This leads to Star Road, the real exit is not to far, just 2 jumps and you're done.
# Visual Basic/Work in Progress

This is a work area. Short pieces of text, reminders and links that don't warrant a page to themselves but need a temporary home lest they be forgotten start life here.

## Miscellaneous

* http://www.elitevb.com/content/01,0057,01/01.aspx
* Split Effective Programming into separate pages as it is now over 36K
* Explain file format of VBP, frm, cls, bas, etc.
* Registry entries that refer to VB components, how they are structured, what you can do with them.
* Side by side installation.
* Windows standard dialogs http://builder.com.com/5100-6371_14-5800282.html, http://www.vbaccelerator.com/home/VB/Code/Libraries/Common_Dialogs/Folder_Browser/article.asp, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnima01/html/ima0201.asp, http://www.devx.com/vb2themax/Tip/19255,

## Graphics

* http://www.a1vbcode.com/app-2571.asp

## Unicode Support

Unicode Issues with VB , Add Unicode Support, Unicode Custom Controls,

## Networks

inet control winsock control comm control

### Winsock Control

Visual Basic allows data to be sent via a Point-To-Point (PTP) Connection via Winsock. Once the control is inserted, only a few commands are required to send data between two networked computers. A LAN cable must be connected between the computers.
To allow Winsock to connect to any available computers, the listen command is needed, as shown below
Once this has been done, the other computer's Local IP is required. Your IP can be viewed with the command
Connecting merely requires one line of code, as shown below
Port can be any number up to 50,000. The example as shown above is 1234.
To accept a connection you need to create a new sub
Sending data is also pretty simple.
To receive any sent data another new sub is needed
Using the above code it is relatively simple to create a working data exchange between two computers. More information on this topic can be found in the Snippets Section.

## Shell Context Menu

Add examples for VBZip etc.

## Console Programs

See:
* http://www.nirsoft.net/vb/console_application_visual_basic.html
* http://www.flexbeta.net/forums/lofiversion/index.php/t3090.html
A very simple way of creating console programs: http://www.kellyethridge.com/vbcorlib/doc/Console.html

## CGI

See:
* http://www.vbcity.com/forums/faq.asp?fid=10&cat=Web+Development&

## Windows management Interface

http://archive.is/20130628221511/http://techrepublic.com.com/5208-11196-0.html?forumID=44&threadID=121079

## Sound

* http://www.unh.edu/music/Visual_Basic_Programs/Visual_Basic.htm
* http://www.devx.com/vb2themax/Tip/18323
* http://www.ostrosoft.com/vb/projects/mci_play/index.asp
* http://vbcity.com/forums/topic.asp?tid=103678
* http://www.xtremevbtalk.com/archive/index.php/t-237143.html
* http://www.vbforums.com/showthread.php?t=359612
* http://www.vbaccelerator.com/home/VB/Code/vbMedia/Audio/Lossless_WAV_Compression/article.asp
| Previous: Glossary | Contents | Next: |
# Visual Basic/Subclassing

Subclassing can be useful when you want to add functionality that is not directly supported by Visual Basic. To explain how this works we must first go through a little background theory.
All windows in Windows (for example a form, a button, a listbox, etc.) have a function that the operating system or other programs can call to communicate with the program. Windows can, for example, send messages about events such as the mouse pointer moving over the window, a key being pressed when the window has the focus and much more. Programs can also send messages that ask for information about the window; for example, the EM_GETLINECOUNT message asks a textbox to send back the number of lines in the text it holds. One can also define one's own functions.
To call these special functions you can use PostMessage, SendMessage or CallWindowProc (the last only if you know the address of the function).
Usually such a procedure looks something like this:
In this function hwnd is the handle of the window that the caller has tried to contact; uMsg is the message identifier which says what the call is about; wParam and lParam are used for whatever purpose the caller and window agree on. The handle, hwnd, is not an address but is used by Windows to find the address.
If, for example, we want to set the text that appears on the title bar of a form we can use the following code:

## Why Subclass

What is the point of subclassing?
Using this technique we can completely replace a program's own window function with our own. Then we can respond to the messages in ways that Visual Basic doesn't, we can decide to send the messages further to the original window function or not as we like, modifying them on the way in any way we please.

## Example

To specify that our window function is to be used we use the API call SetWindowLong. Study the following example and put it in a base module:
Add a form with a button cmdTest and add this code:
When you click the cmdTest button, you'll see that the text that appears is not "This is a test", but "Subclassing".
| Previous: Windows_API | Contents | Next: External_Processes |
# Visual Basic/User Interfaces

A user interface is the part of your program that is visible to a human user. It can be as simple as a command line or as sophisticated as an immersive virtual reality simulator (see Death Dream by Ben Bova). However, in the context of Visual Basic it usually means what is commonly referred to as a Graphical User Interface or GUI which generally consists of one or more Forms that contain text boxes, labels, buttons, picture boxes, etc.
A more common example of a GUI would be a standard EXE(Windows Forms).
# Visual Basic/Windows API

APIs, short for "application programming interface", allows you to access a wide array of functions and methods exposed by the operating system or other applications (DLLs), performing operations not normally implemented by the standard virtual machine that Visual Basic provides. This includes operations such as shutting down the computer or listing all the current running processes.
Although VB6 compiler can't create true DLLs, it has ability to call existing DLLs (not necessarily just Windows API of course). Declaration of such function contains extra keyword declare and lib, plus optionally can be defined an alias if the real name of function differs from name of dll function alias. For example it can be:
For datatype Any accepts compiler any parameter provided. For effective using of API calls are important operators VarPtr which returns pointer at variable specified and AddressOf which is important for callback functions. Beginners often do mistake on missing or badly specified ByRef/Byval in declaration. Simply said, ByVal means that on stack will be pushed value and ByRef (or missing specification of calling convention) means that on stack will be pushed pointer at variable. In practice parameter type Long (4 bytes) will be called ByVal, but String or complex data types will be called ByRef.
Unfortunately, VB6 doesn't support C-like memory handling. To deal with this problem VB programmers uses function CopyMemory to copy memory like this:
which is relatively safe. Some of programmers at the higher level of knowledge can modify pointers at objects as well. Although most of API functions can be called this way, there is not possible to call entry points of dlls dynamically (LoadLibrary-GetEntryPoint-FreeLibrary) for general case. Much clearer way how to deal with such tasks is to move code of this kind into separated dll written in C++ and call this dll.

## Declaration

An example of a declaration is the GetTickCount function which returns the amount of milliseconds that have elapsed since Windows was started. To use it, insert the following into a standard module in your project:
To access it, simply call it like you would call any normal function. Note, however, that this is a Public declaration and is limited to modules. If you don't need it to be accessible in your entire project, use the Private declaration and insert it in the class module or form directly:

## Resources

For a beginner it is normally difficult to create a declare statement since it requires knowing how to map C datatypes to Visual basic datatypes. There is a built in program that comes along with VB6 called API Text Viewer which lists all commonly used API functions, contants and types. A VB programmer can just find the required function from said program and insert into the VB module.
| Previous: Databases | Contents | Next: Subclassing |