IPB

Welcome Guest ( Log In | Register )

flac to mp3, without gui and without temp wav file
AlexanderTG
post 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
Go to the top of the page
+Quote Post
 
Start new topic
Replies
legg
post Aug 24 2005, 03:10
Post #2





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
Go to the top of the page
+Quote Post
Mr_Rabid_Teddybe...
post Aug 24 2005, 03:52
Post #3





Group: Members
Posts: 1197
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
Go to the top of the page
+Quote Post
legg
post Aug 24 2005, 04:01
Post #4





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
Go to the top of the page
+Quote Post

Posts in this topic
- AlexanderTG   flac to mp3   Aug 23 2005, 19:52
- - Digisurfer   foobar2000 0.8.3 (foo_flac 1.0.17) + LAME 3.96.1 w...   Aug 23 2005, 20:11
- - NumLOCK   Hi, At least in linux, you can try something like...   Aug 23 2005, 20:11
- - AlexanderTG   does that mean it cant be done in a win32 environm...   Aug 23 2005, 20:20
- - tycho   Sure it can be done in a win32 console window (Sta...   Aug 23 2005, 20:28
|- - snookerdoodle   QUOTE (AlexanderTG @ Aug 23 2005, 12:52 PM)is...   Aug 24 2005, 00:13
- - AlexanderTG   cool that works! so would i be right in sayin...   Aug 23 2005, 20:40
|- - tycho   QUOTE (AlexanderTG @ Aug 23 2005, 11:40 AM)co...   Aug 23 2005, 20:52
- - AlexanderTG   thats excellent while the commandline script was...   Aug 23 2005, 21:14
- - gfngfgf   Just a guess here, but MP3 and FLAC are designed f...   Aug 23 2005, 22:10
- - Daffy   Someone asked for something similar out of Lamedro...   Aug 24 2005, 00:23
- - Mr_Rabid_Teddybear   Same commandline a bit shorter: CODEflac -dc myfil...   Aug 24 2005, 00:46
- - DilbyŠ   This is what you want, includes windows rightclick...   Aug 24 2005, 00:59
- - Klyith   Aargh, Dilby, I was just writing a how-to on batch...   Aug 24 2005, 01:21
|- - Mr_Rabid_Teddybear   QUOTE (Klyith @ Aug 23 2005, 04:21 PM)Though ...   Aug 24 2005, 01:39
- - Klyith   QUOTE (Mr_Rabid_Teddybear @ Aug 23 2005, 08:3...   Aug 24 2005, 02:56
- - legg   a batch that would convert all flac files in a dir...   Aug 24 2005, 03:10
- - Mr_Rabid_Teddybear   QUOTE (legg @ Aug 23 2005, 06:10 PM)a batch t...   Aug 24 2005, 03:52
- - legg   [quote=Mr_Rabid_Teddybear,Aug 23 2005, 09:52 PM] C...   Aug 24 2005, 04:01


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 30th August 2014 - 18:13