[MPlayer-users] Feature request - control PlayRes from commandline

Anton Khirnov wyskas at gmail.com
Sun Dec 30 00:10:19 CET 2007


Hi,

I encounter quite a lot of mkv files with ass subs, that have
incorrectly set PlayResX and PlayResY. It is very annoying to have to
manually extract all the subs and correct them so it would be nice to
have a commandline option (maybe a suboption of ass-force-styles) that
would control it.
I'm attaching a simple hack, that seems to work for me, but i'm no
programmer so don't take too seriously :)

Cheers
Anton Khirnov

Index: libass/ass.c
===================================================================
--- libass/ass.c        (revision 25540)
+++ libass/ass.c        (working copy)
@@ -337,6 +337,11 @@
                *eq = '\0';
                token = eq + 1;

+               if(!strcasecmp(*fs, "PlayResX"))
+                       track->PlayResX = atoi(token);
+               if(!strcasecmp(*fs, "PlayResY"))
+                       track->PlayResY = atoi(token);
+
                dt = strrchr(*fs, '.');
                if (dt) {
                        *dt = '\0';



More information about the MPlayer-users mailing list