views:

115

answers:

7

I'm dying to know how I can make a GUI for ffmpeg and jhead in OSX. I've been looking for a solution for a while and thought you, stackoverflow's users, could help me. Maybe you know some document I haven't come across of or, better, a tutorial to make a GUI.

I love those two tools but I like the simplicity of drag/drop operations.

Note: I don't need a GUI for them, I want to make one.

A: 

On your Leopard/Snow Leopard disk you can find XCode, but you can also download it from the Apple Developer Community. XCode comes with the Interface Builder, which lets you build GUI's and you can rig to your commands using the Cocoa framework.

Shyam
A: 

This may not be the best answer but in the book "Xcode unleashed" is a chapter how to embed a Command Line Tool inside a Cocoa Application. Maybe you should have a look. Nice book anyway.

Holli
I've been wanting to read that book for a while, now, but never got around...
bfred.it
A: 

You are too late, there is already a GUI frontend for ffmpeg called ffmpegX, but anyway, you would create a model that either wraps or uses the library or executable.... if it uses the executable you can use popen to invoke the executable, write to its STDIN, and read from its STDOUT. The view and controller would be basically the same as you would design it for any other GUI application. Since this is a Cocoa post, you could use Objective-C and Cocoa to the make the GUI, but it really can be implemented in any language.

Michael Aaron Safyan
I know but ffmpegX is not exactly the kind of software I like (drag, drop, convert, done), too many settings spread across a Windows-like interface full of controls.I'd want to build something like EasyWMV: http://www.easywma.com/wmv/
bfred.it
+3  A: 

There is a tutorial for wrapping command-line tools using NSTask, on the Cocoa Dev Central site:

It's a few years old now, but should get you started.

Kelan
That's pretty much what I was looking for! I'll get started =DThanks!
bfred.it
+1  A: 

If you are asking "How do I create a GUI application in Mac OS X that interfaces to a command line tool" the answer is NSTask. Although, if the command line tool provides a programming API, using that would be preferable to invoking the command line tool itself.

If you are asking "How do I create a GUI application in Mac OS X" the answer is to read a book about it and look at the Apple tutorial docs. Cocoa Programming on Mac OS X by Aaron Hillegass was my starting point.

JeremyP
+1  A: 

You mean something like Miro video converter?

Basically, yes! I didn't its existence but if I somehow learn how to make my own frontend, I'll also do one for *jhead* and other amazing commandline software.
bfred.it
A: 

You can use a scripting language like Tcl, Python or Ruby with a toolkit like Tk which uses native widgets on the mac.

Bryan Oakley