Is there is some program or command line for ffmpeg\mencoder that can do just this.
Choose a file and extract the audio to the same format as the original without encoding.
There are many program that can do that but they are all with big gui windows and tons of settings\features that you must set before doing something that simple.
I mainly extract audio from flv and mp4
+ Reply to Thread
Results 1 to 24 of 24
-
-
Yes(before)but that yet another gui with tons of features and things that you must set.
I already have programs that have many features and can extract audio
Format Factory
XMedia Recode
VideoToVideo
AviDemux
VirtualDub
but I wanted something small and fast that extract the audio and that's all(no extra settings requires every time you want to extract something that have different audio format) -
Yes but that way it will save the file with mp3 extension even if the extension is aac for example.
I don't really need a gui(I can create it myself)if I can use something with command lines. -
Guess I have to run ffmpeg twice then.
1.Run ffmpeg with -i command line and output the console to text file
2.Scan that file and get the audio format(output it to variable)
3.Run ffmpeg again but this time with
ffmpeg -i video.avi -vn -acodec copy audio."the variable"
I can do all that with AutoHotkey for example
And btw,is there is a way to hide the console when I run ffplay? -
I have created a beta program that may work. It basically calls MediaInfo, reads the codecs and then uses FFMpeg to COPY to the AAC, AC3, etc. formats. I can post a link if you wish to try. It has other bells and whistles and
is mainly for fixing many FLV file problems but it should extract okay, audio and/or video. I haven't tested it with all the codec formats but it can be easily fixed if one is missing.
-
You can use TAudioConverter. Just select "Extract Audio" as method. If you have more than one audio stream in an audio, you must select the one you wanted extracted.
-
-
I used to extract ac3 from dvd rip as under:
$enim$> mplayer dvd.vob -aid 128 -dumpaudio -dumpfile audio.ac3
you can try this with different videos, just change audio file extension in accordance with media info.
Let's say tube.mp4 video
Try...
mplayer tube.mp4 -aid xxx -dumpaudio -dumpfile audio.m4a (xxx in accordance with mediainfo.)Last edited by enim; 29th Aug 2013 at 11:58.
-
Extracting is easy,but setting the correct extension requires running one extra step(either run ffmpeg one more time or use some external program)
It would be nice if there was a program that can extract the audio in one go but.
I already made the gui with AutoHotkey and I can extract the audio and save it with the correct extension -
Taudioconvert and mine, are at least 2 that extract in one shot. Did you just wish to write it with autohotkey to begin with? I don't understand why yiou
Asked for suggestions if you don't try them? -
ozok - sorry but how exactly this is any different than using one of the programs I mentioned or with ffmpeg.
The program is using tons of extra encoders\decoders,have fancy looking gui that takes time to load and have a lot of features which I actually didn't ask for and it's more than 70mb.
Sorry but don't you think that a little too much if you just want to extract audio from video
Get the file audio channel extension=>dump the audio to a file with that extension...that's all
You could say that this is all I needed
ffmpeg -i video.avi
ffmpeg -i video.avi -vn -acodec copy audio.mp3
Also for some strange reason,when I use Add=>File it doesn't show any of the flv\mp4 files I have(no matter what I choose from File of Types)but if I use,File=>Add Folder then all of the files are added
Even going to "C:\WINDOWS\Media" don't show anything on any File of Types modes
I'm on Windows XP x86 and used the portable version of the program.
And also my MediaInfo and right click=>Info says the channel is AAC but it's saved as m4a
Budman1 - I had to use google to find your site(your didn't post a link)and when I enter the site the first time,I didn't saw anything for download.
The next time I tried,I actually used the horizontal scroll bar and then I saw the links(for some reason the site is really wide and you can't tell that there is anything for download until you use the horizontal scrollbar...usually you have to scroll down to see if there is something for download and you can't see it at first glance)
Ok now I'm in the site and I see the links but on both links I get.
We could not retrieve this file because the link is invalid.
Here is the AutoHotkey code that does exactly what I asked for
Code:DetectHiddenWindows,on #NoTrayIcon ffmpeg = %A_Desktop%\bin\ffmpeg.exe stdoutFile = %A_Temp%\ffmpeg\stdout.txt stderrFile = %A_Temp%\ffmpeg\stderr.txt Gui,+AlwaysOnTop +ToolWindow Gui,Add,Text,Center w80 h15, Gui,Show,Center w160 h40,Extract Audio Return GuiClose: ExitApp GuiDropFiles: Loop,Parse,A_GuiEvent,`n { SplitPath,A_LoopField,,Dir,,Name GuiControl,,Static1,% Name Run,%ComSpec% /k ""%ffmpeg%" "-i" "%A_LoopField%" 1>"%stdoutFile%" 2>"%stderrFile%" ",,Hide Process,Wait,ffmpeg.exe,2 Process,WaitClose,ffmpeg.exe,5 WinClose,AHK_class ConsoleWindowClass ReloadF: FileRead, stderr, % stderrFile If stderr = { If Error = 3 { Error = 0 Continue } Sleep,1000 Error += 1 GoTo,ReloadF } Loop,Parse,stderr,`n { If A_LoopField contains Audio: { StringGetPos,Pos,A_LoopField,`, Ext := SubStr(A_LoopField, PoS - 2, 3) Break } } If Ext = Continue Path = %dir%\%Name%.%Ext% GuiControl,,Static1,%Name%`nExtracting RunWait,%ffmpeg% -i "%A_LoopField%" -vn -acodec copy "%Path%",,Hide Process,WaitClose,ffmpeg.exe,2 FileDelete,%A_Temp%\ffmpeg\* GuiControl,,Static1,Done Sleep,1000 GuiControl,,Static1, } Return
-
It is not different than using ffmpeg, it uses ffmpeg anyways. Baldrick suggested what you'll get closest to what you ask and you still say it is too complicated. You make it sound as if it is the most complicated task in the world. Just googling it reveals countless options to you but seem to have a different agenda.
You sound of the guys who say "There isn't single one software that does what I asked. Oh wait I've already written it!". If you want to promote your software or code, do it directly, don't throw dirt on other software. You don't want skin, disable it. It's too slow to start!? What are you using a calculator of some kind? It's just a GUI, it doesn't do much to take this much time.
You can use winff if it's not too slow or complicated for you. -
Umm,where did I said that,I was just wondering if there was a way to do that in a single step not two...like a command line that first get the info and then use it to extract the audio and use the correct extension.
And since there is no such command line,I endup using ffmpeg twice...your program is probably doing the same thing too(first get the info using something and the next task would extract the audio...exactly the same thing as my script but without the slow loading gui and extra hdd space).
I could hardly call my script a software...and I'm just saying how X software work here.
I wanted something simple that does what I asked for and if I needed something with tons of other extras...I already have such software
When I do that it start a little faster but while starting some things on the screen are flashing real bad until the gui appear.
P4 2.8Ghz 6600GT and 1GB ram.
It takes 7 seconds to load when nothing else it's running.
When adding files to the gui,every single file is scanned which takes time when you are adding a lot of files -
I thought you might be able to brute force it by testing the errorlevel when ffmpeg exits:
Code::TRYMP3 "ffmpeg" -i %1 -vn -acodec copy %1.mp3 IF ERRORLEVEL 1 GOTO TRYAC3 GOTO END :TRYAC3 del %1.mp3 "ffmpeg" -i %1 -vn -acodec copy %1.ac3 IF ERRORLEVEL 1 GOTO TRYAAC GOTO END :TRYAAC del %1.AC3 "ffmpeg" -i %1 -vn -acodec copy %1.aac IF ERRORLEVEL 1 GOTO TRYWAV GOTO END :TRYWAV del %1.aac "ffmpeg" -i %1 -vn -acodec copy %1.wav IF ERRORLEVEL 1 GOTO GIVEUP GOTO END :GIVEUP del %1.wav :END
-
Yes(before)but that yet another gui with tons of features and things that you must set.
I already have programs that have many features and can extract audioUmm,where did I said that,I was just wondering if there was a way to do that in a single step not two...
I could hardly call my script a software...
When adding files to the gui,every single file is scanned which takes time when you are adding a lot of files
Also, FYI no extra hdd space is used by TAC while extracting since it is done on the fly. -
Vsub,
First , let me say, I think it's phenomenal that you wrote that program that does exactly what you want and in as short a time as you did. I know I am not that good. The only reason I suggested my program is that it does not install, only unzips and to remove extra stuff like FFMpeg, Splash screen, Extra features, etc, takes about 10 minutes and I could even put a Folder link if you wished to YOUR FFmpeg. It is simply a GUI front end for whatever needs running and it is all behind the scenes. You never see the Command window, only the results in the Console window of the program.
I thought, no install, everything in one place, customizable as how you want, each button one function was what you were asking for and loads in seconds was a great fit for what you asked for.
As far as finding it on my site... I put in my last post:
I can post a link if you wish to try.
All in all, it is irrelevant since you did such a good job creating what you need and I'm sure it is a better fit since my program is for what I needed to fix downloaded videos and not exactly what you needed.
Thanks again for the help about my Web Site and I'll make sure it is fixed!
Budman1 -
I actually wanted to check that program to see how it works(what commands is sending)and for what are those FLV Check\Fix buttons.
I usually "download" videos by coping them from the cache by using VideoCacheView and since that program always saves the files with flv extension(even if it's not flv),I was wondering if that button has something to do with it.
I also made a script that check the video file to see what is the actual extension and rename it if it's wrong.
What exactly do you mean by "fix downloaded videos" -
VSUB, No problem. What the fix program does is either remove Meta Data including the timing which is normally messed up on FLV videos that do not play, seek, replay, stop, etc. or it replaces the Meta Data. It uses Yamdi to remove and FFmpeg to copy and replace the correct data. The check button Runs FLVMeta which the author has just updated with a better checking procedure than Adobes FLVCheck.
All of these are CLI programs, even MediaInfo that it uses to list the Media Info or get the information for extracting (ffmpeg) or renaming with the information such as "video_avc_aac_1280x640_ whatever is checked.flv". So basically it uses and includes:
FFMpeg, MediaInfoCLI, FLVMeta, Yamdi, and runs them with invisible Command screen and outputs the data to the console Window.
Since it is a GUI front end, it is easily modified to run more or less CLIs. I find that a great many FLV's (some people like) downloaded from places like YouTube, have many things wrong that cause play, convert, copy errors. Usually most just need the metadata removed or replaced except for the rare one that needs edited with a hex editor. I just download, check, remove/replace Meta, play with Media Player(Built in) or from your favorite player(button for that too), and rename for the MediaInfo data for easy reference, all from one place.
It was originally an FLV fixer and is mainly for those but Since it uses FFMpeg, the extract(copy) works on most common video formats by running Media Info and checking the codec and copying the separate files to audio and video and giving it the video name of "Video_VO.FLV(MP4, AVI, etc)" and "Audio_AO.aac(ac3, MP3, etc.) To that end, ALL the files are copied with NEW(Replace Meta) or YAM(Removed Meta) added so the originals are never touched.
There was also a request to be able to set the Created, Modified, Accessed dates the same as the Original so I added the Checkboxes for those. I also am adding a feature that plays the video with the Frame number and time in milliseconds to make my editing easier.
Finally the link has been corrected on my site to https://files.secureserver.net/0shnbBAMoffC1h but I realize after explaining, it is probably a bit much for what you originally requested and the extraction is currently being tested and alterations made so codecs like AC-3/Mpeg Layer 3 correctly label the audio as AC3/MP3 so they will play with most players. It's a work in progress but it keeps me out of trouble... LOL.
Thanks
Budman1 -
Ok thanks,I'll see if I can use it for something(maybe it will give me some ideas what else I can do the the autohotkey script or change the way he work).
I've encounter flv files with those kind of problems before so if I encounter them again,I'll check the program -
Mostly, if a file isn't MKV and it's a type MKVMergeGUI will open (ie flv and MP4), I use MKVMergeGUI to remux it as an MKV, then I extract the audio from the MKV with MKVCleaver.
If there's an audio delay relative to the video, MKVCleaver doesn't tell you, so if you need to account for any possible audio delay, you'd need to check the MKV with MediaInfo manually.
Similar Threads
-
Program that can extract video and audio from avi, m4v, mov, mpg and wmv?
By mkvbob in forum Video ConversionReplies: 8Last Post: 6th May 2013, 23:54 -
Need to Extract Video and Audio from MpegTS into MKV Container
By hiten in forum DVB / IPTVReplies: 4Last Post: 15th Jan 2013, 05:27 -
Extract Audio and video from Multiplex karaoke DVD and re author
By quebecLA in forum Video ConversionReplies: 1Last Post: 8th Jul 2011, 22:01 -
HOW do I extract 1 audio track from a .ts / .m2ts with 4 audio tracks?!
By elgy in forum DVB / IPTVReplies: 25Last Post: 23rd Jan 2011, 23:28 -
Extract Audio from XviD MPEG-4 video
By MI6 in forum AudioReplies: 2Last Post: 3rd Jan 2009, 05:58