flac to mp3, without gui and without temp wav file |
![]() ![]() |
flac to mp3, without gui and without temp wav file |
Aug 23 2005, 19:52
Post
#1
|
|
![]() Group: Members Posts: 216 Joined: 26-March 05 Member No.: 20965 |
hi
is it possible to transcode from flac to mp3 without using any of the available gui's and without creating a wave file from the flac file first and then converting that wave file to mp3. i would like to understand how this can be done (if it can be done). Ax edit----------- basically, what command line could be used to do this? im guessing i would need to make use of the stdin and stdout? Thanks This post has been edited by AlexanderTG: Aug 23 2005, 19:59 |
|
|
|
Aug 23 2005, 20:11
Post
#2
|
|
![]() Group: Members Posts: 371 Joined: 10-August 04 From: Canada Member No.: 16174 |
foobar2000 0.8.3 (foo_flac 1.0.17) + LAME 3.96.1 works fine for me.
Edit: Yeah I know that means a gui, so what it works. This post has been edited by Digisurfer: Aug 23 2005, 20:13 |
|
|
|
Aug 23 2005, 20:11
Post
#3
|
|
|
Neutrino G-RSA developer Group: Developer Posts: 852 Joined: 8-May 02 From: Geneva Member No.: 2002 |
Hi,
At least in linux, you can try something like: QUOTE flac -d --stdout myfile.flac | lame -preset standard - myfile.mp3 -------------------- Try Leeloo Chat at http://leeloo.webhop.net
|
|
|
|
Aug 23 2005, 20:20
Post
#4
|
|
![]() Group: Members Posts: 216 Joined: 26-March 05 Member No.: 20965 |
does that mean it cant be done in a win32 environment?
how do programs like foobar2000 pass a flac stdout to the lame encoder? This post has been edited by AlexanderTG: Aug 23 2005, 20:22 |
|
|
|
Aug 23 2005, 20:28
Post
#5
|
|
|
Group: Members Posts: 345 Joined: 5-August 03 Member No.: 8183 |
Sure it can be done in a win32 console window (Start | Run | cmd.exe)
Make sure flac.exe and lame.exe are in one of the directories in the %PATH% variable (or specify full path to them): CODE C:\> flac.exe -d --stdout myfile.flac | lame.exe --preset fast standard - myfile.mp3
|
|
|
|
Aug 23 2005, 20:40
Post
#6
|
|
![]() Group: Members Posts: 216 Joined: 26-March 05 Member No.: 20965 |
cool that works!
so would i be right in saying that you can do the same thing using monkey's flac wavpack etc stdout to mp3 aac ogg mpc ? would the command lines be the same only differences in the quality setting of the lossy format and the encoder names? |
|
|
|
Aug 23 2005, 20:52
Post
#7
|
|
|
Group: Members Posts: 345 Joined: 5-August 03 Member No.: 8183 |
QUOTE (AlexanderTG @ Aug 23 2005, 11:40 AM) cool that works! so would i be right in saying that you can do the same thing using monkey's flac wavpack etc stdout to mp3 aac ogg mpc ? would the command lines be the same only differences in the quality setting of the lossy format and the encoder names? Yes, but all encoders /decoders has their way to specify stdin/stdout, although most of the time its by giving "-" as file name, or specifying somthing like --stdout as in the flac decoder. |
|
|
|
Aug 23 2005, 21:14
Post
#8
|
|
![]() Group: Members Posts: 216 Joined: 26-March 05 Member No.: 20965 |
thats excellent
while the commandline script was running i clicked contro alt delete to bringup the taskbar and noticed there was no lame or flac to be seen. instead i saw this ![]() is this normal? if it is how can i tell which one is lame and which one is flac? |
|
|
|
Aug 23 2005, 22:10
Post
#9
|
|
|
Group: Members Posts: 899 Joined: 2-November 04 Member No.: 17951 |
Just a guess here, but MP3 and FLAC are designed for fast decoding, relatively slow encoding (at least, that's what I think), so the one using more of the CPU is probably LAME. Just a guess.
|
|
|
|
Aug 24 2005, 00:13
Post
#10
|
|
|
Group: Members Posts: 120 Joined: 13-May 05 From: Albuquerque Member No.: 22035 |
QUOTE (AlexanderTG @ Aug 23 2005, 12:52 PM) is it possible to transcode from flac to mp3 without using any of the available gui's and without creating a wave file from the flac file first and then converting that wave file to mp3. QUOTE (tycho @ Aug 23 2005, 01:28 PM) Sure it can be done in a win32 console window (Start | Run | cmd.exe) Make sure flac.exe and lame.exe are in one of the directories in the %PATH% variable (or specify full path to them): CODE C:\> flac.exe -d --stdout myfile.flac | lame.exe --preset fast standard - myfile.mp3 I'll just add that your mp3's will be missing tags from your flac files if they had them. AFAIK, the only way to get them out is with metaflac... Mark |
|
|
|
Aug 24 2005, 00:23
Post
#11
|
|
![]() Group: Members Posts: 187 Joined: 30-September 01 From: North Carolina Member No.: 114 |
Someone asked for something similar out of LamedropXPd a while ago and it never happened, although john33 said "maybe". Perhaps he forgot or felt it wasn't necessary. Would be nice though....
flac support in lamedropxpd? |
|
|
|
Aug 24 2005, 00:46
Post
#12
|
|
![]() Group: Members Posts: 1193 Joined: 3-September 03 From: Bergen, Norway Member No.: 8667 |
Same commandline a bit shorter:
CODE flac -dc myfile.flac | lame -V 2 --vbr-new - myfile.mp3 Ofcourse it would have been cool to be able to pass on the tags on commandline. I don't know anyway to do that. BTW. The Lame options are for new versions. If you use 3.90.3 you shoud use --alt-preset standard or --alt-preset fast standard ofcourse... -------------------- "ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
- Oceania Association of Autonomous Astronauts |
|
|
|
Aug 24 2005, 00:59
Post
#13
|
|
|
Group: Members Posts: 48 Joined: 15-July 05 Member No.: 23339 |
This is what you want, includes windows rightclick menu integration. Only problem is that it doesnt work with filenames with spaces, use Tag&Rename to do a batch rename to relpace spaces with underscores. It even tags the output files.
http://www.hydrogenaudio.org/forums/index....showtopic=27026 The link in the last post at the bottom. |
|
|
|
Aug 24 2005, 01:21
Post
#14
|
|
![]() Group: Members (Donating) Posts: 352 Joined: 10-July 04 From: Albany NY USA Member No.: 15259 |
Aargh, Dilby, I was just writing a how-to on batch files and right click. I shoulda known that someone here would have already done that. Good thing I previewed or I would have looked silly.
Though I think anticrust's batch file is a bit over-complex... Having to interact with a batch is annoying, as are the limits for file locations. It's much easier just to have several smaller scripts that do one job. I also prefer operating on files, not directories. But the bits for transferring tags are neat, I may have to copy those. |
|
|
|
Aug 24 2005, 01:39
Post
#15
|
|
![]() Group: Members Posts: 1193 Joined: 3-September 03 From: Bergen, Norway Member No.: 8667 |
QUOTE (Klyith @ Aug 23 2005, 04:21 PM) Though I think anticrust's batch file is a bit over-complex... Having to interact with a batch is annoying, as are the limits for file locations. It's much easier just to have several smaller scripts that do one job. I also prefer operating on files, not directories. But the bits for transferring tags are neat, I may have to copy those. If you make some that differs in various aspects, it would ofcourse be nice if you posted yours for others to look at..... -------------------- "ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
- Oceania Association of Autonomous Astronauts |
|
|
|
Aug 24 2005, 02:56
Post
#16
|
|
![]() Group: Members (Donating) Posts: 352 Joined: 10-July 04 From: Albany NY USA Member No.: 15259 |
QUOTE (Mr_Rabid_Teddybear @ Aug 23 2005, 08:39 PM) If you make some that differs in various aspects, it would ofcourse be nice if you posted yours for others to look at..... I will definitely do so after I figure out how it all works. It uses some code I haven't seen before. Maybe I can use tag.exe to do tags. That might be faster and easier, and it would also be more universal. Here's what I had written out before. The batch file is ultra simple, but the instructions for binding to file associations may be helpful for people who don't want to use an installer... You can make a batch file with this: CODE [path\]flac.exe -dc %1 | [path\]lame.exe [lame options] - %1.mp3 [] = optional. The "pause" will make the command box wait for you to press a key before it closes so you can see what happened. I particularly like that because I use --verbose in the lame options.[pause] Then save the batch file somewhere (if you put it in the same directory as flac.exe and lame.exe you don't need the path. Now you can associate that to a new entry in the right click actions for all flac files. Then, in and windows folder, open tools -> folder options -> file types. Find & select the entry for flac, and click the "advanced..." button, and then the "new..." button. In the box that pops up, the first text entry is for the name that will be on the right menu. You can call it anything you want, something like "Flac to Mp3" would be good. Then click the "browse" and find your batch file. After you hit ok, you need go to the end of the entry and add " %1". That's space percent one, nothing else. Now hit OK three times. Now you can right click any flac file and automatically make an mp3 copy. Just be sure to only do one at a time, because if you have multiple files selected and try it they will all go at once instead of one at a time. If you want to do a bunch use something like foobar that can make a queue. |
|
|
|
Aug 24 2005, 03:10
Post
#17
|
|
|
Group: Members Posts: 175 Joined: 5-March 05 From: Morelia, Mexico Member No.: 20386 |
a batch that would convert all flac files in a directory to mp3?
CODE for %%i in (*.flac) do [path\]flac.exe -dc %%i | [path\]lame.exe [lame options] - %%~ni.mp3 [pause] BTW, the ~n is meant to remove the .flac extension of the filename, so that myfile.flac be converted to a myfile.mp3 file and not to a myfile.flac.mp3 file. -------------------- Home page: http://lc.fie.umich.mx/~legg/indexen.php
|
|
|
|
Aug 24 2005, 03:52
Post
#18
|
|
![]() Group: Members Posts: 1193 Joined: 3-September 03 From: Bergen, Norway Member No.: 8667 |
QUOTE (legg @ Aug 23 2005, 06:10 PM) a batch that would convert all flac files in a directory to mp3? CODE for %%i in (*.flac) do [path\]flac.exe -dc %%i | [path\]lame.exe [lame options] - %%~ni.mp3 [pause] BTW, the ~n is meant to remove the .flac extension of the filename, so that myfile.flac be converted to a myfile.mp3 file and not to a myfile.flac.mp3 file. That works. Although not if there are any spaces in filenames. An a bit more aesthetically pleasing version (requires lame.exe and flac.exe in searchpath, e.g. System32) could be like the following. But no tags will still obviously be copied over. For that more advanced scripting will be required. CODE @echo off
title flac2mp3 for %%i in (*.flac) do flac.exe -dc %%i | lame.exe -V 2 --vbr-new - %%~ni.mp3 echo. echo. echo All done! echo Hit any key to exit. pause > nul exit -------------------- "ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
- Oceania Association of Autonomous Astronauts |
|
|
|
Aug 24 2005, 04:01
Post
#19
|
|
|
Group: Members Posts: 175 Joined: 5-March 05 From: Morelia, Mexico Member No.: 20386 |
[quote=Mr_Rabid_Teddybear,Aug 23 2005, 09:52 PM]
CODE @echo off title flac2mp3 for %%i in (*.flac) do flac.exe -dc "%%i" | lame.exe -V 2 --vbr-new - "%%~ni.mp3" echo. echo. echo All done! echo Hit any key to exit. pause > nul exit That should do the trick to include filenames with spaces. -------------------- Home page: http://lc.fie.umich.mx/~legg/indexen.php
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 25th May 2013 - 10:22 |