Linux UI

Support for HandBrake on Linux, Solaris, and other Unix-like platforms
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
jduv
Posts: 7
Joined: Mon Apr 02, 2007 2:24 am

Linux UI

Post by jduv »

Anyone working on a Linux UI for handbrake / mediafork?
jduv
Posts: 7
Joined: Mon Apr 02, 2007 2:24 am

Post by jduv »

I'll interpret silence as: no one!

I'm playing with GTK+ a little bit, so I'll see what I can do.

I'd also like to add matroska support to mediafork. I'll play around with it =)
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Post by jbrjake »

jduv wrote:I'll interpret silence as: no one!
No, you just asked when everyone was busy/asleep.

Clee has a Qt gui almost finished.

There's an old unfinished non-working gtk gui in the svn you might want to look at.

Matroska support would be AWESOME.
jduv
Posts: 7
Joined: Mon Apr 02, 2007 2:24 am

Post by jduv »

sweet. I'll focus on matroska support then.
justintime32
Posts: 1
Joined: Sat Apr 21, 2007 4:35 pm

Post by justintime32 »

Great! HandBrake is a great program, although the Linux version has been really lacking a good GUI. When it is finished, will there be an official Linux build with it included, or will we need to get it from SVN and compile it?
bernstein
Posts: 1
Joined: Mon Sep 03, 2007 11:08 pm

Post by bernstein »

jbrjake wrote:
jduv wrote:I'll interpret silence as: no one!
No, you just asked when everyone was busy/asleep.

Clee has a Qt gui almost finished.

There's an old unfinished non-working gtk gui in the svn you might want to look at.
well now it's september and we still have no linux gui...

but anyway i am on gnome/xfce and prefer a gtk gui. i have done some complex gtkglade gui's before. but only in conjunction with python. if there is interest, i'll begin looking into it... but i have some questions :
- need it be C ? nowadays python on linux is default everywhere and i am not so experienced in C++
- can't seem to find the old gtk code in the source package... (that would help a lot if it need be C/C++)
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Post by s55 »

There is code in the SVN for a Linux GUI. Not sure what the current state of it is. Will get an update from the dev next time he drops in
saintdev
Enlightened
Posts: 146
Joined: Wed Dec 20, 2006 4:17 am

Post by saintdev »

bernstein wrote: well now it's september and we still have no linux gui...

but anyway i am on gnome/xfce and prefer a gtk gui. i have done some complex gtkglade gui's before. but only in conjunction with python. if there is interest, i'll begin looking into it... but i have some questions :
- need it be C ? nowadays python on linux is default everywhere and i am not so experienced in C++
- can't seem to find the old gtk code in the source package... (that would help a lot if it need be C/C++)
Whatever you would like to make it in would be great. C/C++ would probably be best as that way you can directly link to libhb. If you wanted to make it in python, go ahead, you'll have to parse the output from the CLI to get your information.
And as sr55 said, the old GTK GUI is in the svn (you'll have to go back to an older revision, as we removed the dir because it didn't work anymore.)
lazychris2000
Posts: 1
Joined: Mon Sep 10, 2007 3:28 am

still in progress?

Post by lazychris2000 »

If anyone is still working on a linux gui, I would be more than willing to help test it. I am running Ubuntu Gusty with the latest updates. PM me if you are interested.
Thanks!
th3rmite
Posts: 27
Joined: Sun Sep 16, 2007 6:27 pm

Mono

Post by th3rmite »

I just installed mono 1.2.5 on Ubuntu Feisty and the Windows Handbrake GUI launched! Beings how it is almost midnight here, and I have no DVD's to try it out on, could someone else try it out? If not, I'll post my success or not later on tonight.

I used the windows build from the SVN, and built it under VS2005. Then moved it to my Ubuntu install and tried it out. Hopefully we can convince someone to host it in .tar.gz instead of .msi.
th3rmite
Posts: 27
Joined: Sun Sep 16, 2007 6:27 pm

Damn

Post by th3rmite »

I didn't realize that the WinGUI is a wrapper to the CLI version of Handbrake.

I think it will take a bit of hacking to get it working (my C# skills aren't very good at all), but that's not going to stop me from trying.
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Post by s55 »

@th3rmite - I think saintdev had it running on mono under linux.

If someone wants to take that avenue to get the WinGUI working on linux, you can talk to me on IRC for assistance with C# when I get back from holiday at the end of the week.


The scanning for sure won't work. The query to launch the CLI will need to be changed.

I'm not sure if the encode launch will work, again it may need a query tweak.

I think that would be the 2 main issues for it not working. Since it runs, I assume most of the functions will work. Some may need minor tweaking.
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Post by s55 »

@saintdev the old gtk was removed yes, however clee's qt4 work is in th svn I believe in a pretty reasonable state. You'd need to check with him on that though. Someone may be able to help along with that. thats another option.
th3rmite
Posts: 27
Joined: Sun Sep 16, 2007 6:27 pm

Post by th3rmite »

@sr55

"The scanning for sure won't work. The query to launch the CLI will need to be changed."

That's for sure. I just spent the last two and a half hours hacking on it. I change some params and got it to scan the DVD, the problem is that HandBrakeCLI is returning the output on stderr instead of stdout and for some reason WaitForExit () doesn't seem to do anything. I could just set a timer on it, but that is too much of a hack.

"I'm not sure if the encode launch will work, again it may need a query tweak."

From a quick look at the code, I'm thinking the same problem from the scanning might apply. I read somewhere that the problem might be with the size of the kernel buffer and can be worked around by using threads. Too bad I'm a VB.net programmer and not a C# guy.
saintdev
Enlightened
Posts: 146
Joined: Wed Dec 20, 2006 4:17 am

Post by saintdev »

th3rmite wrote:@sr55

"The scanning for sure won't work. The query to launch the CLI will need to be changed."

That's for sure. I just spent the last two and a half hours hacking on it. I change some params and got it to scan the DVD, the problem is that HandBrakeCLI is returning the output on stderr instead of stdout and for some reason WaitForExit () doesn't seem to do anything. I could just set a timer on it, but that is too much of a hack.
Mono doesn't yet support some of the things that the WinGUI is doing to handle the output from the CLI. The functions are there, but don't do anything yet.

As for the QT GUI, yes it's in svn. IIRC, most of the necessary widgets are there, however none of the backend work has been done. So it's basically a shell that does nothing.
th3rmite
Posts: 27
Joined: Sun Sep 16, 2007 6:27 pm

I did it!

Post by th3rmite »

Well somewhat. I hacked two files from the C# Windows build and have managed to get a non-encrypted dvd to start ripping. Although it's running slowly and the status window isn't working.

I think it won't be too long before I have a patched version running. Should I keep posting my status here?
th3rmite
Posts: 27
Joined: Sun Sep 16, 2007 6:27 pm

TODO

Post by th3rmite »

I am just about done with the hacks (why the heck does HandBrakeCLI output on stderr?), although I have a small todo list which should take me just a few days to finish, mainly polishing the app to fit more into the linux environment:

Queue Doesn't Work Right
- It works, just not the status bar.

Exiting doesn't stop encoding
- It continues to run in the background and you end up having to kill the process

Make the status work (lower left corner not working right)
- I think it's the work around I did to get the app working, but I'm pretty sure right now HB can't know if the thread is still running. Thus a user could accidentally start a new HB thread for the same disk

Check for updates is broken
- Because this is a custom configuration, I'm going to disable this anyways.

Display is ugly
- I think this is mainly due to mono's winforms support (which btw is very new), but I'm going to try different settings and play around with winforms, ultimately it would be nice to move to gtk#, but I'm having a hard time learning how to interact with gtk.


If anyone wants to check out my code, I can post it, it's not the best due to this being the first C# endeavor.
Image
th3rmite
Posts: 27
Joined: Sun Sep 16, 2007 6:27 pm

Post by th3rmite »

I successfully ripped Conair last night under Linux with the GUI. If anyone would like to help me systematically find out what needs to be fixed please let me know.
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Post by s55 »

@th3rmite - It would be fantastic if you could post diff's for the files you've modified. I may be able to incorporate the changes with a simple, Select Operating System option.
saintdev
Enlightened
Posts: 146
Joined: Wed Dec 20, 2006 4:17 am

Post by saintdev »

sr55 wrote:@th3rmite - It would be fantastic if you could post diff's for the files you've modified. I may be able to incorporate the changes with a simple, Select Operating System option.
Personally I would prefer more effort going into the QT GUI, or reviving the GTK GUI. As these can interface directly with libhb. The only reason that the Win GUI acts as a wrapper to the CLI is because we can't get a usable dll when compiling with Cygwin.
th3rmite
Posts: 27
Joined: Sun Sep 16, 2007 6:27 pm

Post by th3rmite »

@sr55: in the last day or so, I somewhat cloned the WinForm UI in gtk#. I'm working on porting over the code before I do anymore mods to it. It should go fairly quickly because C# support on linux is pretty good now.

@saintdev: I'm not much of a programmer and don't even know how to bind to libhb.

But I do know VB.Net and am quickly learning C#.
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Post by s55 »

FYI th3rmite, there is already a GTK gui in the SVN (although you'll need to go back a good few hundred rev's to just before it was removed. You may find some of the code in it helpful.
th3rmite
Posts: 27
Joined: Sun Sep 16, 2007 6:27 pm

Finished

Post by th3rmite »

I've finished with the mods to the WinGui code to make it cross compatible on Linux/Unix with mono 1.2.5.

I submitted my code to sr55 for review.

I might say that it works flawlessly with encrypted and non encrypted DVD's on Ubuntu Feisty and ways in at around 444K.

Hopefully he won't find anything wrong with the code to prevent it being merged with the source.

Big thanks to the HandBrake Dev Team!!!
th3rmite
Posts: 27
Joined: Sun Sep 16, 2007 6:27 pm

Picture

Post by th3rmite »

Here's a picture of it running:

System: Ubuntu Feisty
mono: version 1.2.5

Image
one01
Posts: 7
Joined: Thu Jan 11, 2007 3:18 am

Post by one01 »

I've been spending some time on getting the Qt user interface to build again.

In the qt4 directory,

Replace the contents of qtHB.pro with the following:

Code: Select all

######################################################################
# Automatically generated by qmake (2.01a) Sat Oct 14 04:46:08 2006
######################################################################

TEMPLATE = app
TARGET = qtHB
CONFIG += qdbus release
DEPENDPATH += .
INCLUDEPATH += . ../libhb ../contrib/include
LIBS += ../libhb/libhb.a ../contrib/lib/liba52.a ../contrib/lib/libavformat.a ../contrib/lib/libavcodec.a ../contrib/lib/libavutil.a ../contrib/lib/libdca.a ../contrib/lib/libdvdread.a ../contrib/lib/libdvdcss.a ../contrib/lib/libmp4v2.a ../contrib/lib/libfaac.a ../contrib/lib/libmp3lame.a ../contrib/lib/libmpeg2.a ../contrib/lib/libvorbis.a ../contrib/lib/libvorbisenc.a ../contrib/lib/libogg.a ../contrib/lib/libsamplerate.a ../contrib/lib/libx264.a ../contrib/lib/libxvidcore.a ../contrib/lib/libmkv.a ../contrib/lib/libswscale.a -lz -lpthread


# Input
HEADERS += qhandbrake.h scanwidget.h encodewidget.h qhandbrakewizard.h faderwidget.h
FORMS   += scanwidget.ui encodewidget.ui
SOURCES += main.cpp qhandbrake.cpp scanwidget.cpp encodewidget.cpp qhandbrakewizard.cpp faderwidget.cpp
Run qmake to generate the Makefile
Run make.

If someone on the HandBrake development team could update qtHB.pro and commit it to subversion that would be great.
Locked