Mplayer video wall script

So anyway, the thing that prompted me to set up this online journal was my recurring desire to share things that I create with the world. In this instance; the thing that pushed me to actually do something about it, was a perl script I had just written which creates a wall of videos. I created it to optimise my porn viewing, and because I couldn’t find anything to play multiple video files side by side, in a grid.

A 5x5 video wall of old American anti-drug propaganda

The mplayer video wall script can be downloaded, “chmod +x“ed and executed as follows: * -w2 -h2 *flv

The -w and -h switches specify the number of columns and rows of videos to construct. The glob of filenames is just a list of video files which the script picks from at random. It can be any length and produced by any means, so perhaps: -w5 -h5 `find . -type f -print0 | xargs -0 -I '{}' echo "'{}'"`

...if you’re feeling fancy. (Beware filenames with quotes in them!)

A 3x3 videowall of feature films

It’s not perfect by any means, but it’ll do for its intended purpose. I.e., optimised masturbation.

Feed me back if you have any thoughts.

five comments

This script plus a porn DVD shot at multiple angles could be used to create a new genre of porn. Congratulations.
br (Email) (URL) - 08 04 09 - 03:08

i keeps playing the same porn movie many times although i give it around 16 files for playing

but nice script
roKB (Email) (URL) - 13 01 10 - 19:32

Hmm, I wonder why. It could be because this script is incredibly bad at dealing with filenames containing spaces. I usually rename all the files to not have spaces:

for i in *flv ; do mv “$i” `echo “$i” | sed ‘s/ /_/g’` ; done
Idris (URL) - 14 01 10 - 21:00

Here’s my workinprogress python port of your perl script with some enhancements!

import sys
import random
import os
from threading import Thread
import ctypes
xres = ctypes.windll.user32.GetSystemMetrics(0)
yres = ctypes.windll.user32.GetSystemMetrics(1)

def mplayer(file, w, x, y):
cmd = “mplayer -really-quiet -vo direct3d -zoom -noborder -xy {0} -geometry {1}:{2} {3}”.format(w,x,y,file)
print cmd

def scan():
files = []
for dirname, dirnames, filenames in os.walk(’.’):
for subdirname in dirnames:
array_merge(files,scan(os.path.join(dirname, subdirname)))
for filename in filenames:
files.append(os.path.join(dirname, filename))
return files

if name == “main“:
files = scan()
for i in range(0,9):
file = files.pop()
w = xres /3
x = w * (i % 3)
y = yres /3 * (int(i / 3))
Thread(target = mplayer, args=[file, w, x,y]).start()
stefan - 27 08 11 - 14:50

:D nice one.

FYI (and everyone else’s) my script is… let’s say… LGPL, so do what you want with it.
Idris (URL) - 27 08 11 - 17:08

Post a comment

Remember personal info?

Comment: Emoticons / Textile

This is not a trick question, but a mechanism for spam prevention.

  ( Register your username / Log in )

Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.
Powered by Pivot. RSS Feed & ATOM Feed