Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make a GUI for a console/cmd application
#1
Hi guy im stuck <!-- sSad --><img src="{SMILIES_PATH}/icon_e_sad.gif" alt="Sad" title="Sad" /><!-- sSad -->

Ive become obsessed with console/cmd application that you run from the command prompt with parameters like wget, ffmpeg, rtmpdump etc.....

So i tried researching how to make a frontend GUI for such applications and this is where i have hit a brick wall.

For example one such console app i would like to make a nice GUI for ffplay(media player) which is part of the ffmpeg package and you run it from a command prompt like this.....
Code:
ffplay [options] [‘input_file’]
Working example.....
Code:
ffplay -i http://wpc.573d.edgecastcdn.net:80/00573D/live/enc0001/a-bbc1/m3u8/a-bbc1-1.m3u8

Any idea how i could make a simple GUI for ffplay ?

So far i have.....
Code:
Imports System.ComponentModel

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim myProcess As New Process()
        myProcess.StartInfo.UseShellExecute = False
        myProcess.StartInfo.RedirectStandardOutput = True
        Try
            myProcess.StartInfo.FileName = "ffplay"
            myProcess.StartInfo.Arguments = TextBox2.Text
            myProcess.StartInfo.CreateNoWindow = True
            myProcess.Start()
            TextBox1.Text = _
               Replace(myProcess.StandardOutput.ReadToEnd(), _
               Chr(13) & Chr(13), Chr(13))
            myProcess.WaitForExit()
        Catch ex As Win32Exception
            MsgBox((ex.Message + ". Error Detected."))
        End Try
    End Sub

End Class

This only works with certain parameters like......
Code:
--help
but try and run a video it wont work ?

<!-- sSad --><img src="{SMILIES_PATH}/icon_e_sad.gif" alt="Sad" title="Sad" /><!-- sSad -->
[Image: 16387.png]
#2
I tried to do something like this a long time ago, but I also had difficulty with it. Unfortunately, I don't know what to tell you! I have never worked with "ffplay" either, so I don't know if there are any limitations or something of that sort. Have you made any progress since this post?
My Blog | My Setup | My Videos | Have a wonderful day.
#3
I tried to do something like this a long time ago, but I also had difficulty with it. Unfortunately, I don't know what to tell you! I have never worked with "ffplay" either, so I don't know if there are any limitations or something of that sort. Have you made any progress since this post?
My Blog | My Setup | My Videos | Have a wonderful day.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Rename application file brco900033 3 14,835 10-15-2013, 12:03 AM
Last Post: brandonio21
  how do you make a register system in VB using Dropbox Cecilio 2 13,945 08-15-2013, 08:14 AM
Last Post: Cecilio
  Form/Application Store PsychicShadow 2 12,412 06-02-2011, 09:16 PM
Last Post: xolara

Forum Jump:


Users browsing this thread: 1 Guest(s)