§ ¶Linux and me
I mentioned in my last post that I was downloading Mandrake Linux. The reason why I'm doing so is that I want to check out the issues with VirtualDub's DirectX display code and recent releases of WINE. Users are reporting full-screen blackouts, which indicates to me that the DirectDrawClipper is hosed. Some of the bug reports on other DirectDraw-capable programs imply that this is a WINE problem, but WINE has exposed bugs in my code before so I'm willing to find out. I downloaded Fedora Core 3 yesterday, but found out that it doesn't run properly under Virtual PC 2004; after I installed it and rebooted, every process launched by init basically died and got suspended for cycling, so I couldn't do anything.
It's been a loooong time since I last used Linux. The first time I used it, I had installed Slackware 3.0. Slackware is basically the hardcore Linux installation; it was broken apart into floppies, used .tar.gz for its package format, and had a relatively simple (and clean) startup configuration. The installation was a bit rough though because you had to carefully choose the right boot/root floppies -- which took forever to write because RAWRITE 1.2 did a sector at a time. Then during the install, you had to hold down the down arrow key for five minutes while waiting for the installer to scroll all the way down to US/Pacific for the timezone (they later moved US/Pacific up to the top in a later release) and select a subset of disk set A that didn't install too much junk but could still boot. Then you realize that disk set A doesn't have the man pages.
Ah yes, I remember Linux like it was yesterday....
Avery's Linux story, a.k.a. Why Windows Programmers Should Never Be Allowed Around Linux Systems:
I made a number of mistakes in my earlier Linux installations. The first mistake was believing the installer when it said that 1 inode per 1024 bytes is a good idea if you have a lot of small files. Inodes are basically directory entries; you need one per file or directory. Unlike NTFS, though, Linux's ext2fs doesn't allow you to temporarily reuse inode space for files, so any space reserved for inodes is unusable for data. 1 inode per 1K is insane and wastes a ridiculous amount of space. I later reformatted my drive with 1 inode per 16K and still had way too many inodes. I also allocated separate 512MB partitions for /usr and /var, until I realized that most install scripts treat /usr as /junk and that it should be given a lot more of the space unless you're running a news server.
My second mistake was to try to move a bunch of files to the current directory by typing "mv ~/stuff/*"; this works fine in DOS/Windows with the "move" command. It does something else on Linux.
I quickly figured out that ESC :q! is a better way to exit vi than Ctrl+Z followed by kill -9, the "pico" screen editor is in disk set N, and when the terminal gets kicked into graphics mode, there are five more terminals available before it's time to reboot. Also, always check that a tar archive actually contains a subdirectory within it before extracting it.
The third mistake I made was to compile a new kernel, move it to /vmlinuz, and reboot without re-running LILO. Hey, why'd the dots stop during the boot?
The fourth mistake I made was accidentally deleting the C runtime library (libc.so.5) while logged in as root. Unlike Windows, Linux allows you to delete a file that is in use; the file is unlinked but remains allocated until unused, so you can delete libc.so.5 even though every program on the hard disk needs it. Whoops, I shouldn't have done that; better restore it from the install media. Hmm, I can't change cd because cd needs libc. In fact, I can't run anything. Maybe I should reboot with the rescue disk. Umm, Ctrl+Alt+Del doesn't work because shutdown can't run. Maybe I should sync the disk and hard reset the machine. Okay, I can't run sync either. I guess I'll be running fsck then after I fix the system.
The fifth mistake I made was to try to run X. I was doing OK with XF86Config up until it asked me what RAMDAC chip I had on my video card, for which I had no idea. After that ran I tried launching X Windows by running X11/bin/X, which only gave me a X mouse cursor on top of a pattern. Eventually I discovered startx and chose fvwm95-2 as my window manager, turning X into a bad imitation of Windows 95 and making it suitable for scaring other Linux users. After examining a few programs that used the Xaw library for widgets, I concluded that the "Xaw" stood for "Xawful." (It's actually the Athena widget set.)
I eventually learned Linux well enough to create and maintain cablemodel NATing router for a LAN, long before the convenient firewall+router boxes became common. I secured the box primarily by making it really boring and running nothing on it. Since then, Linux has gotten a lot nicer; Fedora Core 3 has a nice GUI installer that puts Linux installation in the same ballpark of ease as Windows. I was amused when anaconda spit out a bunch of errors to the console before launching X, though. It turned out to be a bad DVD burn, which I rectified by mounting the original in Daemon Tools. I love Virtual PC. We'll see after I finish downloading and installing Mandrake Linux whether I'll be able to log in this time.
Occasionally I get asked whether I'll ever do a Linux port of VirtualDub. Honestly, at this point, the answer is probably no. The framework parts of the codebase have already been rewritten to be portable or easy to port; the video/audio handling and the UI are the parts that are tough, and I have no experience with the A/V or UI libraries on Linux; indeed, I have no experience writing any sizeable code on that platform. The biggest problem, though, is that I simply don't have the time. If anyone wants to try it I'd be glad to explain what I can and look into ways of changing the codebase to be more portable, but whoever tries needs to be willing to put some serious time into porting a codebase that is 5.8MB in size. It's a lot more fun, in general, to write something new than just use someone else's code. Ironically, this is actually why I'm still working on VirtualDub.
Just in case you find the time and motivation: Take a look at wxwidgets. It should help a lot to make aps portable.
Prakash Punnoor - 13 02 05 - 17:55
Also Qt would have been a choice if trolltech hadn't the silly windows licensing method.
rmore - 15 02 05 - 08:27
Well, the combo would be WXwidgets and SDL.
Both run perfectly under Windows, Linux and Mac.
I guess the big problem would be the Directshow part, cause I don't know if there is any multiplatform equivalent for it.
morsa - 15 02 05 - 18:03
I don't really know about WXwidgets; I know that GTK+ 2.4 does have a Windows port though (and I'm pretty sure MacOS X has one, too) used by The GIMP and GAIM at least.
As for a DirectDraw equivalent, you can't really say there is one, as Linux uses a different way to access the graphics hardware than the way used in Windows. Since I've read rumours that DirectDraw is becoming obsolete in favour of rendering to textures using Direct3D (on that very same webpage, if I'm not mistaken), however, I'd say OpenGL might be the way to go. That would be troublesome if Ati don't clean their act on OpenGL support, though.
Mitch74 - 16 02 05 - 05:52
About Qt, it seems next version, Qt4, will have a free alternative on windows (free as in "Free while your code is not for commercial use", so GPL programs are ok with it). Didn't bother checking how similar the windows version of it will be in terms of licensing.
More about it here: http://www.trolltech.com/newsroom/announ..
I personally prefer Qt to GTK. But that's just a matter of looks. Anything that runs in linux will be welcome. ;)
If I were to start one today I'd probably use wxw, though. Already runs on all major platforms (with a license that's ok with F/OSS software in all platforms) and is stable enough to be used in a large scale project. Or so it seems.
UI part not being a problem, if one of those options (wxWidgets, GTK or, possibly, Qt4) is used, there's still the A/V part.
For that, one interesting option might be GStreamer. Also runs on linux, BSDs (including Mac OS X, with native sinks for it) and even (apparently) windows. :D
It doesn't have native sinks for windows, though. (I bothered looking at its code, and I don't think anyone with some experience in programming in windows would have too much trouble writing those.)
(Sinks are what they use to call the elements that receive data. In this case I'm refering to the final sink elements, that output data. Don't know how that's called in other platforms/libs.)
Don't know how advanced GStreamer's development is at this point, or if it'd be a good choice, for that matter, but you could give it a try with yout newly installed linux. ^^;
Btw, if you need any links: http://gstreamer.freedesktop.org/
Anyway, as for now, I'm left with wine, whenever I need to run VirtualDub. :(
nich - 17 02 05 - 09:29
"first try" linux user should donwload Ubuntu linux (http://ubuntulinux.org
) , you will be very surprised to see All the nice work put in , how a "linux" can be a "system for normal people" when smart guy knows what is a normal user.
old users of linux who suffered under redhat 5, slackware, debian potato or whatever will discover a real new world without mad questions.
of course, there are still works to do, but, all the bases are covered.
for developpers stuff : GStreamer is the future for opensource multimedia frameworks. there are works _now_ to make it useable on windows. in time, it will be a nice and decent framework to do multimedia portable applications (opensource or closed one, without price to pay)
widgets stuff : qt, gtk, wxwidget are all nice choice to do a windows/linux software. Gtk has made many progress (native windows look and all), QT is the path for C++ lovers)
michel - 17 02 05 - 11:19
For other linux fans out there, VirtualDUB equivalent under Linux :
- almost a VirtualDub clone
- much more distant video editing tools (featured on the http://www.dynebolic.org
Besides GStreamer, other video stream frameworks :
- The xine-lin part provide decoding (but not encoding) capabilities
Page with some multimedia links : http://www.linuxartist.org/video-anim.ht..
DrYak (link) - 17 02 05 - 13:53
Thing is basicaly not so difficult.
A simple migration from DirectX---> SDL and a UI under WXwidgets will end all the possible migration problems.One source code for any platform.
About the DirectSHOW and VFW stuff (which are the core of Vdub) I have my concerns cause there isn't anything available for Linux which can be use under Windows easily and fast.
If we had anything simillar to SDL but for Video and codecs management the problem could be solved.Till then....
Morsa - 18 02 05 - 00:01
wxWidgets also has a class for accessing OpenGL in a quite comfortable way ... when someone tries to use the texture mapping for showing video data ...
Personally, I believe that wxWidgets + GStreamer + SDL might be the best solution. I prefer wxWidgets over QT because you need additional tools to preprocess the sources (for using events) in QT.
I don't have experience with GTK but I think it's not supporting something like MDI windows (in a cross-platform compatible way).
All of my projects rely on wxWidgets because it's well maintained, well documented and working very well (stable).
Mark Junker - 19 02 05 - 12:10
Your first experiences with Linux sound exactly like my first experiences with Linux. Ha, that's great. I started using Linux with the very first Redhat Mother's Day Release back in 1995. I started with a 486, a couple of hundred page book, and a lot of nothing working much at all. Now, in 2005 I run multiple corporate Linux servers, corporate workstation running Linux, one home computer running Linux, and I work some Linux consulting on the side. The new versions of Linux are NOTHING like the original releases of Linux. I would not run ANYTHING in VirtualPC, that program is garbage.
What you should do is just go to http://www.pricewatch.com
and buy yourself a 40GB HDD for $20 and install Linux in a dual boot environment. And for a home/workstation PC, don't bother with complicated partitioning schemes. With Mandrake simply use the manual partitioning tool during the graphical install to make a 1GB (or larger depending on your needs) SWAP partition and make everything else on the entire drive the / partition. Simple and effective for a home/workstation installation.
Personally, I do a lot of programming in Java, and since reading this article of yours I have gotten the thought again of trying to create a VirtualDub in Java. That would be nice and portable.
Ryan La Mothe (link) - 21 02 05 - 17:55
(This isn't strictly VirtualDub related, but....) I totally empathize with the first Linux experience. I first ran Linux in high school many moons ago. That was a Slackware distro, way back in 1994. I used it for a few years on a dual boot basis (couldn't afford multiple machines), but it was too annoying to use for a primary OS: Good for hacking POSIX code, but not much else because the UI sucked! Device driver support was lame, too. I got nailed with the LILO thing after rebuilding a new kernel, too! XFree86 was a mess to set up, and I even had a video card that was supported. So Linux eventually disappeared from my systems. After having been stuck in Windows-land for long a while, with occasional Unix use peppered in (I've run Red Hat, Mandrake, and Knoppix, plus had to use HP-UX in college, and installing Linux on my Xbox...), I finally got fed up and bought a Mac. OS X is nice, although it has its problems. Still, the Mach microkernel is a better architecture than Linux, in general. At least I have a *nix with a pretty UI now. Ah well, no matter what the OS, the computing experience still sucks compared to what it should be. Too bad no one with real vision has been successful at improving architectures in general.
P.S. The preview comment button didn't work so well for me, at least with Firefox....
Gerad Welch (link) - 26 02 05 - 10:18
I recommend to try out a debian based distribution.
Most of the rpm based distributions are harder to maintain and to update.
There is an excellent bootcd named kanotix which is based on knoppix and debian.
Simply put the cd in, boot, try out and if you like it "sudo kanotix-installer-latest-web".
Ubuntu is for the users, what debian (itself) is for admins.
Good comunity, better support and the ability to outdo most of the other distros in a year or two.
Debian (itself) is harder to install and configure, but it is the sturdiest. The installer does not look very nice but it is nearly bugfree and works on more than 10 architectures...
To have a debian/linux which looks like windows "Xandros" is the best choice. It does what lindoes/linspire tries to to.
I for myself use debian/sarge on my server and kanotix on laptop and pc.
The qt-license is not bad anymore.
Now qt is GPL on linux AND windows for non comercial use.
If you want to earn money with a closed source application, you have to pay trolltech, but that is not a problem with virtualdub...
Per Hansen (link) - 03 03 05 - 08:24
I agree with Ryan La Motheís assessment with Virtual PC. Ever since Microsoft took over (version 2004+), they just donít work well with Linux anymore. They claim theyíre not supporting Linux anymore (as in any problems related to Linux will not be solved), but it just feels more and more like theyíre deliberately making it not support Linux (as in not run X anymore, which is what Iím getting). If youíre still a VPC fan, use the one by Connectix.
Anyway, another good virtual machine solution is VMWare. I donít quite like their 2 virtual network cards installed, but itís the best thing for using the latest version of any Linux distribution. Old Linux can run on bochs (on SourceForge).
Vincent Chan - 16 03 05 - 23:47
Ok, i have understood that Avery doesnt like Linux,
The fact is that Linux doesnt like itself,
if it was ever been an alternative, now it would be.
So we should still write a real alternative to windoze before to write the media applications for it.
movmasty - 24 05 05 - 03:27
I have used this successfuly with wine, which I update from CVS (on mandrake 10.0 -10.2)
But on update of Virtualdub from version 1.5.4 to 1.6.5 the screen goes black as soon as the video file is loaded - works ok, but you are fumbling in the dark :-)
Might be a different handling of display in later version?
As I use this for simplest operations, increase framerate, fix brightness and contrast on short videos from my Canon Digital camera. I can stick with the older version or wait for wine to become better. It is getting better all the time and, as I enjoy emulators I always give them a try now and then, although I do not use Windows regularily any more - see pointers for alternative software for Linux.
But, then again I suppose any help that you can give those guys makes it better.
But please give (Mandrake) Linux a try once more :-). A LOT has changed since the days back of slackware times. As suggested, New harddisk/dualboot or vmware might do the trick.
Pjetur - 02 06 05 - 14:11
Have you seen Gentoo Linux?
Maybe you like it.
Agent Smith (link) - 14 01 06 - 08:45
Yikes; some of these Linux distros are too hardcore even for a Windows programmer... Try developping VirtualDub under a Linux that just works out of the box with no hassles. Xandros would be a good development platform for Windows programmers, as it even makes installing development tools a snap, so you don't have to go hunting for these.
Xandros is worth the money that http://www.xandros.com
charges for it, as it's even easier to setup than Windows XP; however, if you don't want to pay any money for it, you could download Xandros OCE 3 for free; however, Xandros OCE 4 should be comming out anytime now with a free trial version of Crossover Office/Linux.
And if your nervous about installing Xandros/Linux on your hard-drive then use the free VMWare Server in Windows to do it in a controlled enviornment. http://www.vmware.com/products/server/
Al Dube - 14 01 07 - 17:48
Fedora has come a long way since Fedora Core 3. With Fedora 8, much of the problems in FC3 and earlier has been taken care of. Fedora 8 releases on November 8.
For making the UI elements workable on Linux, I suggest either GTK+ or wxWidgets, because wxWidgets allows you to have a native look on Windows and Mac OS X while having a GTK+ look on Linux.
For your A/V issues, you can use GStreamer on Windows, Linux, and Mac OS X. Though for Windows an installer would be required, and probably for Mac OS X too. AFAIK, GStreamer does not yet have the ability to plug into the VCM/ACM system, but it is possible for GStreamer to read Win32 codecs through the gstreamer-pitfdll plugin.
King InuYasha (link) - 25 10 07 - 19:10
sorry my english is not good,
You must give Ubuntu linux a try !!
its a very easy linux, you can install all what you need with one simple command "sudo apt-get install name-of-prog"
i realy hope one day to enter this command in my terminal :-)
sudo aptr-get install virtualdub
have a nice try and a lucky day
Denic Milan - 06 11 08 - 19:16
In response to the comment by Gerad Welch:
This is exactly the problem I'm seeing with things being improved upon and such. People say "This could be fixed, this
could be improved. That
could be better and this should be this
way." But no one actually does
anything. They just say "they"
should do this or that, or "someone"
should fix this. And when all those "they"s and "someone"s say the same thing... well guess what.
And I understand not actually fixing the problems yourself, either because of time or because you just don't have the ability, but that doesn't mean you should do nothing
. One could at least report the bugs! And actually give
those suggestions and explanations to the people in charge of the project, instead of just keeping it to yourself or telling more people who can't/aren't going to do anything. And if one does have the time and ability, then by all means
one should take those ideas and implement them
! Instead of wasting them and letting them die away in the back of the mind.
I, in fact, got so tired of doing just that, that I've started into programming and am now implementing all those ideas and "better ways" that I came up with. It's a terrible waste to let ideas just die, when the least you could do is pass them on to someone who could really use them.
Sorry for going off topic with this ramble of mine, but it's been eating at me for a while and I had to get it out somewhere. Thanks for reading.
Ryan C - 19 03 09 - 17:35
Well, from my point of view, it would be enough, if Virtualdub works with wine. It should not be a big problem to develop it with this in mind a with each release tell us that it works with wine version X.y - W.y; that should be enough as wine is available for vast number of platforms.
dejf (link) - 10 09 09 - 23:48
You should try a modern distribution. They are much friendlier than they was in 2005 when you wrote this article. Give it a try and you will see.
Gábor Molnár - 14 11 09 - 20:59
As the man above has writen Linux really has come of age for not very tecky people such as myself. I put on Ubuntu for my mother who is in her late seventies and only wants to use applications, because I was tired of having to mend her windows system every couple of weeks, and she found her way around it in minets. I read that over ten thousand people are working on Ubuntu development so maybe if you were to post in the forums that you are the author of VirtualDub and would be happy to have it ported over the chances are good that people would volunteer. I'm sure that I'm not the only one who remembers it with fondness as THE free video editor from the windows days. I'm getting it again for a windows using friend and will try it out myself on wine, now that xp is not supported and a few years have passed since most of the above posts maybe it will work, if it does I'll come back in a few days and say so. If it doesn't well there are the "virtual machines" such as Virtual Box in which it certainly will. Even though there are linux alternatives such as Kdenlive well.....haveing VirtualDub back on my system would be like the return of an old friend. While I'm here let me express my gratitude for all your work; for years your program was the only good video editor out there for people who couldn't afford the absurdly expensive commercial alternatives. Thank you.
Simon - 05 12 09 - 01:38
I would like to say you should try a debian based distro, also you should try doing /home as 90% of the HDD or space you want and the rest goes to / (root). I say this because you really don't need more than 10-15G for / (root) and this also allows you to re-use your /home and just format the partition that / is on. I've been trying to find the best and most user/friendly schemes I can think of but just having / and /home separate works well for almost everything. Just thought I'd point that out.
Dan A - 14 07 10 - 05:25
I know this is and old post, but well, I noticed someone asked if there's a Linux equivalent of DirectX. May I recommend checking out SDL, the Simple DirectMedia Layer? It was developed by Loki Games to ease porting Windows games to Linux, and big companies like Valve is currently using it to port Steam and it's games over to Linux.
David - 25 05 13 - 07:34
aw man, don't torture us any more. please oh please just use someone else's code and make it run on Linux. its 2013 for gods sake.
wally - 22 08 13 - 19:00
... and so year 2015 kicks in, and I'm still waiting patiently for the miracle to happen: a native linux VirtualDub, for Debian-based distros (Linux Mint comes to mind, Ubuntu sucks)... we shall never lose hope.
Jorge - 05 02 15 - 13:39
+1. Just came to check.
Very fond memories - 03 01 16 - 02:57