[MPlayer-users] ssa/ass rendering uses lots of cpu with -vo gl

Vladimir Mosgalin mosgalin at VM10124.spb.edu
Mon Jan 17 15:40:34 CET 2011


Hi Nicolas George!

 On 2011.01.17 at 14:06:12 +0100, Nicolas George wrote next:

> > I just noticed some strange thing; rendering .ass with effects consumes
> > insane amount of processing power with -vo gl target (i'm using -vo
> > gl:yuv=2, but any -vo gl mode has problems)
> > 
> > I'm talking about fansubbed anime, which uses karaoke effects in
> > opening. 1920x1080 resolution, this file was unplayable in some moments
> 
> What kind of effects are they exactly. ASS subtitles on most VOs renders the
> subtitles for each frame, but the rendering is reasonably cheap. For GL, on
> the other hand, there are two phases : the subtitles are uploaded when each
> time the subtitles change, and overlaid on each frame. The overlay is cheap,
> the upload is more costly.

\fad, \kf, \blur2


Well, what you describe does sound costly but it feels just not right
that amount of cpu that's additionaly required to displaying subtitles
is more than amount of cpu used for rendering movie itself, I mean we
are talking about 1920x1080x29.97 video already, even if subtitles have
to be uploaded each frame, one would expect it to consume less resources
than rendering video itself.

> > I can give link to .torrent with that file or upload opening (~300 mb)
> > or .ass subtitle file that's used, if it's needed.
> 
> The ASS file, and even only an excerpt of it, would be enough, provided you
> can reproduce the slowness on a black frame (-demuxer rawvideo /dev/zero).
> You can accentuate the problem by enlarging the font, adding more text and
> heightening the framerate if necessary.

Seems to work. I attached subtitles, the original file is small enough.
Problem starts around 0:20. It used custom fonts from .mkv but should
render properly as long as one has any japanese font installed.


-- 

Vladimir
-------------- next part --------------
[Script Info]
; Script generated by Aegisub 2.1.8
; http://www.aegisub.org/
Title: Default Aegisub file
ScriptType: v4.00+
WrapStyle: 0
PlayResX: 1920
PlayResY: 1080
ScaledBorderAndShadow: yes
Video Aspect Ratio: 0
Video Zoom: 8
Video Position: 459
Last Style Storage: Default
Audio File: OPA.mp3
Video File: 00004.track_4113 (720p).mkv

[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: OP Romaji,Bell Gothic Std Black,75,&H00FFFFFF,&H00EAC392,&H00CB6D14,&H00CB6D14,0,0,0,0,100,100,0,0,1,4.5,0,8,30,30,50,1
Style: OP Kanji,DFKai-SB,53,&H00FFFFFF,&H00EAC392,&H00CB6D14,&H00CB6D14,-1,0,0,0,100,100,0,0,1,3.75,0,8,30,30,130,1
Style: OP English,Bell Gothic Std Black,75,&H00FFFFFF,&H000000FF,&H00CB6D14,&H00CB6D14,0,0,0,0,100,100,0,0,1,4.5,0,2,30,30,50,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Comment: 0,0:00:15.29,0:00:15.29,OP Romaji,,0000,0000,0000,,
Comment: 0,0:00:15.29,0:00:15.29,OP Kanji,,0000,0000,0000,,
Comment: 0,0:00:15.29,0:00:15.29,OP English,,0000,0000,0000,,
Comment: 0,0:00:00.00,0:00:00.00,OP English,,0000,0000,0000,,

Dialogue: 0,0:00:15.36,0:00:23.23,OP Romaji,,0000,0000,0000,,{\fad(250,250)\kf63\blur2}ki{\kf29}e{\kf20}ru {\kf26}hi{\kf23}ko{\kf30}u{\kf23}ki{\kf14}gu{\kf157}mo {\kf22}bo{\kf23}ku{\kf22}ta{\kf32}chi {\kf24}wa {\kf24}mi{\kf48}o{\kf28}ku{\kf20}t{\kf114}ta
Dialogue: 0,0:00:23.23,0:00:30.17,OP Romaji,,0000,0000,0000,,{\fad(250,250)\kf61\blur2}ma{\kf20}bu{\kf31}shi{\kf26}ku{\kf50}te {\kf25}ni{\kf20}ge{\kf113}ta {\kf33}{\kf24}i{\kf30}tsu{\kf23}da{\kf26}t{\kf36}te {\kf28}yo{\kf29}wa{\kf41}ku{\kf85}te
Dialogue: 0,0:00:30.17,0:00:34.88,OP Romaji,,0000,0000,0000,,{\fad(250,250)\kf34\blur2}a{\kf47}no {\kf46}hi {\kf51}ka{\kf48}ra {\kf51}ka{\kf26}wa{\kf15}ra{\kf119}zu{\kf34}
Dialogue: 0,0:00:34.88,0:00:42.62,OP Romaji,,0000,0000,0000,,{\fad(250,250)\kf26\blur2}i{\kf27}tsu{\kf27}ma{\kf23}de{\kf24}mo {\kf23}ka{\kf49}wa{\kf23}ra{\kf29}zu {\kf88}ni {\kf80}{\kf50}i{\kf28}ra{\kf26}re{\kf24}na{\kf25}ka{\kf24}t{\kf25}ta {\kf15}ko{\kf111}to{\kf27}
Dialogue: 0,0:00:42.62,0:00:52.70,OP Romaji,,0000,0000,0000,,{\fad(250,250)\kf40\blur2}ku{\kf20}ya{\kf27}shi{\kf30}ku{\kf25}te {\kf22}yu{\kf198}bi {\kf149}o {\kf44}ha{\kf186}na{\kf262}su
Dialogue: 0,0:00:52.70,0:01:00.61,OP Romaji,,0000,0000,0000,,{\fad(0,0)\kf40\blur2}a{\kf35}no {\kf36}to{\kf26}ri {\kf24}wa {\kf49}ma{\kf49}da {\kf49}u{\kf27}ma{\kf38}ku {\kf33}to{\kf41}be{\kf35}na{\kf146}i {\kf48}ke{\kf76}do{\kf41}
Dialogue: 0,0:01:00.61,0:01:06.81,OP Romaji,,0000,0000,0000,,{\fad(0,250)\kf30\blur2}i{\kf43}tsu{\kf34}ka {\kf23}wa {\kf40}ka{\kf38}ze {\kf46}o {\kf49}ki{\kf26}t{\kf26}te {\kf47}shi{\kf175}ru
Dialogue: 0,0:01:08.45,0:01:16.35,OP Romaji,,0000,0000,0000,,{\fad(0,0)\kf35\blur2}to{\kf25}do{\kf50}ka{\kf22}na{\kf33}i {\kf31}ba{\kf58}sho {\kf48}ga {\kf26}ma{\kf37}da {\kf37}to{\kf48}o{\kf23}ku {\kf149}ni {\kf50}a{\kf53}ru
Dialogue: 0,0:01:16.35,0:01:22.89,OP Romaji,,0000,0000,0000,,{\fad(0,0)\kf35\blur2}ne{\kf33}ga{\kf40}i {\kf24}da{\kf37}ke {\kf35}hi{\kf49}me{\kf49}te {\kf22}mi{\kf97}tsu{\kf51}me{\kf54}te{\kf108}ru
Dialogue: 0,0:01:22.89,0:01:31.27,OP Romaji,,0000,0000,0000,,{\fad(0,0)\kf70\blur2}ko{\kf22}do{\kf25}mo{\kf23}ta{\kf18}chi {\kf122}wa {\kf31}{\kf48}na{\kf52}tsu {\kf34}no {\kf113}sen{\kf171}ro {\kf26}a{\kf25}ru{\kf34}ku
Dialogue: 0,0:01:31.27,0:01:39.24,OP Romaji,,0000,0000,0000,,{\fad(0,0)\kf40\blur2}fu{\kf25}ku {\kf21}ka{\kf19}ze {\kf238}ni {\kf40}su{\kf15}a{\kf61}shi {\kf12}o {\kf27}sa{\kf24}ra{\kf59}shi{\kf197}te{\kf23}
Dialogue: 0,0:01:39.24,0:01:46.98,OP Romaji,,0000,0000,0000,,{\fad(0,0)\kf30\blur2}to{\kf24}o{\kf24}ku {\kf15}ni {\kf155}wa {\kf39}o{\kf59}sa{\kf52}na{\kf72}ka{\kf29}t{\kf168}ta {\kf25}hi{\kf26}bi {\kf31}o
Dialogue: 0,0:01:46.98,0:01:53.56,OP Romaji,,0000,0000,0000,,{\fad(0,250)\kf25\blur2}ry{\kf15}o{\kf22}u{\kf28}te {\kf10}ni {\kf245}wa {\kf37}to{\kf25}bi{\kf46}ta{\kf30}tsu {\kf21}ki{\kf34}bo{\kf46}u {\kf57}o
Dialogue: 0,0:01:53.56,0:02:01.43,OP Romaji,,0000,0000,0000,,{\fad(250,250)\kf75\blur2}ki{\kf24}e{\kf24}ru {\kf24}hi{\kf24}ko{\kf24}u{\kf25}ki{\kf13}gu{\kf158}mo {\kf26}o{\kf23}i{\kf24}ka{\kf25}ke{\kf24}te {\kf24}o{\kf49}i{\kf26}ka{\kf14}ke{\kf107}te
Dialogue: 0,0:02:01.43,0:02:10.68,OP Romaji,,0000,0000,0000,,{\fad(250,0)\kf70\blur2}ko{\kf26}no {\kf25}o{\kf29}ka {\kf42}o {\kf22}ko{\kf15}e{\kf158}ta {\kf27}a{\kf24}no {\kf24}hi {\kf25}ka{\kf24}ra {\kf25}ka{\kf35}wa{\kf37}ra{\kf95}zu {\kf25}i{\kf52}tsu{\kf51}ma{\kf50}de{\kf25}mo
Dialogue: 0,0:02:10.68,0:02:17.25,OP Romaji,,0000,0000,0000,,{\fad(0,0)\kf35\blur2}ma{\kf8}s{\kf37}su{\kf17}gu {\kf154}ni {\kf25}bo{\kf27}ku{\kf22}ta{\kf25}chi {\kf26}wa {\kf15}a{\kf59}ru {\kf23}yo{\kf20}u{\kf159}ni
Dialogue: 0,0:02:17.25,0:02:31.53,OP Romaji,,0000,0000,0000,,{\fad(0,250)\kf60\blur2}wa{\kf21}ta{\kf29}tsu{\kf26}mi {\kf40}no {\kf28}yo{\kf19}u{\kf152}na {\kf20}tsu{\kf21}yo{\kf39}sa {\kf23}o {\kf25}ma{\kf25}mo{\kf168}re{\kf24}ru {\kf149}yo {\kf45}ki{\kf202}t{\kf235}to
Dialogue: 0,0:00:15.36,0:00:23.23,OP Kanji,,0000,0000,0000,,{\fad(250,250)\kf63\blur2}消{\kf29}え{\kf20}る{\kf26}飛{\kf53}行{\kf23}機{\kf171}雲 {\kf45}僕{\kf22}た{\kf32}ち{\kf24}は{\kf72}見{\kf28}送{\kf20}っ{\kf114}た
Dialogue: 0,0:00:23.23,0:00:30.17,OP Kanji,,0000,0000,0000,,{\fad(250,250)\kf81\blur2}眩{\kf31}し{\kf26}く{\kf50}て{\kf25}逃{\kf20}げ{\kf146}た {\kf24}い{\kf30}つ{\kf23}だ{\kf26}っ{\kf36}て{\kf57}弱{\kf41}く{\kf85}て
Dialogue: 0,0:00:30.17,0:00:34.88,OP Kanji,,0000,0000,0000,,{\fad(250,250)\kf34\blur2}あ{\kf47}の{\kf46}日{\kf51}か{\kf48}ら{\kf51}変{\kf26}わ{\kf15}ら{\kf153}ず
Dialogue: 0,0:00:34.88,0:00:42.62,OP Kanji,,0000,0000,0000,,{\fad(250,250)\kf26\blur2}い{\kf27}つ{\kf27}ま{\kf23}で{\kf24}も{\kf23}変{\kf49}わ{\kf23}ら{\kf29}ず{\kf168}に{\kf50}い{\kf28}ら{\kf26}れ{\kf24}な{\kf25}か{\kf24}っ{\kf25}た{\kf15}こ{\kf138}と
Dialogue: 0,0:00:42.62,0:00:52.70,OP Kanji,,0000,0000,0000,,{\fad(250,250)\kf60\blur2}悔{\kf27}し{\kf30}く{\kf25}て{\kf220}指{\kf149}を{\kf230}離{\kf262}す
Dialogue: 0,0:00:52.70,0:01:00.61,OP Kanji,,0000,0000,0000,,{\fad(0,0)\kf40\blur2}あ{\kf35}の{\kf62}鳥{\kf24}は{\kf49}ま{\kf49}だ{\kf49}う{\kf27}ま{\kf38}く{\kf33}飛{\kf41}べ{\kf35}な{\kf146}い{\kf48}け{\kf117}ど
Dialogue: 0,0:01:00.61,0:01:06.81,OP Kanji,,0000,0000,0000,,{\fad(0,250)\kf30\blur2}い{\kf43}つ{\kf34}か{\kf23}は{\kf78}風{\kf46}を{\kf49}切{\kf26}っ{\kf26}て{\kf47}知{\kf175}る
Dialogue: 0,0:01:08.45,0:01:16.35,OP Kanji,,0000,0000,0000,,{\fad(0,0)\kf60\blur2}届{\kf50}か{\kf22}な{\kf33}い{\kf31}場{\kf58}所{\kf48}が{\kf26}ま{\kf37}だ{\kf85}遠{\kf23}く{\kf149}に{\kf50}あ{\kf53}る
Dialogue: 0,0:01:16.35,0:01:22.89,OP Kanji,,0000,0000,0000,,{\fad(0,0)\kf68\blur2}願{\kf40}い{\kf24}だ{\kf37}け{\kf35}秘{\kf49}め{\kf49}て{\kf22}見{\kf97}つ{\kf51}め{\kf54}て{\kf108}る
Dialogue: 0,0:01:22.89,0:01:31.27,OP Kanji,,0000,0000,0000,,{\fad(0,0)\kf70\blur2}子{\kf47}供{\kf23}た{\kf18}ち{\kf153}は {\kf100}夏{\kf34}の{\kf113}線{\kf171}路 {\kf51}歩{\kf34}く
Dialogue: 0,0:01:31.27,0:01:39.24,OP Kanji,,0000,0000,0000,,{\fad(0,0)\kf40\blur2}吹{\kf25}く{\kf40}風{\kf238}に{\kf40}素{\kf76}足{\kf12}を{\kf27}さ{\kf24}ら{\kf59}し{\kf220}て
Dialogue: 0,0:01:39.24,0:01:46.98,OP Kanji,,0000,0000,0000,,{\fad(0,0)\kf54\blur2}遠{\kf24}く{\kf15}に{\kf155}は{\kf150}幼{\kf72}か{\kf29}っ{\kf168}た{\kf25}日{\kf26}々{\kf31}を
Dialogue: 0,0:01:46.98,0:01:53.56,OP Kanji,,0000,0000,0000,,{\fad(0,250)\kf62\blur2}両{\kf28}手{\kf10}に{\kf245}は{\kf37}飛{\kf25}び{\kf46}立{\kf30}つ{\kf21}希{\kf80}望{\kf57}を
Dialogue: 0,0:01:53.56,0:02:01.43,OP Kanji,,0000,0000,0000,,{\fad(250,250)\kf75\blur2}消{\kf24}え{\kf24}る{\kf24}飛{\kf48}行{\kf25}機{\kf171}雲 {\kf26}追{\kf23}い{\kf24}か{\kf25}け{\kf24}て{\kf24}追{\kf49}い{\kf26}か{\kf14}け{\kf107}て
Dialogue: 0,0:02:01.43,0:02:10.68,OP Kanji,,0000,0000,0000,,{\fad(250,0)\kf70\blur2}こ{\kf26}の{\kf54}丘{\kf42}を{\kf22}越{\kf15}え{\kf158}た{\kf27}あ{\kf24}の{\kf24}日{\kf25}か{\kf24}ら{\kf25}変{\kf35}わ{\kf37}ら{\kf95}ず{\kf25}い{\kf52}つ{\kf51}ま{\kf50}で{\kf25}も
Dialogue: 0,0:02:10.68,0:02:17.25,OP Kanji,,0000,0000,0000,,{\fad(0,0)\kf35\blur2}真{\kf8}っ{\kf37}直{\kf17}ぐ{\kf154}に{\kf52}僕{\kf22}た{\kf25}ち{\kf26}は{\kf15}あ{\kf59}る{\kf23}よ{\kf20}う{\kf159}に
Dialogue: 0,0:02:17.25,0:02:31.53,OP Kanji,,0000,0000,0000,,{\fad(0,250)\kf60\blur2}わ{\kf21}た{\kf29}つ{\kf26}み{\kf40}の{\kf28}よ{\kf19}う{\kf152}な{\kf41}強{\kf39}さ{\kf23}を{\kf50}守{\kf168}れ{\kf24}る{\kf149}よ {\kf45}き{\kf202}っ{\kf235}と
Dialogue: 0,0:00:15.36,0:00:23.23,OP English,,0000,0000,0000,,{\fad(250,250)\blur2}We watched the fading contrails go by.
Dialogue: 0,0:00:23.23,0:00:30.17,OP English,,0000,0000,0000,,{\fad(250,250)\blur2}They were so dazzling, I ran away - I was always weak.
Dialogue: 0,0:00:30.17,0:00:34.88,OP English,,0000,0000,0000,,{\fad(250,250)\blur2}I let go, frustrated by the fact...
Dialogue: 0,0:00:34.88,0:00:42.62,OP English,,0000,0000,0000,,{\fad(250,250)\blur2}...that I couldn't stay unchanged since that day...
Dialogue: 0,0:00:42.62,0:00:52.70,OP English,,0000,0000,0000,,{\fad(250,250)\blur2}...couldn't stay unchanged forever.
Dialogue: 0,0:00:52.70,0:01:00.61,OP English,,0000,0000,0000,,{\fad(0,0)\blur2}That bird still can't fly well.
Dialogue: 0,0:01:00.61,0:01:06.81,OP English,,0000,0000,0000,,{\fad(0,250)\blur2}But someday I'll know the feeling of gliding through the wind.
Dialogue: 0,0:01:08.45,0:01:16.35,OP English,,0000,0000,0000,,{\fad(0,0)\blur2}The place I can't reach is still far away.
Dialogue: 0,0:01:16.35,0:01:22.89,OP English,,0000,0000,0000,,{\fad(0,0)\blur2}I gaze at it with a wish locked away inside.
Dialogue: 0,0:01:22.89,0:01:31.27,OP English,,0000,0000,0000,,{\fad(0,0)\blur2}The children walk on the summer railway tracks,
Dialogue: 0,0:01:31.27,0:01:39.24,OP English,,0000,0000,0000,,{\fad(0,0)\blur2}exposing their bare feet to the blowing wind.
Dialogue: 0,0:01:39.24,0:01:46.98,OP English,,0000,0000,0000,,{\fad(0,0)\blur2}We place in the distance the days of our childhood,
Dialogue: 0,0:01:46.98,0:01:53.56,OP English,,0000,0000,0000,,{\fad(0,250)\blur2}with hope that will take flight in my hands.
Dialogue: 0,0:01:53.56,0:02:01.43,OP English,,0000,0000,0000,,{\fad(250,250)\blur2}I chased and chased the fading contrails.
Dialogue: 0,0:02:01.43,0:02:10.68,OP English,,0000,0000,0000,,{\fad(250,0)\blur2}Nothing changed since the day we went past that hill.
Dialogue: 0,0:02:10.68,0:02:17.25,OP English,,0000,0000,0000,,{\fad(0,0)\blur2}I hope we can be our honest selves forever,
Dialogue: 0,0:02:17.25,0:02:31.53,OP English,,0000,0000,0000,,{\fad(0,250)\blur2}and definitely protect this Poseidon-like strength.


More information about the MPlayer-users mailing list