Author Topic: Tweak Preusenet to use MultiPar or Par2+TBB?  (Read 12145 times)

Offline WarezMyGF

  • Contributor
  • ***
  • Posts: 21
Tweak Preusenet to use MultiPar or Par2+TBB?
« on: April 03, 2011, 12:57:41 AM »
Preusenet looks very promising, but it seems to be using an outdated par2 application. I only use it for Par2 creation and want maximum performance on my Quad core i7 920.  8)

Is there a way to be able to use Par2+TBB (http://chuchusoft.com/par2_tbb/index.html) or MultiPar (http://hp.vector.co.jp/authors/VA021385/)? These are optimized for multi core processors! I currently use MultiPar but it is becoming a hassle to manually create parsets for numerous releases even though it has a nice GUI. I need batch creation baby!

Appreciate any constructive feedback.

Offline WarezMyGF

  • Contributor
  • ***
  • Posts: 21
Re: Tweak Preusenet to use MultiPar or Par2+TBB?
« Reply #1 on: April 03, 2011, 01:10:48 AM »
Also, is there a way for this to work with W7?

Offline cr4zyfr4g

  • Global Moderator
  • *****
  • Posts: 781
  • German n00b
Re: Tweak Preusenet to use MultiPar or Par2+TBB?
« Reply #2 on: April 03, 2011, 01:21:31 AM »
I am not working on this script or using it for ages, but still the included par2 should be better than the once you say. It is extremly improved based on assembler par2 routines. However there is a newer version.

Get it here: http://paulhoule.com/phpar2/index.php

I am not sure what to chnage dor it to work for WIN7 and i am not gonna look into it. May someone else has figured it out by now. Feel free to post changes/updates/new version or anything

Offline WarezMyGF

  • Contributor
  • ***
  • Posts: 21
Re: Tweak Preusenet to use MultiPar or Par2+TBB?
« Reply #3 on: April 03, 2011, 01:27:55 AM »
Thanks for the quick feedback!

I will try my best to get it to work with Windows 7. I will post here with an updated version if I ever figure it out!

Offline WarezMyGF

  • Contributor
  • ***
  • Posts: 21
Re: Tweak Preusenet to use MultiPar or Par2+TBB?
« Reply #4 on: April 03, 2011, 04:55:43 AM »
I ended up just making a simple script that works under W7 x64. Maybe later someone can help me incorporate some parts of Preusenet?

Basically, I only post 720/1080 x264 stuff, so the rars/sfv are already made so only need to create pars. Thus I wanted 10% redundancy, block size of 1920000, parset to have the same name as the folder name and to create pars ONLY for rar files. (IE: Ignore .sfv, .nfo etc.). The par2 version I am using is phpar2 for now. I will later do a comparison test to see which is fastest between MultiPar (Based off phpar2), phpar2 and par2 TBB.

Script Code:

Code: [Select]
FOR /R %%g IN (.) DO C:\Par2\par2.exe c -s1920000 -r10 -l "%%g\%%~ng.par2" "%%g\*.r*"
del /q *.par2

I would like three additional features and then the script will be perfect for my needs. Listed in order of importance:

1. Report if any errors in creating the pars. (Not sure if this does it automatically within par2.exe??)
2. Create 30% redundancy for any files located in the \Sample folder and have the parset incorporate the name of the sample file.
3. Report how much time it took to create the pars.

Appreciate any help, I'm a noob at all this! :c)
« Last Edit: April 03, 2011, 01:18:43 PM by Hecks »

Offline Hecks

  • Contributor
  • ***
  • Posts: 2011
  • naughty cop
Re: Tweak Preusenet to use MultiPar or Par2+TBB?
« Reply #5 on: April 03, 2011, 01:20:32 PM »
If you're starting from scratch and working in W7, you may as well write it as a PowerShell script (supported OOB in W7), it would be much easier. ;)

Offline WarezMyGF

  • Contributor
  • ***
  • Posts: 21
Re: Tweak Preusenet to use MultiPar or Par2+TBB?
« Reply #6 on: April 03, 2011, 08:57:08 PM »
I have no programming background. I googled around and Powershell is out of my league.  :-[

Thanks for the suggestion though! Once I get this batch script working it will be good enough for me.

Offline WarezMyGF

  • Contributor
  • ***
  • Posts: 21
Re: Tweak Preusenet to use MultiPar or Par2+TBB?
« Reply #7 on: April 04, 2011, 02:37:09 AM »
Here is a more up to date script to work with phpar2 (the fastest par2 to date). Works great in W7 x64! Props go to maker of MultiPar for making a template.

Just copy the code and save it as .bat, then drag n' drop the ROOT folder (which contains all the items one wants to par) over the .bat. Be sure to change "LOCATION OF PAR2.EXE HERE" to the location of the par2.exe, for example "C:\Par2\par2.exe". This will create 10% redundancy with block size of 1, 920, 000. You can change per your individual needs of course. Also, this only creates parity for rars.

Code: [Select]
@ECHO OFF
REM this command script requires Windows 2000/XP

SETLOCAL

REM check input path
IF "%~1"=="" GOTO End
IF NOT EXIST "%~1" (
ECHO The path does not exist.
GOTO End
)
IF NOT "%~z1"=="0" GOTO End

REM set options for PAR2 client
SET par2_path="LOCATION OF PAR2.EXE HERE"
SET par2_redundancy=10

REM recursive search of sub folders
PUSHD %1
FOR /D /R %%G IN (*.*) DO CALL :ProcessFolder "%%G" "%%~nG"
POPD

:End

PAUSE
GOTO :EOF

REM create PAR2 files in each sub folders
:ProcessFolder
PUSHD %1
%par2_path% c -s1920000 -r%par2_redundancy% -l "%2.par2" "*.r*"
POPD

GOTO :EOF

ENDLOCAL

pause


Now to figure out how to implement a check for Sample folder and if it does find it to create 30% redundancy and incorporate the name of the sample's file name. Would appreciate any help on this one last part.