Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 34

Thread: HJSplit User Guide

  1. #11
    Expert debsmouth's Avatar
    Join Date
    Apr 2007
    Posts
    329

    Default joining all hjsplit files in a folder on mac

    Hi

    Before you read any further, this is for joining hjsplit files on mac os x only, and you need to run it from the terminal.

    Not sure if this is any use to anyone, but I used to use hjsplit and click on each file one by one, but bored one night i wrote a script to run round my download folder, get all hjsplit files, join them and delete the hjsplit files.

    YYMV, and obviously if it deletes your hard drive, sets fire to your house, or kills your dog, i take no responsibility...

    Copy this into a file in your download folder (e.g. catall.sh), make it executable (chmod 777 catall.sh), then after a night of downloading, just run ./catall.sh and it will take care of all your files.

    There's probably a much neater and more sophisticated way of doing this, but this works for me. :-)

    HTH.

    catall.sh - don't copy this line :-)


    shopt -s nullglob
    for f1 in *.0??
    do
    new=`echo "$f1" | sed 's/ /_/g'`
    mv "$f1" "$new"
    done
    for f in *.001
    do
    name=${f%\.*}
    cat ${name}* > tmpfile
    mv tmpfile "$name"
    rm ${name}.0??
    echo "$name hjsplit files concatenated and deleted"
    echo " "
    done

  2. #12
    Virgin
    Join Date
    Sep 2006
    Posts
    9

    Post

    I use a similar script, but it copies all the parts into a folder called notNeeded/ so if anything goes wrong or you've missed a part, you can try again:


    Code:
    #!/usr/bin/perl
    
    #TODO: Make notNeeded folder if it does not exist
    my @FILES;
    
    opendir( DIR, "." );
    @FILES = readdir( DIR ); 
    closedir( DIR );
    
    foreach my $filename ( @FILES ) {
        if (($name,$num) = ($filename =~ /^(.+)\.00(\d)(:?\.mpg)$/)) {
    	if ( $#{$story{$name}} < 0 ) {
    	    $story{$name} = [];
    	}
    	${$story{$name}}[$num] = $filename;
        }
    }
    
    foreach my $name ( keys( %story ) ) {
        @nums = @{$story{$name}};
        $invalid = 0;
        $filenameList = '';
        for ( $n=1; $n<=$#nums; $n++ ) {
    	if ( $nums[$n] eq '' ) {
    	    $invalid = 1;
    	} else {
    	    $filenameList .= ' "'.$nums[$n].'"';
    	}
        }
        if ( $invalid != 1 ) {
    	system "echo \"$name 1 to ".$#nums."\"\n";
    	system "cat$filenameList > \"$name\"\n";
    	for ( $n=1; $n<=$#nums; $n++ ) {
    	    system "mv \"$nums[$n]\" notNeeded/\n";
    	}
        }
    }

  3. #13
    Beginner
    Join Date
    Jul 2006
    Posts
    61

    Default

    I am using a AppleScript-Script that I have written. It is rather dirty but works stable and fast and does not cost you a single dollar and you don't have to deal with the terminal/bash if you are afraid of it (which is quiet common).

    It joins the files dropped onto it (very handy if you put the script in the upper bar of your finder window) and corrects the weird .avi.mpg extension from the files that have it.

    Simply copy this code into a new AppleScript-document and save it as a program.

    Code:
    on open fileList
    	set concatFileList to {}
    	set renameFileList to {}
    	tell application "Finder"
    		repeat with aFile in fileList
    			set theFile to the quoted form of POSIX path of aFile
    			if theFile contains ".001" then
    				set the end of concatFileList to theFile
    			end if
    			if theFile contains ".avi.mpg" then
    				set the end of renameFileList to theFile
    			end if
    		end repeat
    	end tell
    	repeat with aFile in concatFileList
    		set filename to aFile
    		set tid to AppleScript's text item delimiters
    		set AppleScript's text item delimiters to ".001"
    		set newfilename to (text item 1 of filename) as text
    		set newfilename to newfilename & "'"
    		set AppleScript's text item delimiters to tid
    		do shell script "cat " & newfilename & ".0* > " & newfilename
    		do shell script "rm " & newfilename & ".0*"
    	end repeat
    	repeat with aFile in renameFileList
    		set filename to aFile
    		set tid to AppleScript's text item delimiters
    		set AppleScript's text item delimiters to ".mpg"
    		set newfilename to (text item 1 of filename) as text
    		set newfilename to newfilename & "'"
    		set AppleScript's text item delimiters to tid
    		do shell script "mv " & filename & " " & newfilename
    	end repeat
    end open
    Having done so, you now may drop as many split files onto the icon of the script at once and it will join them, removing the old files. Similar with the wrong extensions. As mentioned above I put this script into the upper bar of my finder window to have it ready every time.

    Questions?

    Greetings,
    TheObeBeyond

    I hope you can enjoy it.

  4. #14
    Expert mastadon77's Avatar
    Join Date
    Jan 2006
    Location
    Western Canada
    Posts
    553

    Default

    Just found a batch joiner for HJ files. Basically just run the "Join32.exe" in whatever directory you have your HJ files in and it will join all the videos automatically.

    Helps me out, hope it helps you.

    google "hj-join.zip"

  5. #15
    Virgin
    Join Date
    Nov 2011
    Posts
    17

    Default

    think i got this right..

  6. #16
    Virgin
    Join Date
    Dec 2011
    Posts
    13

    Default

    Beautiful, and they even have a *nix client.

  7. #17
    Bobby Coke
    Guest

    Default Thanks!

    Quote Originally Posted by mastadon77 View Post
    Just found a batch joiner for HJ files. Basically just run the "Join32.exe" in whatever directory you have your HJ files in and it will join all the videos automatically.

    Helps me out, hope it helps you.

    google "hj-join.zip"
    I'm a couple of months late with this, but better late than never...

    Just wanted to say thanks for that tip mastadon - I've been using this for the past couple of weeks and it's one of those things I now take for granted. Wouldn't be able to go back to the old way of joining each clip separately!

  8. #18
    Expert mastadon77's Avatar
    Join Date
    Jan 2006
    Location
    Western Canada
    Posts
    553

    Default

    Glad it helps you BC.

    I would have posted the exe file on here but I don't know how that would sit with people. exe=scary.

    Just wanted to get something out there to encourage more people to grab the hj clips on here. Some seriously good content is being missed out on.

    Cheers!

  9. #19
    Virgin Captain Ahab's Avatar
    Join Date
    Jan 2012
    Posts
    4

    Default

    thanks for the instructions!

  10. #20
    Registered User
    Join Date
    Jan 2008
    Posts
    3

    Default iPad?

    Anyone know if there is a way to join files while using an iPad? I've been looking but obviously no luck

    Thanks

Page 2 of 4 FirstFirst 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

BACK BY POPULAR DEMAND!



Sign up for a Platinum account



6 months at $70.00 will get you 2 months free, totalling 8 months.
Click to sign up!

12 months at $140.00 will get you 4 months free, totalling 16 months.
Click to sign up!



Please note: Once payment is made you need to send a private message to wicked and facialadmin at the forum, stating your username and the email address you used to pay. If you do not do this your upgrade will be delayed, the upgrade will be done within 12 hrs.

Close