Let's do a simple AHK project together: AVI joiner

started 6 months ago | 18 posts | 8581 views | topic rss | latest reply
  1. I've got a simple AHK project I've been meaning to get to, but haven't started yet. I often have lots of little AVI files (camcorder et al) that I want to join together into one file. Searching the web, the solutions I found are either commercial products or full-blown video editing solutions. Eventually I found the simple solution of a command line call to mencoder.exe (part of the open source mplayer package):

    mencoder -oac copy -ovc copy -idx -o output.avi video1.avi video2.avi video3.avi
    (credit: http://www.misterhowto.com/index.php?category=Computers&subcategory=Video&article=join_with_mencoder )

    So what we need is a simple GUI that will let us select files, reorder them, select the output file name, then run the right command line. For bonus points, we'll need to recognize if the resolution/codec of the input videos match, and if not, transcode first. Who wants to help?

    [Update]
    Here's the link to the download files... you'll want to grab AVI_Joiner.zip for the portable version, or grab the setup files if you want to install it.

    http://drop.io/tputvxe/blog


    #
    bobbo33
    Reputation:24
    Posted 6 months ago

  2. I would love to help but I am a total AHK newb, all I know is shortcuts and simple sends - but I'll keep an eye on the thread and pitch if I can - the idea of working together sounds fun, anyway - I like where your head's at.


    #
    Brady
    Reputation:75
    Posted 6 months ago

  3. I'm also a AHK newb, but I'd like to give it a try - so if it's ok, count me in


    #
    t0mt0m
    Reputation:26
    Posted 6 months ago

  4. @bobbo33: I'm not writing to say I can help (sorry, if I could only squeeze more time into the day), but this is definitely something I'd love to feature on Lifehacker once its released!


    #
    adampash
    Reputation:18
    Posted 6 months ago

  5. OK, since nobody jumped in to do it for me, here's the v0.1 prototype. Note that you have need mencoder.exe (available here, or with any mplayer installation; just copy mencoder.exe to the same directory as this script.

    OK guys, now that I've roughed it out, who's willing to test and polish?

    To do:
    * Error handling (e.g. if no files are selected)
    * Testing on other platforms (I only tried it on WinXP SP2)
    * Installer or distribution package that includes mencoder.exe
    * Resolution/bitrate/codec check of selected files

    Edit: I couldn't figure out how to attach my code to this post, so I created a drop.io link: http://drop.io/tputvxe#

    The code markup tag fails, because it's a special character that's part of the AHK code. I did add the attachment to this post, but I don't see a link to my attachment when a submit.

    Help us HowToGeek, how do we post code in this forum?

    Attachments

    • AVI_Joiner.ahk.txt (You need to login to download attachments.)

    #
    bobbo33
    Reputation:24
    Posted 6 months ago

  6. wow, bobbo33, you're really fast - I waited for a start sign from you to start coding :)
    ok, I can test the script with win7 (32bit, german) and also I can start writing an installer for the program. btw, what about making an exe out the ahk? I think it's easier to distribute, since the end-users do not have to have AHK installed.

    maybe we can clarify the up-/download situation... if it's ok, we can create an official repo either on github or bitbucket (whatever is preferd). Personally I'd like to go with bitbucket and the corresponding mercurial repo..


    #
    t0mt0m
    Reputation:26
    Posted 6 months ago

  7. OK, I stuck an EXE out there to try. Since the code's still so rough, my strategy was to only share the source code, so that only the more experienced AHK'ers would try it. But what the heck, let's throw this early EXE out there and see what happens.

    Maybe Adam will contain his excitement, and give us a little testing/refinement time before he features it on Lifehacker :)

    Also, let's wait to hear back from HowTo or Adam about where to store our code before we set up a different repository - this project isn't that complex, all we really need is for the attachment function on this forum to work.


    #
    bobbo33
    Reputation:24
    Posted 6 months ago

  8. At first I must say, that the joiner works "out-of-the-box". I had no trouble using it - good work, bobbo33!

    Ok, here is my first step :)

    I uploaded to the drop.io you mentioned above the following two files:
    avijoiner_setup.exe
    avijoiner_install.nsi

    I tested the installer on Win7 32bit and on a VM with WinXP SP2.

    It is really a rudimentary version of the installer but it's a starting point. I added some TODOs which I will implement later on (right now it's 1:15am and I'm getting tired) ;-)

    TODO: insert program in windows "add/remove programs"
    TODO: create a portable installation
    TODO: validate uninstall directory
    TODO: check license of mencoder if it can be distributed along with
    this installer
    TODO: if distribution is NOT possible, add possibility to download
    mencoder from the installer directly
    TODO: as long as no stable version of avi_joiner is released, add a
    warning page to the installer
    TODO: check, if mencoder is already installed on pc
    TODO: multilanguage installer (translators needed!)
    TODO: add detailed version information to installer exe

    DO NOT USE IT RIGHT NOW ON A PRODUCTIVE SYSTEM - IT'S ALPHA!!!

    @bobbo33: if we start now working together on this program, I think some sort of small "versioning" is helpful. Maybe someone else jumps in and wants to work also - someone has to take care who has done what.
    What about adding a small txt file with all the TODO's and make some sort of task management/bugtracking. The one who's doing a job should write his name behind the task, so that all others know that this task in "in-work".


    #
    t0mt0m
    Reputation:26
    Posted 6 months ago

  9. Hey guys... actually it's rather ironic, almost no languages use the backtick - except for AutoHotkey and Bash - the two languages that are most relevant for our two new sites.

    Anyway, we're going to implement our own Pastebin type of system shortly, because we clearly need one.


    #
    howtogeek
    Reputation:175
    Posted 6 months ago

  10. I didn't try out the installer yet, but I did just upload v0.2 with some bug fixes and enhancements:

    ; v0.2 2010-01-24 Add GuiDropFiles to enable drag-n-drop
    ;                 Bug fixes for deleting/clearing last item in list
    ;                 Error checking in RunJoiner for missing mencoder.exe, input files
    ;                 Added AppVersionString, AppHyperlink variables for easier updates
    ;                 Added pause at end of Mencoder.exe run (give user chance to view results)
    ;                 General commenting cleanup

    You can get the latest from the drop.io site: http://drop.io/tputvxe/chronological


    #
    bobbo33
    Reputation:24
    Posted 6 months ago

  11. OK, I created a zip file release package. All users need to do is unzip the contents to folder, and double-click AVI_Joiner.exe to run. Get the zip here: http://drop.io/tputvxe/chronological

    I also put in the necessary statements to distribute mencoder.exe; turns out it's simple since everything is licensed under GNU GPLv3.

    t0mt0m, thanks for your installer package; please update when you get a chance. Some users might like that over the simple zip file, so we should offer both.

    Adam, if you're still paying attention to this thread, go ahead and throw it out the Lifehackers and see what happens!

    (HowToGeek, the attachment function seems to be busted; I keep getting a "File not uploaded. Can't carry on a process." error message after the file hits 100%. We'll keep using drop.io in the meantime.)


    #
    bobbo33
    Reputation:24
    Posted 6 months ago

  12. Tomorrow morning (saturday, GMT+1) I can prepare the updated installer.

    @Adam: Please wait, until the installer is ready, if it is ok...


    #
    t0mt0m
    Reputation:26
    Posted 6 months ago

  13. ok, done - the new version of the installer and the script is uploaded!

    changes:

    # v0.0.2 2010-01-30 - tbass  - added latest version of avi_joiner.exe
    #                                       - added readme.txt file
    #                                       - added GPL v3 license file
    #					- removed mencoder distribution related TODOs

    The installations have been tested on a fresh WindowsXP SP2 and Windows7 (prof, 32bit).


    #
    t0mt0m
    Reputation:26
    Posted 6 months ago

  14. Posting this today on Lifehacker. Thanks for the awesome utility, everybody! It works really well.


    #
    adampash
    Reputation:18
    Posted 5 months ago

  15. like this idea. what about making it split vids as well...not sure how easy this is but it would be nice as well. will give this a try tonight.

    seems it can be done with mencoder

    http://www.misterhowto.com/index.php?category=Computers&subcategory=Video&article=trim_or_split_with_mencoder

    not sure how easy it would be to implement into this app don't know much about AHK at all...either way nice job.


    #
    Grondinm
    Reputation:1
    Posted 5 months ago

  16. Moved source code to GitHub: http://github.com/bobbo33/AVI_Joiner

    However, you can continue to post requests/discussion here.


    #
    bobbo33
    Reputation:24
    Posted 5 months ago

  17. I just get a black screen when playing video joined with this program, so I had to revert back to joining with VirtualDub. It's a shame, since this way is much more convenient.


    #
    pedram
    Reputation:1
    Posted 4 months ago

  18. If you're interested, I can design an iso installer.


    #
    calebstein
    Reputation:7
    Posted 4 months ago

You must log in to post.

Daily Email Updates

Just want the best posts in your inbox for free? Enter your name and email below:

Name:
Email

About This Topic

Our Network
About Productive Geek