|
oblivion
|
 |
« on: March 21, 2011, 09:30:00 AM » |
|
I am a bit of a podcast addict. Sadly, I get a bit behind and -- because I TRY to be organised -- I keep my podcasts in a single folder, so I can sort them in date order, and transfer the oldest first to my MP3 player.
Mostly, this works very well. But one of the podcasts I regularly get comes in M4A format. Although the software I use to transfer stuff to my player converts things on the fly, I prefer to do the conversion myself so I can control the output quality and filesize a bit better.
So far, I have found the easiest way to do this is to use fre:ac (the new version of BonkEnc, still free though) to do the conversion to MP3, output the files somewhere away from the originals, then use another little freebie (filedate) to re-datestamp the new files to match the originals, so they don't get sorted to the end of the list. Fiddly and time-consuming, especially if you've only just got round to it after a few weeks of letting M4As build up...
Two related requests, then. Either a program that can suck in an audio file (or a list of files) and squirt out an MP3 with the same time/datestamp as the original, optionally deleting the original... or if doing that is too complex for a "snack", a program that can display two lists of files, allow them to be lined up by hand in case filenames don't quite match, then apply the date/timestamps from the source list to the destination list.
|
|
|
|
|
Logged
|
-- bests, Tim
...this space unintentionally left blank.
|
|
|
|
mouser
|
 |
« Reply #1 on: March 21, 2011, 09:32:14 AM » |
|
interesting... in thinking about a general purpose solution, one question is, can you keep the base filenames the same? if so then a good general purpose solution might be an app that scans a directory and sets the file date stamps for all sets of files with same basename (and different extensions) to the date of earliest datestamp in the set.
|
|
|
|
|
Logged
|
|
|
|
|
skwire
|
 |
« Reply #2 on: March 21, 2011, 11:17:43 AM » |
|
Either a program that can suck in an audio file (or a list of files) and squirt out an MP3 with the same time/datestamp as the original fre:ac actually comes with a commandline version in its install so that, combined with a small bit of AHK script, would make this a piece of cake. Heck, you could even use the lame.exe file directly. Do you have AutoHotkey installed?
|
|
|
|
|
Logged
|
|
|
|
|
|
oblivion
|
 |
« Reply #3 on: March 21, 2011, 11:37:20 AM » |
|
fre:ac actually comes with a commandline version in its install so that, combined with a small bit of AHK script, would make this a piece of cake. Heck, you could even use the lame.exe file directly. Do you have AutoHotkey installed?
I've got a portable copy somewhere, but I've never tried to use it. You're a proper programmer, I just pretend to know what it's about sometimes. (I can sometimes write very simple and mechanistic black boxes -- take some input textfile, chop it up, put it back together in a different order, exit. Anything requiring screen design or direct access to the Windows API, I'm running away so fast people are choking on the dust.)
|
|
|
|
|
Logged
|
-- bests, Tim
...this space unintentionally left blank.
|
|
|
|
oblivion
|
 |
« Reply #4 on: March 21, 2011, 11:56:51 AM » |
|
Do you have AutoHotkey installed?
Okay, just had a bit of a look at the helpfile for it. It looks like a file loop could be used to retrieve the file list and operate on them one at a time, and if I can throw commands at fre:ac or Lame, I might even be able to puzzle something out. What I'm less sure about is -- as I suggested previously -- putting a front end on it. To make it reliable, I'd want a front end on it that allowed the specification of the input and output sources and a path to LAME or fre:ac or whatever, and I suppose to make it bulletproof it'd probably have to be able to specify encoder options and suddenly it's looking like I really should be running away from all this ui stuff 
|
|
|
|
|
Logged
|
-- bests, Tim
...this space unintentionally left blank.
|
|
|
|
skwire
|
 |
« Reply #5 on: March 21, 2011, 12:07:08 PM » |
|
Here's a proof-of-concept script. - Save this to <whatever>.ahk and put it in your fre:ac folder.
- Edit the myOutputDir variable to an output folder of your choice.
- Run the script. You should see a small square begging for you to drop some files on it.
- Drop some files on it!
- They will be converted to mp3 and placed in your chosen output directory with the original modification times.
Formatted for Autohotkey with the GeSHI Syntax Highlighter [ copy or print] ; Set up environment. ; Variables. AppName := "Podblivion" myOutputDir := "c:\tmp2" ; Build simple drop target. Gui, Add, Text, xm ym w150 h150 Center 0x200 vtxtDisplay , Drop files here ... Return ; End of auto-execute section. GuiDropFiles: { { { ; Notify user that we're doing something. ; Get modified time of dropped file. ; Crack path and form up output filename with mp3 extension. myOutputFile := myOutputDir . "\" . myFileNameNoExt . ".mp3" ; Set parameters for the freaccmd.exe program. cmdParams := "-e LAME -m VBR -b -q 5 -d " . myOutputDir . " """ . myFilePath . """" ; Convert file. ; Set output file's modified time to input file's value. } } } { } { }
|
|
|
|
|
Logged
|
|
|
|
|
oblivion
|
 |
« Reply #6 on: March 23, 2011, 05:17:34 AM » |
|
interesting... in thinking about a general purpose solution, one question is, can you keep the base filenames the same? if so then a good general purpose solution might be an app that scans a directory and sets the file date stamps for all sets of files with same basename (and different extensions) to the date of earliest datestamp in the set.
Sorry, I didn't notice this response before. I don't see why you couldn't constrain most conversion apps to work in that way, and it occurs to me that a general purpose app that took that approach might be useful for all sorts of things where you might want the creation date to be retained in a different file format. Photos as well as audio -- maybe even MORE than audio, since I suspect my idiosyncratic approach to podcasts may not be "normal." 
|
|
|
|
|
Logged
|
-- bests, Tim
...this space unintentionally left blank.
|
|
|
|
oblivion
|
 |
« Reply #7 on: March 23, 2011, 05:58:32 AM » |
|
Here's a proof-of-concept script.
Thanks! It doesn't seem to want to work, though. The script is in the freac app directory (\portableapps\freacportable\app\freac) and freaccmd.exe is present in the same place. I can drop an m4a onto it and it does the "converting" thing for a little while then stops, but I can't find any sign of the output file in the folder I specified (g:\temp) or, indeed, anywhere else. Any idea what might be going wrong, or how I can watch what it's doing in more detail, perhaps?
|
|
|
|
|
Logged
|
-- bests, Tim
...this space unintentionally left blank.
|
|
|
|
skwire
|
 |
« Reply #8 on: March 23, 2011, 12:16:13 PM » |
|
Any idea what might be going wrong, or how I can watch what it's doing in more detail, perhaps? On line 43, you can take off the "Hide" keyword. This will allow you to see the freaccmd.exe window.
|
|
|
|
|
Logged
|
|
|
|
|