FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   Source Code: Conversion Converter (https://fileforums.com/showthread.php?t=94435)

Razor12911 05-04-2013 23:44

Source Code: Conversion Converter
 
1 Attachment(s)
Greetings, Forum Users.
Presenting... The Conversion Converter
_________________________________

Description
  • This program known as the conversion converter helps users whole are not specialist in creating conversions using external compression and resampling videos.
  • The program make your conversions less clumsy and for other people to understand.

Tutorials/Instructions

Constants

OUTDIRPATH\ the selected output directory or the output for the converted files.
SELDIRPATH\ the selected application directory or the source of files to be converted.
Inno Setup Constants

The Conversion Converter Files
Converter.exe - The Converter Executable File
Converter.ini - The Converter Configuration File

How to Configure The Converter?

Open Converter.ini using Notepad.


[Conversion] - This section defines the information of the conversion you want create
Name= - Defines the Program/Game you want to create a conversion for.
Type= - Defines the Conversion type, for example: it can 2xDVD9 - 3xDVD5.
Size= - Defines the space needed by the conversion in megabytes
Check= - Defines a file which will be used for recognition by the converter. *NOTE*: Check2 can be introduced if you are doing a multi-conversion, the total number of checks you can use is 10.
Language= - Defines the language(s) supported by the program/game for the conversion. (See language list below).


[TaskSettings] - This section triggers the converter to do a task.
*Note*: This section has a tasking integer which starts from 1 up until infinity therefore for instruction, the x variable will be used to clarify where the integer should be used.
*Info*: the integer count will go accordingly which betters conversion capabilities and errors.

The available compressing sub-sections are:
FreearcFilex= - commands the converter to compress a file using freearc compression.
7zFilex= - commands the converter to compress a file using 7zip compression.
RarFilex= - commands the converter to compress a file using winrar compression.

The switches for compressing sub-sections are:
*Note*: Remember to put a semicolon after each switch and you may need these: Freearc Documentation, 7Zip Documentation and Winrar Documentation
After the "=" of the sub section is the output of the archive.
Source: - the input or the source of the file you want to compress.
Option: - the switches used for the sub-section program.
Method: - the method switch used for the sub-section program.
IncludeList: - the filelist for the files/folders to be included in archive, if any.
IncludeList: - the filelist for the files/folders to be excluded in archive, if any.
Language: - the language in which the sub-section command can be used, if any.


The available file-operation sub-sections are:
CreateFolderx= - commands the converter to create a new folder.
CopyFilex= - commands the converter to copy a file.
MoveFilex= - commands the converter to move a file.
DeleteFolderx= - commands the converter to delete folder.
DeleteFilex= - commands the converter to delete a file.
MoveFolderx= - commands the converter to move a folder.
CopyFolderx= - commands the converter to copy a folder.
RemoveFolderx= - commands the converter to remove a folder(similar to DeleteFolder).
RenameFilex= - commands the converter to rename a file.
RenameFolderx= - commands the converter to rename a folder.
CopyFilesx= - commands the converter to copy a file(similar to CopyFile).
MoveFilesx= - commands the converter to move a file(similar to MoveFile).
DeleteFilesx= - commands the converter to delete a file(similar to DeleteFile).

The switches for file-operation sub-sections are:
After the "=" of the sub section is the source of the file/folder.
Destination: - the output file/folder.
Language: - the language in which the sub-section command can be used, if any.



The available ISO Image Creation sub-sections are:
*Note*: ISO Disk image is in UDF Format.
CreateImagex= - commands the converter to create an iso disk image.


The switches for file-operation sub-sections are:
After the "=" of the sub section is the output of the ISO Image.
Source: - the source of the folder you want to put in an ISO Image.
Label: - the ISO Image diskname.
Language: - the language in which the sub-section command can be used, if any.



The available media resampling sub-sections are:
BinkVideox= - commands the converter to resample a bik video.

The switches for file-operation sub-sections are:
After the "=" of the sub section is the source of the bink video.
VideoQuality: - the video quality resample rate in a range from 0 to 100.(Low rate equals low video quality and high rate equals high video quality).
Color: - specifies whether video color must be maintained(Color) or removed(Black and White). (0 value specifies that color must be removed and 1 value means color must be maintained.
ResolutionX: - specifies the video horizontal resolution.
ResolutionY: - specifies the video vertical resolution.
Language: - the language in which the sub-section command can be used, if any.
SoundQuality: - the sound quality resample rate in a range from 0 to 100.(Low rate equals low sound quality and high rate equals high sound quality).
Language: - the language in which the sub-section command can be used, if any.


Converter.ini Examples
Example 1
Code:

[Conversion]
Name=Need For Speed Most Wanted
Type=1xDVD9 - 1xDVD5
Check=SELDIRPATH\NFS13.exe
Language=en

[TaskSettings]
CopyFolder1=SELDIRPATH\HAWAII;Destination:{src}\TMP1
CopyFolder2=SELDIRPATH\CHARACTERS;Destination:{src}\TMP2
CopyFolder3=SELDIRPATH\Core;Destination:{src}\TMP2
CopyFolder4=SELDIRPATH\EN_US;Destination:{src}\TMP2
CopyFolder5=SELDIRPATH\GAMELOGIC;Destination:{src}\TMP2
CopyFolder6=SELDIRPATH\PHYSICS;Destination:{src}\TMP2
CopyFolder7=SELDIRPATH\SOUND;Destination:{src}\TMP2
CopyFolder8=SELDIRPATH\Support;Destination:{src}\TMP2
CopyFolder9=SELDIRPATH\UI;Destination:{src}\TMP2
CopyFolder10=SELDIRPATH\VEHICLES;Destination:{src}\TMP2
FreeArcFile11=OUTDIRPATH\DVD\Data1.cab;Source:{src}\TMP1\*;Option:a -ep1 -r -ed;Method:-mprecomp+srep64+delta+lzma64:a1:mfbt4:d158m:fb273:mc1000:lc8
DeleteFolder12={src}\TMP1
FreeArcFile13=OUTDIRPATH\DVD\Data2.cab;Source:{src}\TMP2\*;Option:a -ep1 -r -ed;Method:-mprecomp+srep64+delta+lzma64:a1:mfbt4:d158m:fb273:mc1000:lc8
DeleteFolder14={src}\TMP2
FreeArcFile15=OUTDIRPATH\DVD\Data3.cab;Source:SELDIRPATH\*;Option:a -ep1 [email protected];Method:-mx;IncludeList:English.ini
CopyFile16={src}\Resources\autorun.exe;Destination:OUTDIRPATH\DVD\autorun.exe
CopyFile17={src}\Resources\setup.cab;Destination:OUTDIRPATH\DVD\setup.cab
CopyFile18={src}\Resources\setup.exe;Destination:OUTDIRPATH\DVD\setup.exe
CopyFile19={src}\Resources\setup.ini;Destination:OUTDIRPATH\DVD\setup.ini
CopyFile20={src}\Resources\autorun.inf;Destination:OUTDIRPATH\DVD\autorun.inf
CopyFile21={src}\Resources\icon.ico;Destination:OUTDIRPATH\DVD\icon.ico
CopyFolder22={src}\Support;Destination:OUTDIRPATH\DVD
CreateImage23=OUTDIRPATH\NFSMW.iso;Source:OUTDIRPATH\DVD;Label:NFS_MW


Freearc Method Clarification and Examples
External Compressors are:
precomp
srep
srep64
lzma64

Example:
-mprecomp+srep64+lzma64:a1:mfbt4:d158m:fb273:mc1000 :lc8


Language List
cz = Czech
de = German
en = English
es = Spanish
fr = French
it = Italian
pl = Polish
pr = Portuguese
ru = Russian
tr = Turkish
ua = Ukrainian

Credits
Inno Setup, Precomp, Srep, Freearc, Winrar, 7z, ImgBurn and RAD Video Tools Creators

Programs Used
  • Inno Setup Enhanced Edition Unicode 5.5.1 Version 2 and Stardard Edition Unicode 5.5.3
  • Freearc 0.67 Alpha
  • Precomp 0.38, 0.40, 0.41 and 0.42
  • Srep 3.0
  • 7zip 9.25 Alpha
  • Winrar 4.20
  • ImgBurn 2.5.7.0
  • RAD Video Tools 1.99w

Enjoy doing your conversions!

Cesar82 06-04-2013 09:40

Some questions:
What commands Method1:? and Method2:? supported?
Works with SREP?
How to add files specific to a particular CAB file (Say has 10 files in a folder, I need to add files 3,5,3,6,9 to Data2.cab)?

Razor12911 06-04-2013 10:27

method1 is the command and options e.g. a -ep1 -r -ed -xaudio
method2 is the compression method you want to use e.g. -mlzma:a1:mfbt4:d158m:fb273:mc1000:lc8

srep works but if you tweak your arc.ini, will fix this problem though.

here is the freearc documentation
you can add them by using this method if you want to take the whole folder a -ep -r -ed

Folder has 10 files no problem, here is an example

FreeArcFile1={src}\Output\Data.cab;Source:Folder\3.File;Option:a -ep1;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8
FreeArcFile2={src}\Output\Data.cab;Source:Folder\5.File;Option:a -ep1;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8
FreeArcFile3={src}\Output\Data.cab;Source:Folder\6.File;Option:a -ep1;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8
FreeArcFile4={src}\Output\Data.cab;Source:Folder\6.File;Option:a -ep1;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8
FreeArcFile5={src}\Output\Data.cab;Source:Folder\9.File;Option:a -ep1;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8

maintain same archive

Razor12911 06-04-2013 15:26

Updated: Version 2
-Freearc Integrated in Converter (Thanks to LuisCésar82 for Idea) :D
-Srep and Precomp Compressors added
-Converter.ini Structure Changed, you might wanna check instruction again

danswano 06-04-2013 16:08

Thanks razor, let's say i have 3 folders and they contain lots of files/folders inside
001, 002 and 003
how to add them in the ini?

BAMsE 06-04-2013 17:12

Quote:

Originally Posted by Razor12911 (Post 416754)
Folder has 10 files no problem, here is an example

FreeArcFile1={src}\Output\Data.cab;Source:Folder\3.File;Option:a -ep1;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8
FreeArcFile2={src}\Output\Data.cab;Source:Folder\5.File;Option:a -ep1;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8
FreeArcFile3={src}\Output\Data.cab;Source:Folder\6.File;Option:a -ep1;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8
FreeArcFile4={src}\Output\Data.cab;Source:Folder\6.File;Option:a -ep1;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8
FreeArcFile5={src}\Output\Data.cab;Source:Folder\9.File;Option:a -ep1;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8

maintain same archive

It makes no sense because in 2nd step freearc musts unpack data.cab to include new file. This new data.cab must be unpacked once again in 3rd step and so on. It will be better to use -n@ and -x@ option

BTW Conversion converter sounds like script scripter or game gamer :)

Razor12911 07-04-2013 01:51

Quote:

Originally Posted by BAMsE (Post 416770)
It makes no sense because in 2nd step freearc musts unpack data.cab to include new file. This new data.cab must be unpacked once again in 3rd step and so on. It will be better to use -n@ and -x@ option

BTW Conversion converter sounds like script scripter or game gamer :)

I know, the [email protected] and [email protected] but where to put it is the big question, I can't use -n@({src}/{tmp})\blah.lst, directory is kinda hard to tell.

http://img40.imageshack.us/img40/426...0407112646.jpg

ok, what are your program name suggestions?
Thee Converter? I'm not good at naming things.

Razor12911 07-04-2013 02:30

Great News:

you can use -n and -x in next version, problem solved.
winrar and 7zip compression added also internal

can anyone give me the fileforums logo in png.

danswano 07-04-2013 08:34

Thanks razor, let's say i have 3 folders and they contain lots of files/folders inside and i want to create a cab for each folder.
001, 002 and 003
how to add them in the ini?

Razor12911 07-04-2013 08:41

the current converter doesn't support that feature, will publish v3 in 15 min.

[CompressingSettings]
NewFeature
7ZFile1={src}\Data.cab;Source:*;Option:a -r;Method:x=9
FreeArcFile1={src}\Output\Data.cab;Source:*;Option :a -ep1 -r -ed -p1234;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8
RarFile1={src}\Output\Data.cab;Source:data2.bin;Op tion:a -ep1;Method:-m4

adding imgburn internally and adding function

Cesar82 07-04-2013 08:59

How do I copy the folder suport the game installation folder to the output folder of the conversion?

Razor12911 07-04-2013 11:28

Version 3 Released

What's New
  • 7Zip Compression and Winrar Compression Added
  • Freearc FileList Feature fixed
  • ImgBurn is added, Internally, create disk image feature added.
  • Updated Instructions

Razor12911 07-04-2013 11:44

Quote:

Originally Posted by danswano (Post 416801)
Thanks razor, let's say i have 3 folders and they contain lots of files/folders inside and i want to create a cab for each folder.
001, 002 and 003
how to add them in the ini?

using these -n or -x
make a list

pakrat2k2 07-04-2013 13:02

thanks for the update + detailed explanation but ....might want to

add the instructions in file ( including colors ) that users can d/l

Razor12911 07-04-2013 13:31

hmm, okay, planning on creating a chm file, any suggestions?

Cesar82 07-04-2013 15:56

Do not understand
 
Do not understand the example file list.
I do not understand in color red
Code:

FreeArcFile1={src}\Output\Data.cab;Source:Cars\*;O ption:a -ep1 -r -ed [email protected];Method:-msrep+lzma:a1:mf...img" />ata.lst;Language:en
[email protected]= Add files?
[email protected]= Exclude Files?

how to create a list to add 5 files: FileA FileB FileC FileD
and exclude (No ADD) Files: File1 File2 File3
Being all in the same directory and with 1 GB each

Please cite an example.

_________________________________
Razor12911 sugestion if creat chm file:
Putt many examples.

Razor12911 07-04-2013 16:04

this how you should do it.
it is either you include or\and exclude

exclude

FreeArcFile1={src}\Output\Data.cab;Source:Cars\*;O ption:a -ep1 -r -ed [email protected];Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8;FileLis t1:Data.lst

list should be

File1
File2
File3

include

FreeArcFile1={src}\Output\Data.cab;Source:Cars\FileA;Option:a -ep1 [email protected];Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8;FileLis t1:Data.lst

list should be

FileB
FileC
FileD

take a look at options, it changed.

Cesar82 07-04-2013 16:32

Thanks

FileList is an external file?
You can use any name for filelist1?

It is not possible to include the list of files in Converter.ini?
Example Converter.ini: FileList1 = FileA.dat, FileB.bik, FileC.tiger, ...

Razor12911 07-04-2013 16:40

nope, filelist is an external file.
it's not possible to include the list of files, only when you are rar for compression.

Razor12911 07-04-2013 16:41

Version 3.1 Released

What's New
  • Directory Check Function Added, you might wanna check the instructions for it.

Cesar82 07-04-2013 19:24

Need Help
 
Anyone have a alternative solution?
I created
Data1.lst
Code:

DS2DAT1.dat
DS2DAT3.dat
DS2DAT4.dat
DS2DAT5.dat
DS2DAT7.dat
DS2DAT9.dat

Data2.lst
Code:

DS2DAT0.dat
DS2DAT2.dat
DS2DAT6.dat
DS2DAT8.dat

Data3.lst
Code:

DS2DAT1.dat
DS2DAT3.dat
DS2DAT4.dat
DS2DAT5.dat
DS2DAT7.dat
DS2DAT9.dat
DS2DAT0.dat
DS2DAT2.dat
DS2DAT6.dat
DS2DAT8.dat

In converter.ini put:
Code:

FreeArcFile1={src}\Conversion\DS2_1\Data1.cab;Source:*;Option:a -ep1 [email protected];Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8; FileList1:Data1.lst
FreeArcFile2={src}\Conversion\DS2_2\Data2.cab;Source:*;Option:a -ep1 [email protected];Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8; FileList2:Data2.lst
FreeArcFile3={src}\Conversion\DS2_2\Data3.cab;Source:*;Option:a -ep1 -r -ed [email protected];Method:-m0; FileList3:Data3.lst

Besides the lists of files also have other folders and files. I want it in Data3.cab.
I realized that the converter supports Data1.lst and data2.lst, not suportaData3.lst

Anyone have an alternative to I convert this way

yener90 07-04-2013 19:31

lol source code^^
where is it?

Razor12911 08-04-2013 02:00

Quote:

Originally Posted by yener90 (Post 416827)
lol source code^^
where is it?

if you are talking about the script itself, not now, in next version though.
not necessary for now...:D

Razor12911 08-04-2013 02:24

Quote:

Originally Posted by LuisCésar82 (Post 416826)
Anyone have a alternative solution?
I created
Data1.lst
Code:

DS2DAT1.dat
DS2DAT3.dat
DS2DAT4.dat
DS2DAT5.dat
DS2DAT7.dat
DS2DAT9.dat

Data2.lst
Code:

DS2DAT0.dat
DS2DAT2.dat
DS2DAT6.dat
DS2DAT8.dat

Data3.lst
Code:

DS2DAT1.dat
DS2DAT3.dat
DS2DAT4.dat
DS2DAT5.dat
DS2DAT7.dat
DS2DAT9.dat
DS2DAT0.dat
DS2DAT2.dat
DS2DAT6.dat
DS2DAT8.dat

Code:

FreeArcFile1={src}\Conversion\DS2_1\Data1.cab;Source:*;Option:a -ep1 [email protected];Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8; FileList1:Data1.lst
FreeArcFile2={src}\Conversion\DS2_2\Data2.cab;Source:*;Option:a -ep1 [email protected];Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8; FileList2:Data2.lst
FreeArcFile3={src}\Conversion\DS2_2\Data3.cab;Source:*;Option:a -ep1 -r -ed [email protected];Method:-m0; FileList3:Data3.lst

Besides the lists of files also have other folders and files. I want it in Data3.cab.
I realized that the converter supports Data1.lst and data2.lst, not suportaData3.lst

Anyone have an alternative to I convert this way

you can only use filelist2 is you have both of these in the same line: -n -x but if you have one, use filelist1 in each line.

Razor12911 08-04-2013 04:13

Next Update

Coming Soon
  • Bink Videos Resampling Feature will be added if possible :D
  • Script will be included
  • Some minor bugz fixed

danswano 08-04-2013 04:24

The Bink feature is awesome.

Razor12911 08-04-2013 04:27

Yeah, Adding it. Internally so you don't need rad videos installed on your system.
though it's kinda difficult.

any suggestions on how the bat command should look like?

chuotchu001 08-04-2013 05:15

2 Attachment(s)
After conversion complete, i have file data.cab => how to install or run it. :confused: sorry i'm newbie

Razor12911 08-04-2013 05:17

then comes your installer, use any inno setup installer which has isdone(e.g. yener90 installer) to extract that file.

chuotchu001 08-04-2013 05:26

Quote:

Originally Posted by Razor12911 (Post 416848)
then comes your installer, use any inno setup installer which has isdone(e.g. yener90 installer) to extract that file.

Can't you make example with image? i don't know to run that file. Thanks for help.

Razor12911 08-04-2013 05:33

what file are you talking about?

spawniectes 08-04-2013 05:35

Quote:

Originally Posted by Razor12911 (Post 416843)
Yeah, Adding it. Internally so you don't need rad videos installed on your system.
though it's kinda difficult.

any suggestions on how the bat command should look like?

This is how it looks like the batch file to resample bik files with rad video tools.
Code:

cd D:\Bionic Commando\data\movies
Bink capcom_logo.bik New_capcom_logo.bik  /d50 /m3.0 /l5 /p8

The code above will resample the video to the 50% of the original, so I guess the only thing to change is /d50 to the desired percent to resample
I hope this help you.

Razor12911 08-04-2013 05:43

hmm, this will be difficult for people who don't know how to resample videos.
will only make options the source, destination and method you'll have to figure it out yourself. :D

spawniectes 08-04-2013 05:58

Quote:

Originally Posted by Razor12911 (Post 416855)
hmm, this will be difficult for people who don't know how to resample videos.
will only make options the source, destination and method you'll have to figure it out yourself. :D

I always see that people who resample the bik files, they resample to a percent of the original so the video dont get to loosy and in effect the only thing to change is /d50 to the desired percent and the destination always will be at the source of the original file with the prefix New_ on front.

So I guess the best way to do the bat will be:

select source file
resample source file
delete source file
rename resampled file to source file name.

I will try to do it and if work I send you the code and you see how to integrate to your script.

Razor12911 08-04-2013 06:21

hmm, I guess, I will add
Input:Video.bik
Output:Video.Bink
Quality:50
ResolutionX:1280
ResolutionY:720
Color:1 or 0

Cesar82 08-04-2013 07:24

My personal opnion:
The more tools, the better. Not only fail to take into account that most conversions posted in forun are of sizes small (Less than 25 MB).
The current compressor 3.1 compressd .7zip is 6,79 MB of size.
The final conversion will be very great if you add too many files internally in compressor.
For me upload 27 mb took 3 hours (slow connection)

Razor12911 08-04-2013 07:27

lol man. the Next Converter will be Approximately 10MB

configuration for video resample will be like this

[VideoSettings]
BinkVideo=Videos\logo_amd_hd.bik;VideoQuality:50;R esolutionX:1024;ResolutionY:576;Color:1

anyone, sound doesn't play after resampling video?

Razor12911 08-04-2013 09:31

Version 4 Released

What's New
  • DIRPATH\ feature added - the selected directory or the source of files to be converted
  • Bik Video Resample Function Added thanks to spawniectes
  • Script Included. :D
  • Last Project in a long time:(

Up Next
  • Nothing

spawniectes 09-04-2013 19:21

Quote:

Originally Posted by Razor12911 (Post 416861)
lol man. the Next Converter will be Approximately 10MB

configuration for video resample will be like this

[VideoSettings]
BinkVideo=Videos\logo_amd_hd.bik;VideoQuality:50;R esolutionX:1024;ResolutionY:576;Color:1

anyone, sound doesn't play after resampling video?

check that your bat file have this /l5 and not /l0 (L0 is without audio) (/l5 barely lossless audio)

BAMsE 10-04-2013 01:11

Converted bik always contains only track 0 from source. The rest must be added manually


All times are GMT -7. The time now is 23:12.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com