smashly Posted August 17, 2011 Share Posted August 17, 2011 (edited) Hi,I have my stereo at home plugged to line in on my pc and sometimes record hours of radio when I'm not at home.Recording to wave format at 44kHz, 16 Bit, Stereo for hours at a time and you soon run out of drive space.So I wrote this script to Record straight to mp3.The recording flow of the script is windows WaveIn Device -> lame_enc.dll -> mp3 Update:Added start recording at time on selected days of the week.Other mild fixes. Update:Corrected Free Space input not being enabled after recording. Record To MP3 features:Record from a Wave In device continuously straight to mp3 file.Selectable Wave in quality setting. (Sample Rates 8 ~ 48kHz, 8 or 16 Bit, Stereo or Mono)Selectable CBR MP3 bitrate output setting. (32 ~ 320 Kbps)Auto appends number to the recorded file name. (to prevent overwriting existing recordings)One button record or stop.Auto Start recording at a time on selected days of the week (Record To MP3 has to be open for it to work)Size recording, stop when size is reached. (1 MB increments)Timed recording, stop when time limit is reached (ranging from 1 second upto 1 sec short of 25 hours).Free drive space, when this much hard drive space is left stop recording.Quick access to windows recording device settings.Quick access to the recording save directory.Quick access to playing the last recorded file using windows default player.Free drive space, elapsed recording time and recording size displayed.Remembers your last basic settings when launched. Most my testing has been in Win XP x86.But I have tested it briefly in Win 7 x64 (using 32bit AutoIt) as well.The script is still a WIP.Requires lame_enc.dll in the script dir. RecordToMP3.au3lame_enc.dll Some tips on recording in Win 7.If your trying to record sound that an application is currently playing (eg: media player, web browser etc) use Stereo Mix as your default recording device.If you don't know how to do that then here goes:In Record To Mp3 gui Other options -> Button (Configure the device to record from) or right click windows volume control in your systray -> Recording Devices or Control panel -> Sound -> Recording tab or..etc. In the Sound -> Recorder window that opens you have a list of your devices, right click Stereo Mix -> Set As Default Device, Your done, start recording. If Stereo Mix is not listed then Sound -> Recorder window, right click -> Show Disabled Devices.You should now have the option Stereo Mix, right click it -> Enable, right click it again -> Set as Default Device, Your done, start recording. If you still don't have Stereo Mix option then my guess is your hardware/drivers don't support it and your stuck with recording only what's listed and is wave compatible, eg: Line In, Microphone, Aux etc. Cheers Edited September 11, 2011 by smashly Link to comment Share on other sites More sharing options...
UEZ Posted August 18, 2011 Share Posted August 18, 2011 I get 2 errors:Record To Mp3.au3(511,18) : ERROR: _DiveSpace() already defined.Record To Mp3.au3(153,10) : ERROR: _LoadIni(): undefined function.Br,UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
smashly Posted August 18, 2011 Author Share Posted August 18, 2011 Hi, Sorry about that .. fixed. Thanks for letting me know Cheers Link to comment Share on other sites More sharing options...
smashly Posted August 24, 2011 Author Share Posted August 24, 2011 Hi, Update to first post. Added Stop at Size and or Time. Added Stop when Drive Free Space limit is reached. Cheers Link to comment Share on other sites More sharing options...
UEZ Posted August 24, 2011 Share Posted August 24, 2011 Well done smashly, I like it! Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
WeiHeXie Posted August 24, 2011 Share Posted August 24, 2011 Can not lame_enc.dll, to achieve the desired function? Link to comment Share on other sites More sharing options...
Zedna Posted August 24, 2011 Share Posted August 24, 2011 Code/GUI looks very nice! Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
smashly Posted August 25, 2011 Author Share Posted August 25, 2011 Hi, Thanks for the positive feedback UEZ and Zedna. WeiHeXie I'm not sure if I understand your question properly. lame_enc.dll doesn't have any built in functions to directly call to windows WaveIn functions on it's own. Basically lame_enc.dll expects chunks of pcm data and it encodes it to mp3, it doesn't know or care where the pcm data chunks comes from. It's up to the user to feed it valid chunks of pcm data to encode. (feel free to correct me if I'm wrong or misunderstood your question) Cheers Link to comment Share on other sites More sharing options...
smashly Posted August 26, 2011 Author Share Posted August 26, 2011 Hi, Updated 1st post. Added start recording at time on selected days of the week. Other mild fixes. Cheers Link to comment Share on other sites More sharing options...
TheSaint Posted August 28, 2011 Share Posted August 28, 2011 Nicely done! Thanks for sharing! Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now