[MPlayer-users] Make a clip with subtitles?

Eli the Gearded mplayer at eli.users.panix.com
Fri Apr 6 23:49:39 EEST 2018


Just for background let me give a short description of what I'm doing
and why.

I watch digital files with mplayer and note the approximate time of
interesting things. Later I extract video clips from around that time,
start 5 seconds before, and grab clip of 20 seconds. 

mencoder -ss $ss  -endpos $td \
        -vf harddup -nosound -ovc copy -noskip -mc 0 \
        "$in" -o "$out"

Then I play the clip to make sure it has what I want, otherwise adjust
the $ss and $td values. Next from that smaller clip, I extract the
frames (this time "$in" is the "$out" of the previous step):

# START and DURATION are typically empty, when not empty they are
# "-ss TIME" and "-endpos TIME2"
mplayer $START $DURATION -nosound -vo "jpeg:outdir=$outdir" "$in"

Finally I review the frames and select some to make a GIF. I have this
two-step process because video -> frames is really slow, while video ->
video is fast. The clip from the first stage might not be good, but I
can make it and preview it, and then make a second one FASTER than I
can extract the frames from the original and check those.

Given that workflow, I'd like to know what I can do to make substites
appear (when I have them) in the final frames. Can mencoder create the
soundless clip with the substitles written into the video stream? I've
played around trying to get that to work, but never figured out the
options.

Baring that, if I made a subtitle file for my soundless clip (and I
probably could automate that easily with a program), can I get the
second stage to composite the subtitles in before writing the JPEG
frames out? What options would I need?

thanks,
Elijah


More information about the MPlayer-users mailing list