![]() & TrackBar1.Value & " -nomouseinput -sub-fuzziness 1 -vo direct3d, -ao dsound -osdlevel _Ġ -wid " & CInt(32) & CDP If OpenFileDialog1.ShowDialog = ThenĮnd If ' mplay() procedure :- Public Sub mplay()Īrgs = " -nofs -noquiet -identify -slave -af-add equalizer=0:0:0:0:0:0:0:0:0:0 -volume " _ When user clicks on open file, a dialog will open and after a file is selected, mplayer will run that file. So that we do not need timer to read mplayer's each line after 1 ms continuously. We used BackgroundWorker1 because we want to run mplayer on a separate way. af-add equalizer=0 : 0 : 0 : 0 : 0 : 0 : 0 : 0 : 0 : 0 used for giving audio effects command. Here we want to display in Panel1, so we get its handle and pass it after -wid. wid option will tell the id of window where we want to display video output. nofs option for not to run in full screen mode. We will use " -slave" option because we want to run mplayer in 'slave' mode where it will read commands from another process and do actions accordingly. ps is the process object which will use it to keep a reference to the mplayer process. Here, args will hold the arguments that will be passed to process except file name. Ps.StartInfo.RedirectStandardOutput = True Ps.StartInfo.RedirectStandardInput = True ' To declare Variables :- Dim args, time_length, time_pos, buffer, CDP As String Dim posh, tdr As Longĭim ps As Process = Nothing ' To initialize process :. ![]() Here is the code that we use to declare variables and initialize process:ĭelegate Sub ChangeTextsSafe( ByVal percent As String) ![]() We'll redirect input & output so that we can send commands to mplayer and get information about the file. We will use Process class of System.Diagnostics namespace to launch an instance of mplayer to play files. Process object, Window handle control, Input and Output redirection. C++ examples that were found to control mplayer but it is more easy and reliable if we use VB.NET program. There were no previous examples of how to use mplayer to play audio or video in VB.NET winform application. It can play audio or video file using several different output drivers. Mplayer is a command line audio & video player. At first, we need mplayer.exe in our main application's start path. Downloaded source code is sample part of Veron Media Player 1.9. To conclude, mplayer2 is a useful and easy to handle application that allows you to watch all your favorite videos, regardless of their format.This article will demonstrate how we can use mplayer to easily control in VB.NET WinForm application without using any COM/ActiveX control. Similarly, 5 and 6 will increase or decrease the hue levels, while 7 and 8 alter the saturation of the video. Moreover, the 's' button lets you take a single screenshot, while the 'S' enables you to start and stop capturing snapshots continuously.Īdditional features include the ability to adjust the contrast of the movie using the numerical keys 1 and 2, or 3 and 4 if you wish to adjust the brightness. To toggle fullscreen, you can just hit the 'f' button, and in order to display or hide the subtitles to your movie, you can use the 'v' key, with 'x' and 'z' helping you fix any subtitle delays with a millisecond. Using the 9 and 0 keys, you can adjust the volume of the video according to your needs, while by pressing 'm', you can completely mute it. Despite functioning through CMD, it can easily be controlled using the keyboard and mouse, by making use of the numerous shortcuts that it offers.Īs such, you can use the arrows to move backward or forward (for 10 seconds: left and right for 1 minute: up and down), while the 'Space' key allows you to pause and unpause the movie. The main purpose behind mplayer2 is to offer you the ability to watch a wide array of popular and less popular video formats on your computer, without it eating up too much system resources. The program runs only through Command Prompt, but if you want, you can use a Graphical User Interface, as it is compatible with the GUIs created for MPlayer. Mplayer2 is a command-line video player that was developed from the initial MPlayer, providing you with the original functions and more, along with various improvements of the project, so you can fully enjoy watching your favorite movies.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |