[MPlayer-users] Outputting to JPEG screws with the subtitle frame rate

Duane Evenson duane-maillists at shaw.ca
Wed May 21 08:27:18 CEST 2008


When outputting to jpeg files, (-vo jpeg) the subtitle framerate changes 
to 23.98fps, even though the movie is encoded at 29.97fps. It decodes to 
29.97 jpg files per second, but the subtitles start appearing early.
According to the documentation, the default for -subfps is the movie_fps.
If you want to try this out yourself, here's a subtitle
<code>
[Script Info]
ScriptType: V4.00+
Collisions: Normal
PlayResX: 864
PlayResY: 480
Timer: 100
WrapStyle: 0

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, 
OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, 
ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, 
MarginL, MarginR, MarginV, Encoding
Style: 
Default,Arial,22,&H00FFFFFF,&H0000FFFF,&H00000000,&H32000000,-1,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, 
Effect, Text
Dialogue: 0,0:00:00.00,0:00:01.00,Default,,0000,0000,0000,,00000
Dialogue: 0,0:00:01.00,0:00:02.00,Default,,0000,0000,0000,,11111
Dialogue: 0,0:00:02.00,0:00:03.00,Default,,0000,0000,0000,,22222
Dialogue: 0,0:00:03.00,0:00:04.00,Default,,0000,0000,0000,,33333
Dialogue: 0,0:00:04.00,0:00:05.00,Default,,0000,0000,0000,,44444
Dialogue: 0,0:00:05.00,0:00:10.00,Default,,0000,0000,0000,,55555
Dialogue: 0,0:00:10.00,0:00:20.00,Default,,0000,0000,0000,,1010101010
Dialogue: 0,0:00:20.00,0:00:30.00,Default,,0000,0000,0000,,2020202020
Dialogue: 0,0:00:30.00,0:00:40.00,Default,,0000,0000,0000,,3030303030
Dialogue: 0,0:00:40.00,0:00:50.00,Default,,0000,0000,0000,,4040404040
Dialogue: 0,0:00:50.00,0:01:00.00,Default,,0000,0000,0000,,5050505050
</code>
that you can run with any 29.97fps movie:
mplayer ../02.avi -sub t.ass -vo jpeg -frames 1800

And you'll see the subtitles are on the following frames:
frame   subtitle
1-16    00000
17-40   11111
41-64   22222
65-88  33333
89-112  44444
113-232 55555
233-472 1010101010
473-712 2020202020
713-...
I didn't bother checking further -- you can see the pattern. Each 
subtitle minute is 24 frames. Each movie minute is 30 frames.
What is going on? This screwed me up for a while. I was trying to use 
the JPEG's to adjust my subtitle timing.

I tested a few things before sending off this posting.
-subfps:
        mplayer ../02.avi -osdlevel 2 -sub t.ass -subfps 30000/1001 -vo 
jpeg -frames 1800
        doesn't work
        (osdlevel doesn't bring up the time counter either)

PS
Here's my .mplayer/config file, not really material, but who knows...
ass=yes
embeddedfonts=yes
fs=yes
alang=eng
slang=eng




More information about the MPlayer-users mailing list