Command disabled: backlink

Playing random videos from a directory using MPlayer

The following shell script plays avi, mpeg and wmv files in a random order when executed in a directory containing files.

#!/bin/bash
ls -1Q \
| awk 'BEGIN {FS="\n"} /.*.(avi|mpg|mpeg|wmv)/ {printf("%i\t%s\n",rand()*10^6,$1) }' \
| sort | cut -f2 | xargs mplayer -fs

Linkbacks

Use the following URL for manually sending trackbacks: http://rigo.info/lib/plugins/linkback/exe/trackback.php/en:blog:playing_random_videos_from_a_directory_using_mplayer
en/blog/playing_random_videos_from_a_directory_using_mplayer.txt · Utolsó módosítás: 2009-04-14 00:00 (külső szerkesztés)
CC Attribution-Noncommercial-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0