VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 7 of 7
  1. How do I make FFMPEG extract audio out of all clips in a folder? The following failed
    for %%i do "M:\ffmpeg.exe" -i "%%1" -acodec pcm_s16le "M:\%%~ni.wav"
    Quote Quote  
  2. Code:
    for "%%i"
    -i "%%1"
    Should both be the same letter.

    If it still fails post complete ffmpeg log/terminal output.
    Quote Quote  
  3. Good catch, but

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    N:\>for %%i do "M:\ffmpeg.exe" -i "%%i" -acodec pcm_s16le "M:\%%~ni.wav"
    %%i was unexpected at this time.
    Quote Quote  
  4. If you type directly into terminal instead of running a .bat file you need to use single % instead of double %%.
    Quote Quote  
  5. Well I have to use it in a terminal otherwise the window will close. Either way, with single % it complained "do" was not expected.
    Quote Quote  
  6. You need something like
    for %i in (*.mkv) do "M:\ffmpeg.exe" -i "%~i" -acodec pcm_s16le "M:\%~ni.wav"
    (.mkv extension)

    for %i in (*.*) do "M:\ffmpeg.exe" -i "%~i" -acodec pcm_s16le "M:\%~ni.wav"
    (Any file extension)
    Quote Quote  
  7. Thanks mang. I didn't realize in was needed if I already cd'd to the directory which means this would've worked the first time if I just used it inside the .bat.
    Quote Quote  

Similar Threads