Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

PSP video resize scripts for PMP-Mod.

  • 18-03-2006 1:28am
    #1
    Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭


    I don't use the PSP for anything other than video and I haven't found decent / reliable software to automate it for me, so I've written 3 perl scripts to automate the following:

    1) resize bunches of .avi's using virtualdubmod
    2) rip the audio to correct mp3 format
    3) mux them into .pmp files for the psp

    I can post them up here if anyone wants, but I'm not sure anyone would be bothered with them (if you do like I do, they'll save you bunches of time).

    If anyone actually does want them. Shout and I'll get them up here.


Comments

  • Closed Accounts Posts: 599 ✭✭✭Cabelo


    I'd love them chief :) I'm desperate for some full-rez, non-UMD love ;)


  • Closed Accounts Posts: 1,680 ✭✭✭Skyuser


    You only use it for video? There are other products that do that with direct tv recording.


  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    Skyuser wrote:
    You only use it for video?

    More or less, yeah. I have used it for reading and listening to mp3's, but mostly I just watch an episode of this or that on the train on the way to work. The games quality is amazing, but I don't play single player games much, and they're a tad pricey.

    I'll stick up the scripts so...


  • Closed Accounts Posts: 599 ✭✭✭Cabelo


    more foolish Cabelo... ;)


  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    Bah. Ok, I can't attach them, and upload is a hassle, so copy and paste this into a file called "automate_avi.pl" (this is the most useful one IMO).

    To run it, (you need perl installed) open a command prompt and the command is:

    perl automate_avi.pl <path_to_original_avis> <path_to_save_to>

    (e.g. C:\avis C:\pmpmod)

    This script generates the avi without sound at 480x272 using a bicubic resize and 850Kbps which gives very nice quality on the PSP using PMPMod.

    I'll put the other scripts up tomorrow....knackered.
    use strict;
    my $tempfile = 'c:\\temp\\automate.vcf';
    my $virtualdubmod_path = '"\Program Files\virtualdubmod\VirtualDubMod.exe"';
    
    my $input_dir = $ARGV[0] || die "usage: perl automate_mp3.pl <input_dir> [output_dir]\n";
    my $output_dir = $ARGV[1] || $ARGV[0]; #default to input dir if no output dir specified
    
    opendir(DIR, $ARGV[0]) or die "couldn't open $ARGV[0] for reading.\n";
    my @filelist = readdir DIR;
    closedir DIR;
    $input_dir =~ s/\\/\\\\/g; #replace \ with \\ (e.g. C:\\temp)
    $output_dir =~ s/\\/\\\\/g; #replace \ with \\ (e.g. C:\\temp)
    
    open FILE, ">$tempfile";
    
    foreach my $file (@filelist)
    {
    	if ($file =~ m/(.+?)\.avi/i)
    	{
    		#make sure the output file doesn't already exist:
    		if (!(-f ($output_dir . "\\" . $file)))
    		{
    			print FILE "VirtualDub.Open(\"" . $input_dir . "\\\\" . $file . "\", 0, 0);\n";			
    			print FILE "VirtualDub.RemoveInputStreams();\n";
    			print FILE "VirtualDub.video.DeleteComments(1);\n";
    			print FILE "VirtualDub.video.AddComment(0x00000002,\"ISFT\",\"VirtualDubMod 1.5.10.1 (build 2366/release)\");\n";
    			print FILE "VirtualDub.video.AdjustChapters(1);\n";
    			print FILE "VirtualDub.video.SetDepth(24,24);\n";
    			print FILE "VirtualDub.video.SetMode(3);\n";
    			print FILE "VirtualDub.video.SetFrameRate(0,1);\n";
    			print FILE "VirtualDub.video.SetIVTC(0,0,-1,0);\n";
    			print FILE "VirtualDub.video.SetRange(0,0);\n";
    			print FILE "VirtualDub.video.SetCompression(0x64697678,0,10000,0);\n";
    			print FILE "VirtualDub.video.filters.Clear();\n";
    			print FILE "VirtualDub.video.filters.Add(\"resize\");\n";
    			print FILE "VirtualDub.video.filters.instance[0].Config(480,272,2);\n";
    			print FILE "VirtualDub.SaveAVI(\"" . $output_dir . "\\\\" . $file . "\");\n";
    			print FILE "VirtualDub.Close();\n";
    		}
    	}
    }
    
    close FILE;
    
    #now run the automation:
    system $virtualdubmod_path . ' /s"' . $tempfile . '"';
    

    I take no responsiblity for anything bad that happens to you as a result of using this script, though it should be pretty rock solid.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    Cabelo wrote:
    Dewd, I'm damned near positive the giant screen/deadly upcoming games appeal is there ;)

    :) Don't get me wrong. I was amazed at the quality of the graphics it can render. I'm just not a 1 person game player any more, and the train offers limited opportunity for multiplayer. :)

    Reruns of the new battlestar...now that's a different matter. :D


  • Closed Accounts Posts: 599 ✭✭✭Cabelo


    Jesus, another battlestar man. How do they manage? The thing is nearly 20 years older than most of its current fans. I bet someone's rolling in their grave over this... I bet it's the old Starbuck lad.


  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    Amazingly, it's fracking brilliant. It's defo worth shelling out for the miniseries (check play.com). If you're not hooked after that....well.....you just will be.

    I loved the original. Own it on dvd. But the new series really does it proud. </khannie>


Advertisement