Results 1 to 2 of 2

Thread: Drag and Drop MP3

  1. #1
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default Drag and Drop MP3

    Would you like to have a desktop icon that you could drag and drop virtually any file that has audio in it upon and it would convert it to an MP3? I did this in Windows (7 - probably works in other recent versions), I'm sure it's similar in other OS's. First, you need FFMPEG the free audio/video command line utility and an MP3 codec (libmp3lame) for it. (some versions have it already as a part of the executable, for others, it's a separate free dll download).

    Then you need to (using a plain text editor) make a file, call it - say, any_audio_to_mp3.bat - here's what you can put there:

    Code:
    @echo off
    set filename=%1
    c:\path to ffmpeg exe\ffmpeg.exe -i %filename% -acodec libmp3lame %filename:~0,-5%.mp3
    del /P %filename%
    Then make a shortcut to this file on your desktop.

    When you drag and drop an audio containing file on it, it will pop up a command prompt window that will automatically convert it to original_filename.mp3 into the same folder where the file currently is. Once finished (takes awhile for long files, not much time for the average 3-5 minute audio piece), it will then prompt you to delete the original file, to which you can respond y or n then hit enter to execute your choice. Then the window will close.

    This can be tweaked to suit easily enough if you know and/or are willing to research a little about batch files and/or how ffmpeg works - all of which is easy to find via Google.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Oh, you can drag and drop videos on it as well, it will convert their audio to mp3. Most formats supported. Also converts from other audio to mp3. Max output quality is 320 k bits per second, but that's overkill for most things. I like to play with the output quality to match the input when possible. Most folks will be happy with the default (128k). There is a two pass method. It might work for determining input quality and matching that for output up to the max. I haven't looked too deeply into that yet. If not, I bet I can get it to read the quality, and then use that on the batch side of the equation. Let me know if any of you have done either of those. Save us all some time and storage space.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Similar Threads

  1. Using a drag and drop script with a drop down menu
    By weirddemon in forum JavaScript
    Replies: 2
    Last Post: 05-12-2008, 06:31 AM
  2. Integrating Drag & Drop w/ Drop Down menu
    By weirddemon in forum JavaScript
    Replies: 3
    Last Post: 05-10-2008, 05:25 AM
  3. drag and drop
    By radiofriendlybox in forum Looking for such a script or service
    Replies: 7
    Last Post: 03-24-2008, 02:18 AM
  4. DOM Drag & Drop script - Flash Drag Problem
    By rudamaia in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 02-13-2008, 01:08 PM
  5. Drag and drop photos from drop down menu
    By swtgoddess in forum JavaScript
    Replies: 0
    Last Post: 02-28-2006, 05:19 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •