#1
|
|||||
|
|||||
Need help with opus and freearc
Hello guys I have a problem.
I am trying to compress wav files with opusenc and arc. Compression process works fine but when I try to decompress it, freearc keeps extracting the file again and again and never stops. I used this command to compress my wav: Code:
arc a -mopus out.bin file.wav Code:
arc x out.bin Quote:
Compression Quote:
Quote:
With flac and it worked fine. Compression: Quote:
Quote:
opus's output is lossy but arc is trying to get the original wav file which is not possible. Is there a way to stop arc after first attempt. Sorry if all this is stupid, but I just came to know about arc.ini is and what it does. |
The Following User Says Thank You to averanted For This Useful Post: | ||
1234567890123 (29-07-2016) |
Sponsored Links |
#2
|
||||
|
||||
I don't know if you tried tta but it works on wav audio without much trouble. If that is not enough, you should check out msc.
example arc.exe a -ep1 -r -ed -mtta data.arc "C:\myaudio\*" |
The Following 2 Users Say Thank You to Razor12911 For This Useful Post: | ||
1234567890123 (29-07-2016), averanted (29-07-2016) |
#3
|
|||
|
|||
Because checksum of extracted content is different from original. You can't use FreeArc for lossy extraction.
|
#4
|
|||
|
|||
Thanks Razor12911 and FitGirl for the reply.
![]() But what if want to make a lossy repack because msc is compressing it with lossless format. I used to make lossy setups which installed with help of batch file but now I want to try inno setup for my installer. Is it possible to use ogg, opus, he-aac in repacks without having problem with checksum because they are definitely going to change? |
#5
|
||||
|
||||
Well then you're gonna have to do all that without Freearc, first encode the audio then include the final output in archive along with other non encoded files in any.
If the files you encoded need decoding for them to work with whatever application is using them then you simply unpack the archive like you unpack other archives. This is what you should do. (Using ogg example) Encode all files, keep file list of encoded audio then everything with Freearc. Then in inno setup. Add this. if FileExists(ExpandConstant('{app}\ogg.ini')) and (ISDoneError = False) then begin Wizardform.ProgressGauge.Max:=0; i:=1; repeat if FileExists(AddBackSlash(ExpandConstant('{app}')) + GetIniString('OggDecode','Ogg' + IntToStr(i),'',ExpandConstant('{app}\ogg.ini'))) then Wizardform.ProgressGauge.Max:= Wizardform.ProgressGauge.Max + 1; i:= i + 1; until GetIniString('OggDecode','Ogg' + IntToStr(i),'',ExpandConstant('{app}\ogg.ini')) = ''; WizardForm.ProgressGauge.Position:=0; i:=1; repeat OggFile:=AddBackSlash(ExpandConstant('{app}')) + GetIniString('OggDecode','Ogg' + IntToStr(i),'',ExpandConstant('{app}\ogg.ini')); ProgressLabels(GetMessage(3,'',''),OggFile); Exec(ExpandConstant('{tmp}\oggdec.exe'), '"' + OggFile + '"' + ' ' + '-w"' + OggFile + '_"', '',SW_HIDE, ewWaitUntilTerminated, MsgResult); RenameFile(OggFile + '_',OggFile); if FileExists(AddBackSlash(ExpandConstant('{app}')) + GetIniString('OggDecode','Ogg' + IntToStr(i),'',ExpandConstant('{app}\ogg.ini'))) then WizardForm.ProgressGauge.Position:= WizardForm.ProgressGauge.Position + 1; i:= i + 1; until (GetIniString('OggDecode','Ogg' + IntToStr(i),'',ExpandConstant('{app}\ogg.ini')) = '') or ISDoneError = True; DeleteFile(ExpandConstant('{app}\ogg.ini')); end; Take note, this is just an example, you obviously have to do a bit of modification for it to work for your script. Ogg.ini is the file in this case chosen to have list of files, unfortunately for this to work very well for you, it's either you write this ini configuration format or maybe learn a bit of delphi to be able to use TStringList to be able to use the non configuration approach. Done. The configuation looks like this. [OggDecode] Ogg1=myogg1.ogg Ogg2=game\encoded.ogg .... |
The Following 2 Users Say Thank You to Razor12911 For This Useful Post: | ||
averanted (29-07-2016), RamiroCruzo (29-07-2016) |
#6
|
|||
|
|||
Thanks razor12911 I really needed something like this
![]() ![]() |
#7
|
||||
|
||||
Just in case you are not good in pascal.
|
The Following 5 Users Say Thank You to Razor12911 For This Useful Post: | ||
averanted (29-07-2016), Gehrman (19-09-2022), pakrat2k2 (30-07-2016), RamiroCruzo (29-07-2016), Simorq (29-07-2016) |
![]() |
Thread Tools | |
Display Modes | |
|
|