BAT Readme
明丽つむぎ.jpg批处理脚本编程,下载程序示范,需要安装 CURL 工具,功能二,拖动 ts 文件到 bat 中进行合并:
@echo off
rem ============================================================================
rem Drag and drop mpegts file to this bat to combine together
rem ============================================================================
chcp 65001
title Tsumugi2闪烁风暴 明丽つむぎ
rem start http://www.qiankantv.cn/movie/201-152743.html@play=0-0
set c=curl -O https://yiqikan.wuyouzuida.com/20200327/4008_5c86f8ad/1000k/hls/986fa0f24bd000902.ts
set MAX=582
rem ==============================================================================================
:ParseParam
rem ==============================================================================================
set str=%1
if "%str%"=="" (
goto ParseEnd
)
if "%allparam%"=="" (
set allparam="%str%"
) else (
set allparam=%allparam% "%str%"
)
shift /0
goto ParseParam
:ParseEnd
if "%allparam%"=="" (
goto Download
)
if NOT "%allparam%"=="" (
echo File list:
for %%G in (%allparam:;=" "%) do @echo %%G
rem PAUSE>NUL
goto Combine
)
rem ==============================================================================================
:Download
rem ==============================================================================================
rem for /l %i in (1000000,1,1000010) do ( setlocal enabledelayedexpansion && echo %i:~-0,6%)
rem start http://www.qiankantv.cn/movie/201-152743.html@play=0-0
rem set c=curl -O https://yiqikan.wuyouzuida.com/20200327/4008_5c86f8ad/1000k/hls/986fa0f24bd000902.ts
setlocal enabledelayedexpansion
for /L %%i in (%MAX%,-1,0) do (
set /a n=1000000 + %%i
echo !n:~-6!.ts
if EXIST "!c:~-20,11!!n:~-6!.ts" (ECHO FILE EXISTS !n:~-6!.ts) ELSE %c:~0,-9%!n:~-6!.ts
)
goto Finished
rem ==============================================================================================
:Combine
rem ==============================================================================================
rem ffmpeg -ss 0:00:03 -to 0:00:07 -i "6087be503be000017.ts" -c copy "6087be503be000017-.ts"
rem string replace %variable:StrToFind=NewStr%
rem echo /B %allparam: =+% 00.ts
set rename=00.ts
set /p rename= Set output file naem? [00.ts]
if EXIST %rename% (
set /p confirm=File exists %rename%, overwrite? [yes or no]
)
if EXIST %rename% (
if NOT "%confirm%"=="yes" (
goto FileExists
)
)
copy /B %allparam: =+% %rename%
set /p delete= Do you want to delete those mpegts file? [yes or no]
echo %delete%
if [%delete%] == [yes] (
del %allparam%
echo Ole files deleted. Press key to continue.
)
PAUSE>NUL
goto Finished
:FileExists
echo File exists %rename% and task canceled.
PAUSE>NUL
:Finished
@echo on
网友评论