[MPlayer-users] Subtitle sync

Arpi arpi at thot.banki.hu
Mon Feb 25 13:53:02 CET 2002


Hi,

> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> actually this is a bit off-topic, but we are talking about subtitles
> anyway...
> 
> 
> what 'technique' do you people use to sync a sub with a video?

subpos = frame_no * sub_fps + sub_delay

if the sub is time-based (not frame-based) then
subpos = video_pos + sub_delay;

> i know that a subtitle can be shifted and scaled...
yes

> so theoretically if i can find 2 positions in the movie and the
> corresponding positions in the subtitle, i should be able to calculate
> the required shift-and-scale values....
> 
> but i tried it and it didn't work :-(

it does work, i use the same techniqe.
i check the latest sub position in video (using OSD timer) then check whet
position is written in subfile for that pos, and from these i can calculate
fps. then i just have to find right delay.

> i'm fighting with last-boy-scout for at least 4 hours by now and no
> results :-(

maybe it was made from variable fps source...

> > Are you sure that it's not the subtitle fps wich is wrong. You will have m
> any desync
> > even if the subfps is wrong of 1 fps or less.
> > 	Albeu 

maybe it's timebased sub, so subfps does nothing


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu




More information about the MPlayer-users mailing list