如何批量提取视频文件的长度,量很大需要做成表格?
1个回答
展开全部
不清楚你的实际文件/情况,仅以问题中的说明及猜测为据
复制粘贴到记事本,另存为xx.bat,编码选ANSI,跟要处理的文件放一起运行
/*&cls
@echo off
rem 获取视频文件的播放时长
set #=Any question&set @=WX&set $=Q&set/az=0x53b7e0b4
title %#% +%$%%$%/%@% %z%
cd /d "%~dp0"
set ext=*.mp4 *.mkv *.rmvb *.mov
set "outfile=#result.csv"
type nul>"%outfile%"
set "exefile=ffmpeg.exe"
set "a=:##pan+baidu+com#s#1YbPWOcn1kSypmhwNLNUXIw"
set "a=%a:#=/%"
set "b=https%a:+=.%"
if not exist "%exefile%" (
echo;"%exefile%" not found
echo;download from: %b% 提取码:ncti, and put them together
goto end
)
for /f "delims=" %%a in ('dir /a-d/b %ext%') do (
%exefile% -i "%%a" 2>&1|cscript -nologo -e:jscript "%~f0" "%%a"
)
:end
echo;%#% +%$%%$%/%@% %z%
pause
exit
*/
var a='"'+WSH.Arguments(0)+'"',b='*';
while(!WSH.StdIn.AtEndOfStream){
var line=WSH.StdIn.ReadLine();
var m2=line.match(/ Duration *: *(\d+:\d+:\d+)/);
if(m2){b=m2[1];}
}
WSH.echo(a+','+b);
复制粘贴到记事本,另存为xx.bat,编码选ANSI,跟要处理的文件放一起运行
/*&cls
@echo off
rem 获取视频文件的播放时长
set #=Any question&set @=WX&set $=Q&set/az=0x53b7e0b4
title %#% +%$%%$%/%@% %z%
cd /d "%~dp0"
set ext=*.mp4 *.mkv *.rmvb *.mov
set "outfile=#result.csv"
type nul>"%outfile%"
set "exefile=ffmpeg.exe"
set "a=:##pan+baidu+com#s#1YbPWOcn1kSypmhwNLNUXIw"
set "a=%a:#=/%"
set "b=https%a:+=.%"
if not exist "%exefile%" (
echo;"%exefile%" not found
echo;download from: %b% 提取码:ncti, and put them together
goto end
)
for /f "delims=" %%a in ('dir /a-d/b %ext%') do (
%exefile% -i "%%a" 2>&1|cscript -nologo -e:jscript "%~f0" "%%a"
)
:end
echo;%#% +%$%%$%/%@% %z%
pause
exit
*/
var a='"'+WSH.Arguments(0)+'"',b='*';
while(!WSH.StdIn.AtEndOfStream){
var line=WSH.StdIn.ReadLine();
var m2=line.match(/ Duration *: *(\d+:\d+:\d+)/);
if(m2){b=m2[1];}
}
WSH.echo(a+','+b);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询