[MEncoder-users] harcoded subs and resizing

Elia Christopher eliared at yahoo.com
Fri May 18 17:51:35 CEST 2007


(switched email acc because other one broke threading)


hi,

I've been testing hardcoding subs with mencoder,
i noticed that it doesn't work when used in combination with scaling.
Mencoder reads subs first and then resizes, is there a way to reverse 
that order, and would that help?
Or is there a switch i can add that would make the procedure work?

Example command:

mencoder input.avi -o outsub.flv -vf scale=320:240 -sub subs.srt 
-font subfont1.ttf -subpos 35 -af resample=22050:0:0 -mc 0 -ovc lavc 
-lavcopts 
vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -oac 
mp3lame -lameopts cbr:br=64:mode=3 -lavfopts 
i_certify_that_my_video_stream_does_not_use_b_frames

Using -vf expand as suggested doesn't work.
I tried various things with it.
say: expand=0:-50:0:0:1 

output(without expand):

E:\vid results\ffmpeg>mencoder input.avi -o outsub.flv -sws 9 -font subfont1.ttf
 -sub subs.srt -vf scale=320:240 -af resample=22050:0:0 -mc 0 -ovc lavc -lavcopt
s vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -oac mp3lame -lam
eopts cbr:br=64:mode=3 -lavfopts i_certify_that_my_video_stream_does_not_use_b_f
rames
MEncoder Sherpya-SVN-r22870-4.1.2 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (Family: 15, Model: 2, Stepping: 9)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2


WARNING: OUTPUT FILE FORMAT IS _AVI_. See -of help.
success: format: 0  data: 0x0 - 0x36e800
AVI file format detected.
VIDEO:  [XVID]  624x352  12bpp  23.976 fps  556.5 kbps (67.9 kbyte/s)
[V] filefmt:3  fourcc:0x44495658  size:624x352  fps:23.98  ftime:=0.0417
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
SUB: Detected subtitle file format: subviewer
SUB: Read 1 subtitles.
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [scale w=320 h=240]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
MP3 audio selected.
VDec: vo config request - 624 x 352 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.77:1 - prescaling to correct movie aspect.
SwScaler: reducing / aligning filtersize 13 -> 12
SwScaler: reducing / aligning filtersize 13 -> 12
SwScaler: reducing / aligning filtersize 10 -> 9
SwScaler: reducing / aligning filtersize 10 -> 9
[swscaler @ 00C8D020]SwScaler: Lanczos scaler, from yuv420p to yuv420p using MMX
2
[swscaler @ 00C8D020]SwScaler: using n-tap MMX scaler for horizontal luminance s
caling
[swscaler @ 00C8D020]SwScaler: using n-tap MMX scaler for horizontal chrominance
 scaling
[swscaler @ 00C8D020]SwScaler: using n-tap MMX scaler for vertical scaling (YV12
 like)
[swscaler @ 00C8D020]SwScaler: 624x352 -> 320x240
videocodec: libavcodec (320x240 fourcc=31564c46 [FLV1])
[VE_LAVC] High quality encoding selected (non-realtime)!
[mpeg4 @ 00C91880]frame skip 80fps Trem:   0min   0mb  A-V:0.000 [0:0]
[mpeg4 @ 00C91880]frame skip 80fps Trem:   0min   0mb  A-V:0.000 [0:0]

1 duplicate frame(s)!
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp h
eader.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp h
eader.
Writing header...3f ( 0%)  0.00fps Trem:   0min   2mb  A-V:0.000 [0:0]
ODML: Aspect information not (yet?) available or unspecified, not writing vprp h
eader.

1 duplicate frame(s)!
Pos:   0.2s      6f ( 0%)  0.00fps Trem:   0min   2mb  A-V:0.000 [0:0]
1 duplicate frame(s)!
Pos:  40.5s    972f (97%) 49.56fps Trem:   0min   2mb  A-V:0.000 [479:64]
1 duplicate frame(s)!
Pos:  41.7s   1000f (101%) 49.89fps Trem:   0min   2mb  A-V:0.000 [475:63]
Flushing video frames.
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp h
eader.

Video stream:  475.692 kbit/s  (59461 B/s)  size: 2477561 bytes  41.667 secs  10
00 frames

Audio stream:   64.000 kbit/s  (7999 B/s)  size: 333113 bytes  41.639 secs



expand changes this part of output info, but still no subs:

==========================================================================
SUB: Detected subtitle file format: subviewer
SUB: Read 1 subtitles.
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [expand w=0 h=-50 x=0 y=0 osd=1]
Expand: 0 x -50, 0 ; 0, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [scale w=320 h=240]
==========================================================================

       
---------------------------------
Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.


More information about the MEncoder-users mailing list