[MPlayer-users] Dumping WMV subs

Diogo Franco diogomfranco at gmail.com
Sun May 25 20:03:17 CEST 2008


Em Dom, 2008-05-25 às 19:48 +0200, |TEcHNO| escreveu:
> Reimar Döffinger wrote:
> > On Sat, May 24, 2008 at 10:28:12AM +0200, |TEcHNO| wrote:
> >> Reimar Döffinger wrote:
> >>> mkvmerge can probably extract them. FFmpeg (I think) can do it too, but the format
> >>> it produces is probably nothing you can use. With MPlayer you would probably have
> >>> to change the source.
> >>> To render while encoding, see -vf expand and -sid option.
> >> I'm trying something like this below, but the output has no subtitles.
> > 
> > You are not using the expand filter.
> 
> Using this (below), I'm still not getting any subtitles to render on the 
> final movie, unless they need to render on the blck bars. The thing I'm 
> bothered it that any movie, that is not 4/3 aspect, will get black bars 
> encoded, that may increase the overall movie size (not much but still).
> 
> mencoder "$1" -ovc xvid -oac mp3lame \
> 			-ofps $OFPS -sid 0 -ass\
> 			-vf crop=$CROP,scale=320:-3:0:0:\
> 			$SCALER_PARS,expand=320:240:::1 \
> 			-sws $SCALER_TYPE \
>   			-xvidencopts bitrate=$VBITRATE:nogmc:noqpel:\
> 			quant_type=$QUANT_TYPE:pass=2:profile=asp3:\
> 			threads=2:max_key_interval=$OFPS \
> 			-lameopts vol=$VOLGAIN:vbr=3:aq=0 -o "$2"
> 
> 
> VBITRATE=600;
> QUANT_TYPE=mpeg;
> ABITRATE=128;
> VOLGAIN=0;
> CROP=0:0:0:0;
> SCALER_TYPE=2;
> SCALER_PARS=0.00:0.65;
> OFPS=25;
> 

I don't know why, but mencoder/mplayer apparently are ignoring the -sid
options and aren't showing anything, unless it is an embedded subtitle.
As a workaround for external subs, I pass an absurdly high sid (like
-sid 5000) and put -slave <<<sub_select at the end of the command line
to select the first sub. Your command would look like this with a
herestring:

mencoder "$1" -ovc xvid -oac mp3lame \
	-ofps $OFPS -sid 5000 -ass \
	-vf crop=$CROP,scale=320:-3:0:0:\
	$SCALER_PARS,expand=320:240:::1 \
	-sws $SCALER_TYPE \
	-xvidencopts bitrate=$VBITRATE:nogmc:noqpel:\
	quant_type=$QUANT_TYPE:pass=2:profile=asp3:\
	threads=2:max_key_interval=$OFPS \
	-lameopts vol=$VOLGAIN:vbr=3:aq=0 -o "$2" \
	-slave <<<sub_select

I did not actually do this with herestrings, I just used fifos since I
was using a lot of them already (I'm using mplayer as a frameserver for
x264). Try that if this doesn't work.




More information about the MPlayer-users mailing list