How do you convert an entire directory with ffmpeg?

前端 未结 26 2504
长发绾君心
长发绾君心 2020-11-22 04:33

How do you convert an entire directory/folder with ffmpeg via command line or with a batch script?

26条回答
  •  滥情空心
    2020-11-22 05:00

    For Windows:

    Here I'm Converting all the (.mp4) files to (.mp3) files.
    Just open cmd, goto the desired folder and type the command.

    Shortcut: (optional)
    1. Goto the folder where your (.mp4) files are present
    2. Press Shift and Left click and Choose "Open PowerShell Window Here"
    or "Open Command Prompt Window Here"
    3. Type "cmd" [NOTE: Skip this step if it directly opens cmd instead of PowerShell]
    4. Run the command

    for %i in (*.mp4) do ffmpeg -i "%i" "%~ni.mp3"
    

    If you want to put this into a batch file on Windows 10, you need to use %%i.

提交回复
热议问题