[MPlayer-users] change_rectangle in slave mode doesn't do anything

Steve Ricketts velocedge at hotmail.com
Wed Apr 13 16:54:17 CEST 2011


> Well, the whole idea of slave mode is to run it 
from a piece of code instead
> of the command line. I do not believe the 
change_rectangle is available as
> an interactive command.

Ok, here's what I wrote.  It starts the video ok, but after the sleep(10) rather
than resizing the video, it starts a new video playing at the beginning and I
end up with two of the same size.

static FILE *videoPipe;

void startVideoPlayer (char *videoType, char *videoFile, char *videoOffset)
{
	char str[512];
	
	if(CMD_EQUAL (videoType, "MPLAYER"))
	{
		strcpy(str, "mplayer -slave '");
		strcat(str, videoFile);
		strcat(str, "'");
		DEBUG(LOGD"Run video: %s", str);
		videoPipe = popen(str, "w");
		sleep(10);
		fputs("change_rectangle 0 -100\n", videoPipe);
		fputs("change_rectangle 1 100\n", videoPipe);
		fflush(videoPipe);
	}
}






More information about the MPlayer-users mailing list