XombieSub - Video Subtitling Tool

Developed or developing a new product in PureBasic? Tell the world about it.
Xombie
Addict
Addict
Posts: 898
Joined: Thu Jul 01, 2004 2:51 am
Location: Tacoma, WA
Contact:

XombieSub - Video Subtitling Tool

Post by Xombie »

Let me give you a slighly boring explanation of why I got into PureBasic.

But first, I'm finally "releasing" this program. In fact, there's been a version to download since January 1st but I was asked not to mention it here since it was using the as yet unannounced PB 4 Beta compiler.

I originally created this program in Visual Basic about ... what? 4 years ago or so. To help with subtitling anime. The only other program out at the time was SubStation Alpha. It was clunky to me and I wanted to try and make something better. So I did. Fully graphed audio and video displayed at the same time. It was great. I had users from France, Germany, Russia, Japan, Spain, Italy, etc... In fact, I still get the occasional emails from them regarding the old version. You can even do a Google search for "XombieSub" and see who is using it.

But, it was a dinosaur. I had added so much stuff without a plan that it had become nearly impossible to make it better. So I started from scratch. Still in VB6. That didn't go far. I briefly tried VB.NET but abandoned it quickly. And then for a long time, nothing. Then, something like 2 years ago, I found PureBasic (in fact, almost exactly two years ago this month).

XombieSub was born again. Although it almost wasn't. If PureBasic did not have such a great community, XombieSub would not be working today. zapman*'s audio code was what really got me off the ground again. I had a basic framework of the program but the most important part was missing. I had to be able to graph a wav file so that the user could make selections against the video's audio. So, I spent quite a while modifying his code to get what I needed. Highly modified. Uncompressed wav files for a 25 minute episode can be around 250 mb. zapman's original code loaded the whole file into memory and only displayed a single audio channel. He also used MDI windows for the waveform and several other things that just weren't needed and couldn't be used. I ripped it apart and examined how everything worked. Then I rebuilt it. I'm not afraid to say that without his code, I wouldn't have figured it out. I spent a lot of time trying to understand how wav files could be deciphered and displayed. And then finally, I got it. Using an image instead of windows, "compressing" the 250 mb audio down into 5-10 mb and adding in everything I needed. I was so happy. That was when I finally realized I could do it. I didn't need to depend on activex objects from 3rd parties. I could do everything internal.

I owe a lot to PureBasic and it's community. Fred has been an exceptional person to deal with. I was shocked when he actually talked to me for the first time in the IRC channel. As silly as that sounds, think about how many other language developers will take the time to actually help you through some problems. And he helped a lot. And not just Fred but the whole community. The amount of helpful people and huge amount of example code floating around was extremely helpful. I learned so much. Before I started playing around with PB, I had no idea about the Windows API, memory usage, pointers, ASM and several other things. PB has trained me and taught me many basic (no pun intended) things that have increased my general programming knowledge greatly. I look at my old code and my recent code and the difference is amazing.

So, first and foremost, thanks to Fred. You and your excellent language have helped me in more ways than one. Being able to complete XombieSub is just one of them. For me, working with PureBasic has been an instructional experience. Reading the forum posts and talking to the users has taught me so much about programming. I'm thankful.

Now on to XombieSub. This is extremely beta. There's a huge amount of code (I believe 20,000+ lines) and large parts of it have still not been well tested. A lot of features are still not complete. This is very much a work in progress.

The basic idea is that you have a video file. Currently only avi is supported. Now, you take some program like VirtualDub and you extract the uncompressed wav file from the video. You open both of those with XombieSub and you're ready to start "timing". In this case you would make selections on the audio, type in some text and save the line. You can also import a plain text translated script and then time those lines individually. As you're making selections on the audio, you should notice the video changes to keep up to the most current selection. Also, you may notice red vertical lines in the audio. These mark key frames from the video and are usually for scene changes. This makes it easy to end a particular line before the next scene begins.

There's a wealth of other options but, honestly, I don't see too many people here using the program. I mainly just wanted to say, hey, look - the program that originally got me started on PB is done.

And, I dunno, maybe Fred can add this screenshot...

http://www.seijin.net/Images/video.png

...to the "applications" section of the PB website. I think it's quite nice.

I will eventually work up some kind of documentation for the program. Most likely after a few more versions when it's much more stable. Working on this has been a love/hate relationship. It's an old program that I'm very proud of so I love it but it sucks up so much time that I kind of hate it. There are a lot of people that were waiting for this new version and I feel pressure from them because it's taken so long.

Also, there will never be a code release for this program. Sorry. However, a lot of my code snippets that I post here in the forum are because of XombieSub. I'd say 80% of them :) So I kind of did release a lot of the code for it. Just not in an cohesive form.

Anyway, the main project is on my website at http://www.seijin.net

Just keep in mind that it will probably crash on you and/or you will probably be confused and lost as to what something does.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Great story. Well done there.

I wish you well with this. 8)
I may look like a mule, but I'm not a complete ass.
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

Looks very impressive and based on the code snippets you've posted in the forums, I'm sure it's well done.

You're right on about the PB community. Without it I would probably have given up long ago. And Fred? Yes, there aren't too many like him :)

I hope your new program is extremely popular so I can obtain english subtitles for all the japanese anime my kids like :D

cheers
Bonne_den_kule
Addict
Addict
Posts: 841
Joined: Mon Jun 07, 2004 7:10 pm

Post by Bonne_den_kule »

Impressive work.
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

@Xombie:
screenshot looks very amazing and professional. i only taked a fast look to your program and there is one thing i dont like (sorry)... your filerequesters... why dont use the standard filerequesters everybody know instead an own styled requester? Anyway nice work! ;)
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Pantcho!!
Enthusiast
Enthusiast
Posts: 538
Joined: Tue Feb 24, 2004 3:43 am
Location: Israel
Contact:

Post by Pantcho!! »

Xombie, Awesome story , and yes i must confess i also have my own love/hate project but it is still on a little hate so it is not ready yet ;)

And yes i agree on 100% this is the best supporting community ever and it is very special that purebasic team is available and welcomes all of our questions.

Will take your 'XombieSub' as a must editing tool for my needs, i remembered also when i started with purebasic i tried to make a .sub displayer on the PB movie player that came with advanced examples (i know its diffrent from your application but it is realted ) :lol:

Great Work :!:
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Cool program Xombie!... omg I just realized that this is my 1000th post =P

Joyous.

Its like a measure of how much of a life you don't have :lol:
Xombie
Addict
Addict
Posts: 898
Joined: Thu Jul 01, 2004 2:51 am
Location: Tacoma, WA
Contact:

Post by Xombie »

Thanks to everyone for the kind words. I wasn't sure whether I should post the program here. Although it's made with PB, I'm not releasing the code and I didn't think there'd be much interest in it here. But it was a very large itch that I had to scratch so... there it is :)
va!n wrote:@Xombie:
screenshot looks very amazing and professional. i only taked a fast look to your program and there is one thing i dont like (sorry)... your filerequesters... why dont use the standard filerequesters everybody know instead an own styled requester? Anyway nice work! :wink:
Well, because it makes loading scripts/audio/video files much much easier if I give the users the loading/saving options immediately at the window. I wrestled with how to make something like this in VB and ended up using the plain file requester from VB. It wasn't as elegant as giving the options immediately. It's convient, for example, to prevent the audio file named in the script from loading just by checking the option from the load window.

@Pantcho!! - Hey man :) Sorry I missed you on IRC. I lately don't have a lot of time to use my own computer :cry: I need to make the purpose of the program more clear. It's a script editor, not video editor. It can load/save subtitle scripts but not physically modify the video to hard code the subtitles. Originally created for my anime subtitling group and only for creating soft subs. However, I've also had people use it just for karaoke style text as it has a karaoke editing feature. The program makes extensive use of the TextSub filter from Gabest (I think it's been renamed to vsfilter these days) and includes a lot of the commands from the filter - including the karaoke stuff.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

Took a fast look at it looks quite good :)
Straker
Enthusiast
Enthusiast
Posts: 701
Joined: Wed Apr 13, 2005 10:45 pm
Location: Idaho, USA

Post by Straker »

Very impressive as always Xombie.
Image Image
Post Reply