Page 1 of 2

Saving QTExternal to Wav

Posted: Tue May 26, 2009 11:10 pm
by bidgeeman
Hi.
This code is a little bit beyond me. I has a response from Trevor at Blue Mango learning re: QTExternal plugin. My question was: Is it possible to have just one export setting (WAV) when saving out a file rather than ALL the options that come with the plugin. Here is his response.

1) Call qtGetExportSettings
qtGetExportSettings the movieControllerID of player 1, 0, "wav", "myStoredSettings"

2) Configure export dialog to the settings you want to export with.

3) Save "myStoredSettings" in a custom property of a Revolution object.

4) Call qtExport, passing in the value stored from the "myStoredSettings" variable.
put the uStoredSettings of this stack into myStoredSettings
qtExport the movieControllerID of player 1, 0, theFileName, "wav", "myStoredSettings"

Can someone please give me a little help with the code?

Cheers
Bidge

Posted: Wed May 27, 2009 2:48 pm
by bn
David,

before going into this make shure that your Quicktime supports the codecs you want. E.g. I dont find an option to export audio to mp3 format.
It offers mp4 and a bunch of other formats.
That actually is up to the codecs (coding/decoding) plug-ins you have installed. Quicktime has many codecs preinstalled. but by no means all that exists.
I suggest you try in the quicktime player to load a audio file that you want to use. Than try to export that and check the export options, whether your format is on offer.
It might be that the simple quicktime player does not offer the export option. Than you can either buy for $30 quicktime pro. But if you dont know whether your codec is in it then you might ask someone you know, or someone in this forum if your preferred format is suppoerted.
Once you get that sorted out you can start with the Enhanced quicktime plug-in.

Klaus is on this forum, he is a musician and knows Quicktime and knows the enhanced Quicktime external.
Maybe he knows a better way to deal with this.
(And he has supernatural powers: when his name is mentioned he usually shows up within a short time :) )

Maybe you could tell us what exactly you ard trying to do.
Last time you did this batch thing to string together a bunch of wav files and turn them into one mp3 file. Is that what you want?

Since working with the enhanced quicktime external is a little more involved it helps to check things beforehand.

regards
Bernd

Posted: Wed May 27, 2009 3:10 pm
by bidgeeman
Hi Bernd.

I have completed my little application that stings together mp3 files. Now I need to export the m3 as a wav. I managed to figure out how to get the QTExternal to save a wav file but QTEXternal has many other options in it's "Save As" dialogue. I asked Blue Mango if there was a way to limit the amount of export options. Appaently there is'nt. Trevor sent me this option to pre-set an option, but I'm afraid it's beyond my skills at the moment to follow his instructions.
Sorry but if someone could explain the instructions to a newbie a bit clearer it would be much appreciated.

Cheers
Bidge

Posted: Wed May 27, 2009 8:53 pm
by bn
David,

I uploaded an example stack, not fancy at all, to revonline 3.5
Not fancy, but it shows how to store the custom properity for the export setting and you can concatenate 2 audiofiles and export them.
I is called Audio_mixer, if you search for that you should be able to find it.
(it is easier to show an example then to explain it all)
regards
Bernd

Posted: Wed May 27, 2009 9:41 pm
by Klaus
I can feel that my name has been dropped here once again? :-D

Unfortunately I have little time until this weekend and the answer to the initial question
may take some time. So if you can wait a little, Bidge, I will answer your question in
detail on the weekend.


Best

Klaus

If your are interested please check my bands website, its in german, but "Sounds" are,
well, international :-)
http://www.andernfalls.de
See also "Bilder" = "Pictures"

I play the bass, see also my basspage:
http://www.major-k.de/bass

Posted: Wed May 27, 2009 11:19 pm
by bn
You see bidge,
Klaus is with us :)
his magic is still working.

Bidge, try the example and see how far you get.
btw try to post your questions regarding the enhanced QT external here. Trevor is a very nice and helpful man but also very busy and right now helping a lot of people to get to grips with the datagrid. So lets ask him as a last resort. With Klaus hovering over us we will work it out.

regards
Bernd

Posted: Wed May 27, 2009 11:24 pm
by bidgeeman
Thanks Bernd and Klaus.

I really appreciate your time guys. Normally I will bury my head for hours in a probem and try to figure things out for myself. It's when I run into a brick wall I will post here. It's Trevors description of what to do that I can't get my head around. I understand the first part bt these two parts are not clear to me as I'm new to the language:

2) Configure export dialog to the settings you want to export with.

3) Save "myStoredSettings" in a custom property of a Revolution object.


Anyway, I'm really enjoying working in Runrev though and this forum is great!

Thanks again for all the help.
Cheers
Bidge

Posted: Wed May 27, 2009 11:29 pm
by bidgeeman
Hi Bernd.

No problem. I understand how busy Trevor is and will not bother him Thanks for the heads up on that. Bernd, I am on the revonline site. Whee do I find the stack?

Thanks
Bidge

Posted: Wed May 27, 2009 11:34 pm
by bidgeeman
Found it!
Thanks Bernd. Looking at it now.

Cheers
Bidge

Posted: Wed May 27, 2009 11:40 pm
by bidgeeman
Hello again Bernd.
I have a question please.

where is the "myStoredSettings" var in the stack? Just trying to get my head around how you create/set these settings in the first place.

Thanks
Bidge

Posted: Thu May 28, 2009 1:23 am
by bidgeeman
Ahh....I think I have figured it out....The player object contains the stored settings right?

EDIT:
The only part I don't understand now is what the "0" means in this line:

Code: Select all

 qtGetExportSettings the movieControllerID of player 3, 0, "wav", "myStoredSettings"  
If someone could explain what the "0" is referring to I would be very grateful.

Thanks again.
Bidge
[/quote]

Posted: Thu May 28, 2009 10:27 am
by bn
bidge

0 means all tracks. A quicktime file can have many tracks. Either sound or movie and then some. You could specify the track you want to save. In your case you create just one track, in other cases you would create more.
Just leave it as 0.
from the documentation of the enhanced qt external
command qtGetExportSettings MovieController, TrackIndex, pType, ExportVariable
Description:
Displays a compression dialog allowing you to configure and store export settings.
Parameters:
MovieController: Movie controller id of player to export.
TrackIndex: Index of track to export. 0 for entire movie.
pType: Type of exporter to get (movie, aiff, wav, dv, 3gpp, ipod)
ExportVariable: Name of variable to store data in.
Return:
empty or error ("qterr,user canceled dialog" if user cancels.).
if you want to look at the custom property you go to the inspector for the stack, choose custom properties and there you see an entry for "myWavSettings", which you created and modified when getting the settings.
The settings now are not stored with the player object.
Any object in Rev can have a custom property attached. If you wanted also the player. I just put it into the stack to make it easy to find.
Think of custom properties as of global variables but they are saved when the stack is saved and so they are persistent.
Custom properties are in my experience a little hard to understand but when you geht the idea they are a very convenient way to store data.
You can store all kinds of data in there, arrays or binary data. As a matter of fact the Quicktime settings are binary data.

So you can store the settings in any custom property you want as long as you remember where you put it :)

glad you got it working.
regards
Bernd

Posted: Thu May 28, 2009 10:40 am
by bidgeeman
Thanks again Bernd for all your help mate.
I actually purchased Runrev today :). I see that there is a user guide for sale too. Is it worth buying? Does it contain more detailed explanations that would be of help to a beginner like myself?

Cheers
Bidge

Posted: Thu May 28, 2009 11:15 am
by bn
Bidge,
actually I think the user guide is a printed version of the included pdf. So if you want a hardcopy I would buy it.
When I bought Runrev they offered Dan Shaffer's Software at the speed of thought. It was originally going to be a series of 3 books, but only one made it to print. I read that book, it is well written and shows a lot of important conepts of Rev with many an example. That was a good introduction and the advice well made. (I found that out the hard way when I did not follow his advice on making menus on a mac and giving stacks a unique name because Rev can not open 2 stacks with the same name at the same time.)

Dan had some more stuff as an ebook but I never bought any.
Google for Dan Shaffer.
Other than that there are good indroductions.

look at this recent thread on the revolution list
http://www.nabble.com/Re%3A-Best-Practi ... 43950.html

Often overlooked is the option in Rev under the help menu the Revolution search engine. play around with that and you discover many sites that offer sample stacks and general advice.

regards
Bernd

Posted: Thu May 28, 2009 11:27 am
by bidgeeman
Thanks again Bernd.
I think I owe you a whole box of beer by now :)

Cheers
Bidge