[MPlayer-users] MPlayer and subtitles

Alejandro Néstor Vargas anv at xnetcuyo.com.ar
Tue Jul 23 00:15:12 CEST 2002


Michal Semler dijo:
> Is there a possibility to time subtitles?
> I have movie using 22 fps and subtitles from the same movie, but using
> 35  fps. Can I samhow instruct MPlayer to convert 35 fps subtitles to
> 22 fps  movie and so have right subtitles?

I think it may be easy to create a little script for doing this. Something
like this:
Assign a name like fixsub and copy this:

awk '
{
# Extract the data
split($0,f,"{|}")
StartFrame=f[2]
EndFrame=f[4]
Text=f[5]

#Modify as necesary

StartFrame=StartFrame*22/35
EndFrame=EndFrame*22/35

#Write the result
printf("{%d}{%d}%s\n",StartFrame,EndFrame,Text)
}'

Make it executable and execute it as:

cat oldfile.sub > newfile.sub



-- 
Alejandro Néstor Vargas
anv at xnetcuyo.com.ar
ICQ: 20528995.
Departamento de Desarrollo
X Net Cuyo S.A.





More information about the MPlayer-users mailing list