Hunter的大杂烩 技术学习笔记

2020-09-15

批量正常化MP4脚本

Filed under: 技术话题 — hunter @ 1:40 am

参考:http://www.voidcn.com/article/p-qjobbzbr-byt.html

某些嵌入式系统播放器可能不支持MP4格式下不同的major_brand(参考:https://www.it1352.com/751868.html),这时可以用:

-vpre normal

参数转化一下MP4,新版ffmpeg将-vpre参数更改为 -preset medium ,批量转化脚本如下:

[code]

@echo off&setlocal enabledelayedexpansion

for /f "delims=!" %%i in (‘dir /s/b before\*.mp4’) do (
set newName=%%~nxi
set newName=!newName:.mp4=!
set newName=!newName!-1.mp4
ffmpeg.exe -hwaccel qsv -threads 4 -i "%%~i" -vcodec libx264 -preset medium -acodec copy "after\!newName!"

)
exit

[/code]

转化前:

转化后:

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress