Help - Search - Members - Calendar
Full Version: MAREO 2.0 Development
Hydrogenaudio Forums > Hydrogenaudio Forum > General Audio
Pages: 1, 2, 3
kwanbis
Hi, i have started to develop MAREO 2.0 ... I'm planing on using free pascal's multithreaded routines to run multiple encoders at the same time ... so the question is ... is there any other option that the community sees it is needed?

EDIT:
LIST OF NOT LOCKING ENCODERS
lame.exe
oggenc2.exe (OggEnc v2.3 (libvorbis Post 1.0.1 CVS))

LIST OF LOCKING ENCODERS
kwanbis
another thing i would need to know is for each used encoder, does it "opens" the wav in exclusive mode? so if, for example, i try to run flac on the same source wav, at the same time, would it generate a protection error? i would try lame.exe, but i don't know/have all the used encoders wink.gif
Jasper
I have no experience with MAREO or with using commandline encoders with EAC, so just ignore me if this is a stupid question, but why do you need a source wav? I have written an output plugin for Winamp that can use commandline encoders and I simply pass the data through a pipe (I can even retrieve the output data through a pipe again), this should work flawlessly for multiple encoders too.
Jan S.
Because EAC writes a wav file. Does not pipe it.
Or perhaps I am totally clueless.
Jasper
You are absolutely right (I just checked), I hadn't thought of that option yet, EAC is probably very worried about being able to store the PCM data fast enough.
kwanbis
exactly, besides, mareo can work with ANY ripper, cdex, dbpoweramp, audiograbber, etc.
phwip
I use MAREO with EAC to encode to OptimFROG DualStream. EAC renames the .ofs file but not the .ofs correction file. So to get round this I have a second line in MAREO that doesn't do any encoding but does rename the file:

CODE
ofc NONE NONE donothing.exe


In order for this to work I have had to create a donothing.exe program in Delphi which is a console program that literally does nothing.

CODE
program donothing;
{$APPTYPE CONSOLE}
begin
end.


This is a bit messy. So would it be possible to enhance MAREO so it can take NONE as the CommandToRunWithParameters (ie. the fourth item in an action line)?

CODE
ofc NONE NONE NONE


I would think this would be useful with any hybrid encoder that generates two output files, although I haven't used any other.

EDIT: Or if there is already a simpler way to do this I have overlooked, please let me know.
phwip
Another request:

it would be great if MAREO would take an additional command line parameter telling it which ini file to use. So instead of having to edit mareo.ini and comment out lines to change encoder, I can create different ini files for each combination of encoder I use and then simply type the required ini file in the EAC "Additional command line options".
kwanbis
QUOTE(phwip @ Jun 1 2004, 10:53 AM)
This is a bit messy.  So would it be possible to enhance MAREO so it can take NONE as the CommandToRunWithParameters (ie. the fourth item in an action line)?

you bet smile.gif
kwanbis
QUOTE(phwip @ Jun 1 2004, 11:03 AM)
it would be great if MAREO would take an additional command line parameter telling it which ini file to use.

sure
kwanbis
i have also been asked to make mareo "create" a WAV file, so if the CommandToRunWithParameters is WAVNONE mareo would only rename, and not encode.
phwip
QUOTE(kwanbis @ Jun 1 2004, 12:23 PM)
QUOTE(phwip @ Jun 1 2004, 10:53 AM)
This is a bit messy.  So would it be possible to enhance MAREO so it can take NONE as the CommandToRunWithParameters (ie. the fourth item in an action line)?

you bet smile.gif

Excellent. Thank you. (and for the ini file parameter)

QUOTE(kwanbis @ Jun 1 2004, 12:31 PM)
i have also been asked to make mareo "create" a WAV file, so if the CommandToRunWithParameters is WAVNONE  mareo would only rename, and not encode.


If you have already implemented NONE as a CommandToRunWithParameters value, would WAVNONE really also be necessary? Surely the same can be acheived using

CODE
wav <2ndParam> <3rdParam> NONE


Or have I misunderstood?
kwanbis
QUOTE(phwip @ Jun 1 2004, 01:47 PM)
If you have already implemented NONE as a CommandToRunWithParameters value, would WAVNONE really also be necessary?  Surely the same can be acheived using

you are correct ... they are both related to each other ... so maybe the 2nd is not needed ... i would look at it for sure.
rfarris
QUOTE(kwanbis @ May 31 2004, 10:11 AM)
Hi, i have started to develop MAREO 2.0 ... i have already moved it to Lazarus/Free Pascal so anyone can compile it (and even move it to LINUX) since Borland no longer offers a free version of Delphi. I'm planing on using free pascal's multithreaded routines to run multiple encoders at the same time ... so the question is ... is there any other option that the community sees it is needed?

Did you consider C#? It's available for both Windows and Linux (the compiler comes free with Windows, just not the IDE) and C# at least has a future.

-- Rick
kwanbis
QUOTE(rfarris @ Jun 1 2004, 07:39 PM)
Did you consider C#?  It's available for both Windows and Linux (the compiler comes free with Windows, just not the IDE) and C# at least has a future.

frepascal is GPL, so it has a future for sure ...
kwanbis
ok guys, i finally made MAREO 2.0 compile under lazarus ... it took me more time than i thought wink.gif .... anyway, i haven't goot feedback from users of other encoders than lame.exe on wheter the encoders lock or not the WAV files ... i need to know it, cause if that is the case, mareo would need to ccpy the wav, once for each encoder threat ... so, any feedback?
Jasper
I just tried oggenc2.exe (OggEnc v2.3 (libvorbis Post 1.0.1 CVS)) and it seems it doesn't lock it (at least not for reading), as I could play the wav with winamp while encoding, CoolEdit also didn't mind opening it.
As for copying the wav, that does sound awfully slow, I understand now why EAC doesn't pipe the PCM data to the encoder directly, but I see no reason why you couldn't pipe the data to the encoders (if some encoders do lock that is). That would probably be quite a lot faster than first having to copy the WAV file.
rh factor
Multithreading? Awesome, this should speed things up with my hyperthreaded P4! Anyway, I use MAREO to do LAME and FLAC and have been recommending it on Ars Technica message boards for some time to others looking to do the same. One thing that I have done in the past but am no longer doing is WaveGaining after a FLAC is made but before an MP3 is made so that the MP3s are normalized but the FLACs are the original source. This required me to have MAREO "leave" the WAV but also run a delete batch file I made on the WAV file (so MAREO thought it was leaving the WAV alone but in reality it was deleting it at the end.) Hopefully that makes sense. That's a feature that would be nice to have in the finished version of MAREO 2.0. I'm willing to help beta test (Windows XP, EAC, LAME, FLAC.) Keep up the good work! laugh.gif
kwanbis
hi rh, thanks for your help ... what is exactly the problem with wavegain ... i don't quite get it :| ... i would be posting as soon as i have a working prototype of M2
rfarris
QUOTE(kwanbis @ Jun 2 2004, 02:37 PM)
frepascal is GPL, so it has a future for sure ...

<chokes on his coffee>

Yeah, like any pascal has a future...
kwanbis
QUOTE(rfarris @ Jun 4 2004, 08:05 PM)
Yeah, like any pascal has a future...

you are right ... i would do it in C# then ... so users then have to download a 15 MB "runtime" ... rolleyes.gif ... if it does what i need, why should i ditch free pascal? have you bothered to go to the lazarus site?
rfarris
QUOTE(kwanbis @ Jun 4 2004, 01:04 PM)
QUOTE(rfarris @ Jun 4 2004, 08:05 PM)
Yeah, like any pascal has a future...

you are right ... i would do it in C# then ... so users then have to download a 15 MB "runtime" ... rolleyes.gif ... if it does what i need, why should i ditch free pascal? have you bothered to go to the lazarus site?

Actually they don't have to download a 15 MB runtime, although that might be simplest. Do you know about mono the open source C# initiative?

But, your point is good. Then why not C++? Or C? Or any language that people could hope to use on a job, someday? Working in Pascal is about as practical as working in FORTRAN. (And yes, I know that a lot of work is done in FORTRAN on supercomputers....)

You wouldn't have all that much trouble learning C/C++. Back when Pascal was first beginning to dry up and all the Pascal programmers were converting to C, it was very popular to define a bunch of manifest constants so that C code looked like Pascal. You know:

#define BEGIN {
#define END }

etc.
kwanbis
QUOTE(rfarris @ Jun 5 2004, 10:41 PM)
But, your point is good.  Then why not C++?  Or C?  Or any language that people could hope to use on a job, someday?  Working in Pascal is about as practical as working in FORTRAN.  (And yes, I know that a lot of work is done in FORTRAN on supercomputers....)


why should i change? would it be faster in C/C++? would it do more things that it would do with FP?

besides, the beautifull thing about all this GPL thing is, you can see the code, and translate it to C/C++ ... it appears you are very good with them ... anyway, i wanted to know what users wanted from "MAREO 2.0" ... i think the ones using 1x don't care it was writen in Delphi ... they care that it works for them ... so any more *relevant* info?

PS: by the way, did you ever tried Delphi? ... if you did, and liked it, let me tell you, it is pascal ... i just moved to FP, cause this is a very basic, command line tool, and i win nothing by using delphi ... finally, you can check here:, but just in case:

QUOTE
Readers Choice Award for "The Best Product of 2003"
>>> 01-Mar-04 Poland's "Software 2.0" Magazine Readers Choice Award for "The Best Product of 2003" goes to:
Delphi 7 Studio
Category: Development Environments and Languages

Readers' Choice Awards 2003, Web Services Journal
>>> 25-Feb-04 Delphi 7 Studio was recognized by the readers of Web Services Journal in the Best GUI for a Web Services Product competition. Nominated for it's intuitive interface, Delphi 7 Studio enables the rapid creation of industry standard web services.
The 2003 Readers' Choice Awards, known as "The Oscars of the Software Industry", acknowledge "excellence in software" provided by the industry's top vendors.

Delphi Award Mir PK Global Post
>>> 05-Feb-04 Borland Delphi 7 Studio was announced by Mir PK magazine/PC World as "the Best Development tools" in 2003

Produkt Roku 2003
>>> 04-Feb-04 Delphi 7 was awarded "The Best Developer Tool 2003" in "Product of the Year 2003 Contest" organised by CHIP magazine.

Product of the Year
>>> 23-Jan-03 Delphi 7 Studio wins "Product of the Year" from Czech publication Softwarove noviny. The award marks Delphi Studio as one of the best IT products available on the Czech market. The main parameters for the award are the technical precision, technological innovations and return on investments for customers.

The Reader's Choice Best Product of 2002
>>> 11-Dec-02 For the 4th year in a row, Delphi receives the Best product of 2002 award for the Russian Computer industry. The Reader's Choice award, presented to Borland by Mir PK magazine (PC World/Russia) is for the Development tools category. Delphi received 57.8% of the vote, while #2 Visual Studio.NET received 25.9%.

Premio Info Desenvolvimento 2002 (InfoExame Best Development Tool)
>>> 03-Dec-02 InfoExame Magazine readers have chosen Delphi 6 as the best development tool. at a ceremony held in São Paulo, Brazil. The Info Prize is granted annually for the year’s outstanding products by a jury formed by the magazine readers. In addition to the 2002 award for Delphi 6, Borland Latin America had already been awarded the prize four times in the past. JBuilder was chosen in 2001, and Delphi itself in 2000, 1999, and 1998.

Silver Medal
>>> 01-Dec-02 Swedish computer magazine DatorMagazinet awards Delphi 7 Studio Architect the Silver medal award.

.NET Tool/Add-in of the Year
>>> 01-Dec-02 Due to the big impact Microsoft .NET had on the developer community, this award category was added this year to the developer.com Web site. Among the nine finalists, included Microsoft, Delphi 7 Studio wins. "Borland Delphi 7 Studio has incorporated the ability to develop and migrate Delphi applications to .NET. By using the Delphi compiler, applications can be built using the .NET Framework along with the Delphi language."

Best Development Tool
>>> 19-Nov-02 For the second year in a row, Delphi wins Best Development Tool from PC World, New Zealand

Best and Most Complete Development Environment
>>> 01-Nov-02 PC Magazine Greece: Reader's Choice 2002 Delphi 7 Studio Architect edition awarded as the most Rapid Application Development environment, which provides the most powerful design and deployment tools for Windows and Linux platforms, e-commerce and .NET applications.

Product of the Month
>>> 01-Nov-02 Borland Delphi 7 Studio Architect was awarded product of the month by Softwarove noviny, a Czech IT monthly magazine. The award, "Produkt mesice 11/2002," was received the month of November, 2002.

Technological Innovation
>>> 02-Jul-02 10th anniversary special issue of PC World Magazine Brazil appoints Borland as one of the companies delivering innovative products to the business market. Once again, Delphi 6 was the winner among the development environments that provide greater proximity between the Internet and the B2B environment.

Web Services Journal, First Annual Readers' Choice Awards 2002
>>> 01-Jun-02
* Best Integrated Services Environment, Borland® Delphi™6
* Best Web Services Class Library, Borland® CLX™

Jolt Productivity Award
>>> 20-May-02 Borland received the Jolt Productivity Award in the Best Languages and Development Environment category for rapid application development (RAD) solutions for Windows® and Linux®, Borland® Delphi™ 6 and Kylix™ 2. The Jolt Awards honor products that impress the industry with their significance and bring a "jolt" of productivity to software development managers and their teams

Best Development Tool
>>> 15-Feb-02 New Zealand PC World gives Delphi 6 Readers Choice 2002 Award

PC World Russia - The Best Product of 2000
>>> 27-Feb-01 Delphi wins "The Best Product of 2000" in the category "Development Tools" for Delphi 5 from PC World Russia("Mir PK").

Produkt Roku 2001
>>> 14-Feb-01 Chip Magazine of Poland votes Delphi 6 Product of the Year

Premio Info 2000 Desenvolvimento - Delphi 5
>>> 23-Jan-01 Premio Info 2000 Desenvolvimento - Delphi 5

Produkt Roku 2001 PC World Computer
>>> 10-Jan-01 Delphi wins "The Best Product of 2001" in the category "Development Tools

PC World Poland Product Roku 2001
>>> 01-Jan-01 Delphi wins "The Best Product of 2001" in the category "Development Tools"

Softwarove noviny - Product Mesice
>>> 01-Dec-99 Softwarove noviny - Product Mesice

PC World Belgium - Best Buy
>>> -- PC World Belgium - Best Buy


EDIT: i know C, Pacal, Logo, Lisp, VB, LotusSript, Cobol, and (a little) Java.
rfarris
Don't misunderstand me, I was just curious. Some developers I highly respect use Delphi, but it seemed strange that if one was going to abandon Delphi why one would stick with Pascal. I mean, the reason people use Delphi (as far as I can tell) is because it is a great development environment, not because it is Pascal.

As far as "would it be faster in C/C++," well, I'm not all that big a proponent of making speed my primary yardstick of program goodness, but in this case the answer is "it could be," in the sense that you can get much closer to the metal with C. I mean, I'd bet a considerable sum that Delphi isn't written in Delphi...

The reason for my original suggestion of C# was that .NET is a very supportive development environment. I've noticed that my productivity has increased considerably since I began doing most of my work in C#. The one thing .NET isn't, though, is fast at execution. Fast at development, yes, fast at runtime, no.

And I'm too much of a smart-aleck to let this go by:
QUOTE
01-Mar-04 Poland's "Software 2.0" Magazine Readers Choice Award for "The Best Product of 2003" goes to: Delphi 7 Studio
Category: Development Environments and Languages

Sure. And Jean Claude Van Damm is the champion kickboxer of Belgium. :-)

-- Rick
kwanbis
i'm having eye surgery tomorrow, so this is gonna make the development to take a little more ... but i'm still working on it ... i have rewriten many parts internally, and whn done, mareo 2.0 should be better wink.gif
Synthetic Soul
I want to use MAREO to do the following:

1. Encode using MAC.EXE
2. Add EAC CUE file text as APEv2 tag "CUESHEET" to APE file
3. Create PAR2 files for APE file

However, my plan appears to fall down as TAG won't let me use the contents of a text/cue file as the value of a field.

Could MAREO let you pass results from EXEs to a variable, to be passed on to the next EXE? OR could MAREO just directly pass the contents of a text file as a paremeter?

e.g.:
CODE
; using an external app to load text into a MAREO variable
@myVariable@ = FILELOADER.EXE "CDImage.mac.cue"
... -t "CUESHEET=@myVariable@"

OR
CODE
; using a MAREO public method call to load text into a MAREO variable
@myVariable@ = LoadTextFile "CDImage.mac.cue"
... -t "CUESHEET=@myVariable@"

OR
CODE
; pointing to the contents of an external text file using the MAREO tag "externaltextfile"
... -t "CUESHEET=@externalfile=CDImage.mac.cue@"
kwanbis
QUOTE(Synthetic Soul @ Aug 13 2004, 11:27 AM)
Could MAREO let you pass results from EXEs to a variable, to be passed on to the next EXE? OR could MAREO just directly pass the contents of a text file as a paremeter?


what do you mean by "results from EXEs"?
Synthetic Soul
QUOTE(kwanbis @ Aug 13 2004, 12:19 PM)
what do you mean by "results from EXEs"?

I guess I mean the stdout output, if I have my terminolgy right.

E.g.:

FILELOADER.EXE would load the (cue/text) file passed in the command line, and then write it to stdout.

Therefore:

CODE
@myVariable@ = FILELOADER.EXE "CDImage.mac.cue"

... would result in @myVariable@ containing the string of text contained in "CDImage.mac.cue".

I guess you may be confused by my post as it is my intention to use MAREO to run any EXE, and not necessarily an encoder. Is this possible? I basically want to use MAREO as a batch processor, to perform various related actions, but not multiple encodings, as I believe it was intended for. I was hoping to call MAC.EXE, TAG.EXE and then PAR2.EXE - one encoder and two accompanying apps.

Personally, I think the nicest way to implement this would be to use the "externalfile" tag. So that users can use:

CODE
@externalfile="CDImage.mac.cue"@

When MAREO parses the INI file it looks for any @externalfile@ tags, and loads the relevant file in place of the tag.

Any of these would help me out - but, more importantly, I would expect it to extend the possibilities of MAREO a great deal - for uses I can't yet imagine.

Anyway, as things stand it looks like I will be using MAREO in some way - so please let me take the opportunity to thank you for developing it.
kwanbis
so you want mareo to read an external TXT file, after being generated by an "encoder" run, and load the value to a "variable" that can then be used by the subsequent (mareo) "encoder" runs?

edit: spell
rfarris
QUOTE(Synthetic Soul @ Aug 13 2004, 05:19 AM)
I guess you may be confused by my post as it is my intention to use MAREO to run any EXE, and not necessarily an encoder.  Is this possible?  I basically want to use MAREO as a batch processor, to perform various related actions, but not multiple encodings, as I believe it was intended for.
*

Have you considered Perl or WSH, depending on your platform?

-- Rick

----
Moderation: removed long off-topic signature.
kwanbis
now that mareo is the one at google rank i'm selling it to the highest bider wink.gif ....

no really ... thie weekend i would be releasing mareo 2.0 beta 1 ... i hoppe everybody is ready to test wink.gif


multithreath won't be included at first
Synthetic Soul
QUOTE(kwanbis @ Aug 13 2004, 03:57 PM)
so you want mareo to read an external TXT file, after being generated by an "encoder" run, and load the value to a "variable" that can then be used by the subsequent (mareo) "encoder" runs?

Yes - although the external text file (not necessarily a .TXT) would not necessarily have been created as part of the mareo process - it may be:

# a review that someone wants to add in a "REVIEWS" field
# a detailed description of the enocoding process for a "COMMENTS" field
# a recipe for mushroom soup that is relevant to an audio commentary

Although I think this would be very useful for cuesheets there must be hundreds of other possibilities - including some dynamically generated text files, like the EAC log file, or an encoder log file.

If you went with the variable idea (and not the @externaltextfile@ tag) then you could either:

1. set up a limited number of variables for users to use, e.g.: @variable1@, @variable2@, and @variable3@
2. as above but unlimited - so users can use @variable1@ -> @variableN@ - as long as it is prefixed with "variable"
3. let them define an unlimited amount of their own variable names - so when mareo encounters a value between two @ that it doesn't recognise, e.g.: "@myCueVar@", it assumes that it is a user-defined variable.

QUOTE(rfarris @ Aug 13 2004, 04:47 PM)
Have you considered Perl or WSH, depending on your platform?

I have yes - and I will do if necessary (WSH, or a VB/VB.NET app) - but if kwanbis thinks this would be a useful addition to mareo then there's no need. Easier for me - but in a utilitarian respect, better for every mareo user.

It may be worth pointing out my other thread on this topic. I have used the opportunity of this thread to try to fulfil my needs - but if I don't get any joy from kwanbis or anyone else then I will set about writing my own. The first problem I need to solve is how to pass CRLFs in a DOS command string! As you might guess, it will be a slow process for me...
kwanbis
i still don't quite get it .. if you can describe an example here please, i would be able to help ....

EDIT: reading your linked post ... but a simple example is allways good wink.gif
Synthetic Soul
You basically got it here:
QUOTE(kwanbis @ Aug 13 2004, 03:57 PM)
so you want mareo to read an external TXT file, after being generated by an "encoder" run, and load the value to a "variable" that can then be used by the subsequent (mareo) "encoder" runs?

I want mareo to be able to load an external text file into a variable. That variable can then be used within any subsequent action lines - so when the action line is parsed the variable will be replaced by the text it contains.

In my first post I basically suggested three methods of loading a text file - but let's save some confusion and go with option (2.): Using an internal mareo function/method to load the text into the variable.

Let's say the path to MAREO is "C:\DOS\mareo.exe".
I have a file in the same folder ("C:\DOS") called "myfile.txt".
"myfile.txt" contains one line of text, "Hello World!".

If we do:
CODE
@variable1@ = LoadExternalText("@ownpath@\myfile.txt")

First, the line parses to:
CODE
@variable1@ = LoadExternalText("C:\DOS\myfile.txt")

... then the LoadExternalText function executes, and returns the text from the file "C:\DOS\myfile.txt" - "Hello World!".

@variable1@ now contains the text "Hello World!"

If we then do:
CODE
ape NONE NONE "@ownpath@\tag.exe" -t "COMMENT=@variable1@"

... the line will be parsed to become:
CODE
ape NONE NONE "C:\DOS\tag.exe" -t "COMMENT=Hello World!"



A real-world example using method (2.) would be:

CODE
; load text from file using mareo's internal 'LoadExternalText' function, and store it in @variable1@
@variable1@ = LoadExternalText("@ownpath@\CDImage.ape.cue")
; TAG.EXE Action Line using @variable1@
ape NONE NONE "@ownpath@\tag.exe" -t "CUESHEET=@variable1@"


I don't really think I can explain it any better.
kwanbis
that is what i thougt ... problem is ...if you pass a file with more than one line, what should i do? should i only load the first line to the variable?
WarBird
QUOTE(kwanbis @ Aug 15 2004, 10:18 PM)
that is what i thougt ... problem is ...if you pass a file with more than one line, what should i do? should i only load the first line to the variable?
*


or strip linebreaks first, maybe
Synthetic Soul
QUOTE(kwanbis @ Aug 15 2004, 08:18 PM)
that is what i thougt ... problem is ...if you pass a file with more than one line, what should i do? should i only load the first line to the variable?
*

No, otherwise it wouldn't work for cuesheets - or a lot of other files. You will need to read the whole file.

Can you pass a parameter with line breaks to a command line application? I've been searching the Internet and can't see how. I've tried all sorts, including "\r\n", "^", "$_" - all with no joy.

If you can't pass a parameter that contains line breaks then there's not much point in implementing it...
kwanbis
exactly ... that is why i'm asking ... AFAIK you can't pass lines to apps ... unless the app knows how to handle them ... like using some spetial separator or something ... but maybe the app you want does allows you to do so ... that is why i'm asking wink.gif
Synthetic Soul
Damn, that's scuppered it.

Ok, very sorry to have wasted your time kwanbis.

I look forward to seeing mareo version 2.
rfarris
QUOTE(kwanbis @ Aug 15 2004, 06:09 PM)
exactly ... that is why i'm asking ... AFAIK you can't pass lines to apps ... unless the app knows how to handle them ... like using some spetial separator or something ... but maybe the app you want does allows you to do so ... that is why i'm asking wink.gif
*

The key there is "unless the app knows how to handle them," so unless the app in question knows how to handle stdin -- which would imply handling linebreaks -- you're out of luck.

I remember this used to be a big problem with 'make.' If the command line options got to be too big for a DOS command line (128 chars?) they would get cut off. One solution was to write the output to a text file and then pass the name of that text file to make with an @-sign appended to the front. I don't know whether that was a DOS thing, or a specific make-program thing...

-- Rick

----
Moderation: removed long off-topic signature.
Jasper
QUOTE(kwanbis @ Aug 16 2004, 03:09 AM)
exactly ... that is why i'm asking ... AFAIK you can't pass lines to apps ... unless the app knows how to handle them ... like using some spetial separator or something ... but maybe the app you want does allows you to do so ... that is why i'm asking wink.gif
*
I just tried it, and with a simple test application I had no trouble passing a newline on the commandline programmatically. So it would be possible to read a file and pass it on the commandline along with the newlines.
I'm currently trying to create a more elaborate example.
Jasper
I created a relatively small example program in C that takes two arguments, a program to be executed and a file containing the commandline parameters (in reverse order, so first the commandline parameters file and then the program). The format of the commandline parameters file is very simple, each line is treated as a single argument, \n is replaced with CRLF (it would be better to replace it with just LF and also provide \r if needed).
The executable can be downloaded from:
http://home.hccnet.nl/th.v.d.gronde/runner.exe
The source:
http://home.hccnet.nl/th.v.d.gronde/runner.c

It's by no means meant to be a usefull program, it's just meant as an illustration that it is in fact possible to pass newlines in a parameter. The Windows 32KB limit still applies though (the total length of the parameters, including separating spaces, can't exceed 32KB), as far as I know at least, I haven't tested it.

To test it I ran the following (from the Visual Studio IDE):
CODE
runner d:\temp\cmdline.txt "C:\Program Files\Tagger\tag"

The cmdline.txt file was as follows:
CODE
--comment
Line1\nLine2
D:\Audio2\001_008 - Good Times, Bad Times - 2004-02-13 11.13.40.ogg

This worked (afterwards tag would properly show the multiline comment when asked to display the tag of the file), except that for some reason tag complained about not finding a certain file, I have no idea why it did that.

I also have a small program available that will simply print out the arguments it received for testing purposes:
http://home.hccnet.nl/th.v.d.gronde/runned.c
A compiled version is available from:
http://home.hccnet.nl/th.v.d.gronde/runned.exe

EDIT: One thing I forgot to mention is that I surround each argument by double quotes (") so it won't separate the arguments at spaces, as for some reason it would still do that even though I pass the arguments as an array of strings (apparently it concatenates them and then parses them like a normal commandline). They are not needed for the newlines btw.
phwip
Hi kwanbis,

Any news on the release of MAREO 2.0? If it's not finished, is there a beta we can play with yet?
kwanbis
well ... beta 1 s progrssing fine ... (i'm implmenting all the sugestions, and trying to fix all previous problems) ... its almost done, but some real life problems forbid me from releasing ... i'm also studing some multithreaded code to implement in 2.0 final ... i would try to finish it this week
kwanbis
ok then ... here it is ... "RC1" ... i havent even updated the docs ... pay attention to the new ini file:

EXT: the string that identifies the encoded files extension (ogg, mp3, mpc). You can use NONE to run pre-processing apps (like wavegain).

PATH: here you can set a different path where MAREO would put the encoded file of the specific encoder. It must be a fully qualified Path Name. Also, instead of spaces, use the _. It is ignored for the first encoder Action Line, cause EAC and CDex like to rename the files themselves.

ENCODER: the encoder location and file name.

PARAMETERS: this is the real command that MAREO would execute, after replacing all the LITERALS with the correspongin values.

EXT = mp3
PATH = NONE
ENCODER = c:\EAC\lame.exe
PARAMETERS = --alt-preset standard -Z --ta "@artist@" --tl "@cdname@" --tt "@songname@" --tn "@track@" --ty "@year@" --tg "@genre@" --tc "EAC+LAME -alt-pre-standard-Z" "@source@" "@dest@"

MAREO home page
kwanbis
the fisrt parametter thath should be passed with EAC/CDex to mareo is the ini file like in "mareo.ini xxxxxx"
phwip
Thanks Kwanbis for RC1. Unfortunately I am having trouble getting this to work with an encoder line that doesn't actually do anything other than renamed as discussed earlier in the thread:

QUOTE(kwanbis @ Jun 1 2004, 12:23 PM)
QUOTE(phwip @ Jun 1 2004, 10:53 AM)
This is a bit messy.  So would it be possible to enhance MAREO so it can take NONE as the CommandToRunWithParameters (ie. the fourth item in an action line)?

you bet smile.gif
*


In my new ini file I have the following lines:
CODE
EXT = ofc
PATH = NONE
ENCODER = NONE
PARAMETERS = NONE

This follows a line where the wav file is encoded using OptimFrog DualStream with the --correction option which creates both an ofs and ofc file where the filename is EAC's temporary name. EAC will rename the ofs file itself, but I want MAREO to rename the ofc file to the true filename.

I find that the above generates the error "EXECUTING: NONE NONE.... *ERROR*!".

If I try changing the lines to
CODE
EXT = ofc
PATH = NONE
ENCODER =
PARAMETERS =
or removing the ENCODER and PARAMETER lines completely then MAREO completely ignores this second encoder step.

I would be very grateful if you would tell me what I am doing wrong.
phwip
In addition to the above, there is a second problem which is that the rename fails because for some reason I can't understand it is appending -2 to the TMP Dest. For example:

CODE
*** PROCESSING ENCODER ORDER # 1 ***
.....
TMP Dest Full Name = .....\Rtmp58-!).ofs
.....
*** PROCESSING ENCODER ORDER # 2 ***
.....
TMP Dest Full Name = .....\Rtmp58-!)-2.ofc


But the ofc file is actually generated by "encoder order 1" and is therefore named Rtmp58-!).ofc. There is not such file as Rtmp58-!)-2.ofc.

Where is this "-2" coming from?

Thanks for your help.
Synthetic Soul
Is there any way to get the final file name in mareo (excluding extension)?

I was wondering whether you could use:

CODE
EXT = NONE
PATH = NONE
ENCODER = CMD.EXE
PARAMETERS = /C REN "@pathonly@/@nameonly@.*" "<finalname>.*"

This would would rename any file with the temporary name (@nameonly@) to <finalname>, irrespective of file extension (i.e.: it could be implemented for WavPack users also).

If there were a mareo variable for the final name then this could work - if you are running Win2K, NT or XP.


Alternatively, and I guess this is what you are more after, it should be easy enough for mareo to run a command at the end to rename any temporary files to the final name.

[edit]Added final sentence, as I seem to have missed the point a little...[/edit]
kwanbis
QUOTE(phwip @ Aug 29 2004, 09:09 PM)
This follows a line where the wav file is encoded using OptimFrog DualStream with the --correction option which creates both an ofs and ofc file where the filename is EAC's temporary name.  EAC will rename the ofs file itself, but I want MAREO to rename the ofc file to the true filename.

I find that the above generates the error "EXECUTING: NONE NONE.... *ERROR*!".


QUOTE(phwip @ Aug 29 2004, 09:11 PM)
In addition to the above, there is a second problem which is that the rename fails because for some reason I can't understand it is appending -2 to the TMP Dest.[/code]


QUOTE(Synthetic Soul @ Aug 31 2004, 02:10 PM)
Alternatively, and I guess this is what you are more after, it should be easy enough for mareo to run a command at the end to rename any temporary files to the final name.


ok ... now it looks like it is working ... i have simulated optimfrog (i created the temporal .ofc file before calling mareo) and it looks to be working ok ...

here is my ini text (note that i'm really using LAME to make the files, but should be the same):
EXT = mp3
PATH = NONE
ENCODER = c:\EAC\lame.exe
PARAMETERS = --alt-preset standard -Z --ta "@artist@" --tl "@cdname@" --tt "@songname@" --tn "@track@" --ty "@year@" --tg "@genre@" --tc "EAC+LAME -alt-pre-standard-Z" "@source@" "@dest@"
;
EXT = ofc
PATH = c:\EAC\kk
ENCODER = NONE
PARAMETERS = NONE

i just uploaded MAREO RC2 then ... still no updated docs blink.gif

EDIT: just downloaded OptimFROG_DualStream_Win32_4509 and i tried with a real INI setting:

EXT = ofs
PATH = NONE
ENCODER = ofs.exe
PARAMETERS = --correction @source@
;
EXT = ofc
PATH = NONE
ENCODER = NONE
PARAMETERS = NONE

IT WORKS!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.