标题: [其他] [分享]自动生成合并视频的AVS 的bat [打印本页]
作者: anshi009009 时间: 2011-10-13 22:12 标题: [分享]自动生成合并视频的AVS 的bat
本帖最后由 anshi009009 于 2011-10-13 22:16 编辑
小菜鸟绕了很多弯写的,请高手精炼...
使用说明:把需要合并的视频的名字改名成按名字排序正好是视频组合顺序的名字,比如:
XXXX01.MP4
XXXX02.MP4
XXXX03.MP4
然后一起拖到bat图标上,就会在视频的原文件夹生成AVS- @echo on
- set cs=%~dpn1
- set countt=0
- :ok
- if not "%~1"=="" (echo directshowsource^(^"%~1^"^)^.changefps^(23^)>>"%cs%_avs_temp1.txt"&shift&goto :ok)
- sort "%cs%_avs_temp1.txt">>"%cs%_avs_temp2.txt"
-
- for /f "usebackq delims=" %%i in ("%cs%_avs_temp2.txt") do (
- set /a countt+=1
- set lastline=%%i)
-
- echo %countt% >"%cs%_avs_temp3.txt"
-
- set counttt=0
-
- for /f "usebackq delims=" %%i in ("%cs%_avs_temp2.txt") do (
-
- setlocal enabledelayedexpansion
- (set /a counttt+=1)&&(if !counttt! lss %countt% echo %%i +\>>"%cs%_avs.avs"))
-
- echo %lastline%>>"%cs%_avs.avs"
-
- del "%cs%_avs_temp1.txt"
- del "%cs%_avs_temp2.txt"
- del "%cs%_avs_temp3.txt"
-
- pause
复制代码
作者: awk 时间: 2011-10-13 23:11
- @echo off
- setlocal enabledelayedexpansion
- set file=%~n1
- set linetotal=0
- type nul >"%temp%\%file%_avs_temp1.txt"
- :ok
- if not "%~1"=="" (
- set /a linetotal+=1
- echo directshowsource^(^"%~1^"^)^.changefps^(23^) +\>>"%temp%\%file%_avs_temp1.txt"
- shift
- goto :ok
- )
- sort "%temp%\%file%_avs_temp1.txt" >"%temp%\%file%_avs_temp2.txt"
- set linethis=0
- (for /f "usebackq delims=" %%i in ("%temp%\%file%_avs_temp2.txt") do (
- set /a linethis+=1
- if !linethis! lss !linetotal! (
- echo %%i
- ) else (
- set lastline=%%i
- echo !lastline:~0,-4!
- )
- ))>"%file%_avs.avs"
复制代码
作者: anshi009009 时间: 2011-10-14 14:13
回复 2# awk
好像有错误,没找到生成的AVS
欢迎光临 批处理之家 (http://www.bathome.net/) |
Powered by Discuz! 7.2 |