[MEncoder-users] ASS sub works w/ mplayer but not w/ mencoder?

김동성 kiding0 at gmail.com
Sun Jan 30 16:29:14 CET 2011


Hi.

I want to encode my mp4 file with ass subtitle - with karaoke and many
effects - by using mencoder.
So I built SVN-r32833-4.2.1[the latest] on Mac OS X i386.

After that, I tried to play mp4 + ass with mplayer just have been built. At
first, I tried
------------------------------------------------------------------------------------------------------
[COMMAND] ./mplayer 'K-On!! OP RAW (TBS 1280x720 x264).mp4'
------------------------------------------------------------------------------------------------------
And the result was -> http://twitpic.com/3uvuyk
It apprantly looks that 'ass' video filter wasn't loaded.

So I looked at the command from MPlayer OSX Extended.
------------------------------------------------------------------------------------------------------
[COMMAND] ./mplayer 'K-On!! OP RAW (TBS 1280x720 x264).mp4' -cache 51200
-ass -ass-font-scale 1.000 -embeddedfonts -ass-color FFFFFF26
-ass-border-color 00000032 -subfont-osd-scale 4.500 -vf-add ass
------------------------------------------------------------------------------------------------------
As a result, It works great. -> http://twitpic.com/3ujg0r

Finally, I tried to use the same command with MEncoder.
------------------------------------------------------------------------------------------------------
[COMMAND] ./mencoder 'K-On!! OP RAW (TBS 1280x720 x264).mp4' -mc 0 -vf
harddup -of lavf -lavfopts format=MP4 -ofps 24 -vf-add crop=672:288 -vf-add
scale=640:274 -vf-add expand=640:480:-1:-1:1  -ovc lavc -lavcopts
vcodec=mpeg4:aglobal=3:vglobal=3:threads=8:vbitrate=1500 -srate 48000 -oac
faac -faacopts mpeg=4:object=2:raw:br=96 \
-sub 'K-On!! OP RAW (TBS 1280x720 x264).ass' -fontconfig -ass
-ass-font-scale 1.000 -embeddedfonts -ass-color FFFFFF26 -ass-border-color
00000032 -subfont-osd-scale 4.500 -vf-add ass -o 'AFTER.mp4' -subcp utf-8
------------------------------------------------------------------------------------------------------
But the result was -> http://twitpic.com/3ukobh
I tried everything I could do - fixpts, of course - , but still no luck.

Below is the output when mencoder was used.
------------------------------------------------------------------------------------------------------
[OUTPUT] MEncoder SVN-r32833-4.2.1 (C) 2000-2011 MPlayer Team
success: format: 0  data: 0x0 - 0x2ceb9b8
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
VIDEO:  [H264]  1280x720  24bpp  23.976 fps  4068.0 kbps (496.6 kbyte/s)
[V] filefmt:44  fourcc:0x34363248  size:1280x720  fps:23.976  ftime:=0.0417
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 124.1 kbit/8.08% (ratio: 15513->192000)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
** MUXER_LAVF
*****************************************************************
REMEMBER: MEncoder's libavformat muxing is presently broken and can generate
INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit.
Opening video filter: [ass]
Opening video filter: [expand w=640 h=480 x=-1 y=-1 osd=1]
Expand: 640 x 480, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [scale w=640 h=274]
Opening video filter: [crop w=672 h=288]
Crop: 672 x 288, -1 ; -1
Opening video filter: [harddup]
SUB: error recoding line.
[ass] Added subtitle file: 'K-On!! OP RAW (TBS 1280x720 x264).ass' (10
styles, 85 events)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Pos:   0.0s      1f (97%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
Movie-Aspect is undefined - no prescaling applied.
[swscaler @ 0x9e2060]BICUBIC scaler, from yuv420p to yuv420p using MMX2
videocodec: libavcodec (640x480 fourcc=34504d46 [FMP4])
VIDEO CODEC ID: 13
AUDIO CODEC ID: 15002, TAG: 0
Writing header...
[mp4 @ 0x9da8c0]Codec for stream 0 does not use global headers but container
format requires global headers
[mp4 @ 0x9da8c0]Codec for stream 1 does not use global headers but container
format requires global headers

1 duplicate frame(s)!
Pos:  41.7s   1000f (98%) 63.48fps Trem:   0min   8mb  A-V:0.000 [1484:139]

1 duplicate frame(s)!
Pos:  43.2s   1037f (98%) 63.35fps Trem:   0min   8mb  A-V:0.000 [1509:139]

Subtitle word
'20\c&HE9AE42&)}{\r\t(10,220,\fscy150\c&HFAD38D&)\t(220,430,\fscy120\c&HE9AE42&)}皆{\r\t(430,635,\fscy150\c&HFAD38D&)\t(635,840,\fscy120\c&HE9AE42&)}が
{\r\t(840,865,\fscy150\c&HFAD38D&)\t(865,890,\fscy120\c&HE9AE42&)}{\r\t(890,1095,\fscy150\c&HFAD38D&)\t(1095,1300,\fscy120\c&HE9AE42&)}大{\r\t(1300,1430,\fscy150\c&HFAD38D&)\t(1430,1560,\fscy120\c&HE9AE42&)}好きっ{\r\t(1560,1640,\fscy150\c&HFAD38D&)\t(1640,1720,\fscy120\c&HE9AE42&)}!!'
too long!

Subtitle word
'0,\fscy120\c&HE9AE42&)}{\r\t(890,1095,\fscy150\c&HFAD38D&)\t(1095,1300,\fscy120\c&HE9AE42&)}大{\r\t(1300,1430,\fscy150\c&HFAD38D&)\t(1430,1560,\fscy120\c&HE9AE42&)}好きっ{\r\t(1560,1640,\fscy150\c&HFAD38D&)\t(1640,1720,\fscy120\c&HE9AE42&)}!!'
too long!

...(Subtitle word ~ too long!)

Pos:  89.8s   2154f (99%) 58.95fps Trem:   0min  17mb  A-V:0.000 [1511:141]

Flushing video frames.
Writing index...

Video stream: 1511.294 kbit/s  (188911 B/s)  size: 16970572 bytes  89.833
secs  2154 frames

Audio stream:  141.520 kbit/s  (17690 B/s)  size: 1588044 bytes  89.771 secs
------------------------------------------------------------------------------------------------------

Here's all I got, is there any solution?

Thanks,
Don

-- 



---------------
Kim, Dongsung
kiding.kmug.co.kr


More information about the MEncoder-users mailing list