0
使用以下腳本,我可以將文本文件中的多個視頻文件連接到單個視頻。ffmpeg帶有drawtext文件名的不同文件內的-i concat filelist.txt
現在我想要在輸出視頻中顯示每個源視頻文件的單獨名稱。
這裏是文件名和文件路徑
# videoList.txt
file 'C:\video_0020.mp4'
file 'C:\video_0040.mp4'
file '..'
和Windows批處理文件我源videoList.txt文件的例子:
@ECHO off
SETLOCAL
SET ffmpeg=C:\ffmpeg\bin
SET inFile=-f concat -i C:\videoList.txt
SET outFile=C:\output.mov
SET codec=-r 24 -vcodec mjpeg -q:v 6
REM videoFilter/filterComplex
SET filterComplex=drawtext=fontfile='C\:\\Windows\\Fonts\\arial.ttf': text='%%{filenameOfEachVideo}'
REM bring it all together
SET commandline=%ffmpeg%\ffmpeg.exe %inFile% -filter_complex "%filterComplex%" %codec% %outFile%
REM execute command
%commandline%
你想把它編碼到視頻中,還是將softsubs足夠? – LordNeckbeard
我想將文件名稱刻錄到視頻中。 – halanson