encoding multiple avi files with subtitles to mp4 container

Started by gaarr, March 31, 2012, 04:19:37 AM

Previous topic - Next topic

gaarr

I have spent many, many hours searching for an answer and am now just confused

I have multiple avi files and i need to burn ass subtitles on it and encode that in mp4 container

i dont know how to make scripts

can someone show me how to do a script that does that

thanx in advance.

Agent_007

1. Do the settings for one file via GUI, then save the script via File -> Save project as...
2. Edit the saved file with text editor, remove all video loading related functions and possible save function.
3. Change subtitle filename to something generic, so you can copy the file over it.

e.g. you have files like
movie1.avi
movie1.ass
movie2.avi
movie2.ass
.
.

then you use name like subtitle.ass in the JS script, and in .bat you copy the current subtitle file to be it.

set avidemux="C:\Program Files\Avidemux 2.5\avidemux2.exe"
for %%f in (*.avi) do (
set subtitletempname="%%f:~0,-3"
set subtitlefinalname=%subtitletempname%.ass
copy %subtitlefinalname% subtitle.ass
%avidemux% --force-alt-h264 --load "%%f" --run something.js --save "%%f.mp4" --quit
delete subtitle.ass
)
I am away between 15th of May - 15th of June. (yes, I am playing D3)

gaarr

am confused here

i know avidemux load the video files seperatly from the subtitles

subtitles are loaded under filter line

where do i put in the script the directory adress which the .avi files are in?

where do i put in the script the directory adress which the .ass files are in?

or the .ass files load automatically if with same name as the video files

thanx for the reply

Jan Gruuthuse

#3
Before you start the script go in to the directory where .avi are.
My guess would be to have the .ass in the same directory with the .avi video clip
Agent_007 made the script, when the avi loads the script loads the .ass for that video clip.
Condition: Both must have the same filename! like:
ThePirate.avi
ThePirate.ass
%avidemux% --force-alt-h264 --load "%%f" --run something.js --save "%%f.mp4" --quit

paths to directory in script can be added in this way:
Quote--run C:\script\something.js
If you made a special directory for your scripts.
Not sure the following is how it should work:
Quote--load "D:\avi\%%f"
Quote--save "E:\mp4\%%f.mp4"
Need to use of course your hard disk drive letters and directories. Short test should show if this works.