回复 19# lvwenjun11
- @echo off
- cd /d "%~dp0"
- rem 先设置路径ffmpeg的路径,需要引号,例如 set ffmpegexe="C:\Program Files\ffmpeg\ffmpeg.exe"
- set ffmpegexe=
-
-
- for /f "delims=" %%i in ('dir /b /s /ad') do (
- pushd "%%i"
- for /f "delims=" %%a in ('dir /b /a-d *.ts') do (
- echo file '%%~fa'
- )>>temp.txt
- if exist temp.txt (
- %ffmpegexe% -f concat -safe 0 -i temp.txt -c copy "%%~ni.mp4"
- for /f "tokens=2 delims='" %%b in ('type "temp.txt"') do (
- del "%%b"
- )
- del temp.txt
- )
- popd
- )
- pause
复制代码 你的ffmpeg应该没有添加到环境变量吧?
试一下这样呢? |