About me I've been a computer programmer since I first started typing in program listings on a Commodore Vic 20 when I was about 8. My hobbies include electronics, CNC manufacturing, photography, beer and winemaking.
I live with my wife and lots of left-over parts from unfinished projects in Lincoln, Nebraska, USA.]
Blog
19 May 2011, 20:49 UTCsrtrename: rename subtitle files to match video files
I've recently been watching some videos in a tv series. Having obtained the
video files and subtitles from different sources, they had different naming
conventions. Mplayer requires that the files have the same name (except for
the extension, naturally) Renaming them by hand was a bit of an annoyance, so I
wrote "srtrename".
"srtrename" operates under the assumption that it is invoked in a folder
with only video files and subtitle files, and that the names of both have a
"SSxEE" or "SxE" (season / episode) naming convention, plus an arbitrary amount of
noise (such as the name of the show itself). It matches up the subtitle and video
files, then prints a series of 'mv -i' commands that would perform the renaming to
make the subtitle and video files match. I run it once to look at what it would
do, then run it a second time piped to sh to actually do the deed.
I've only used this lightly, but it seems to do the trick.
Note: some extensions for video files are hardcoded; if you have files with a
different extension, just add them to the video = glob… line in the obvious
(I hope!) way.
Files currently attached to this page:
srtrename 514 bytes
18 April 2011, 15:42 UTCFractal animation
I've been playing with mandelbulber, a GPL 3D fractal renderer that runs on Linux and Windows. Among
other things, it can make animations. I haven't had this much fun since I
first discovered fractint in the early 1990s.
The animation is an IFS-type fractal modified by the spherical folding mode.
It explores the "alpha", "beta" and "gamma" rotations under General IFS
Parameters, ultimately returning to the initial configuration. (too bad
I can't figure out how to make the player loop the clip!)
Check it out:
srtrename: rename subtitle files to match video files
I've recently been watching some videos in a tv series. Having obtained the video files and subtitles from different sources, they had different naming conventions. Mplayer requires that the files have the same name (except for the extension, naturally) Renaming them by hand was a bit of an annoyance, so I wrote "srtrename".
"srtrename" operates under the assumption that it is invoked in a folder with only video files and subtitle files, and that the names of both have a "SSxEE" or "SxE" (season / episode) naming convention, plus an arbitrary amount of noise (such as the name of the show itself). It matches up the subtitle and video files, then prints a series of 'mv -i' commands that would perform the renaming to make the subtitle and video files match. I run it once to look at what it would do, then run it a second time piped to sh to actually do the deed.
I've only used this lightly, but it seems to do the trick.
Note: some extensions for video files are hardcoded; if you have files with a different extension, just add them to the video = glob… line in the obvious (I hope!) way.
Files currently attached to this page:
| srtrename | 514 bytes |
Fractal animation
I've been playing with mandelbulber, a GPL 3D fractal renderer that runs on Linux and Windows. Among other things, it can make animations. I haven't had this much fun since I first discovered fractint in the early 1990s.
The animation is an IFS-type fractal modified by the spherical folding mode. It explores the "alpha", "beta" and "gamma" rotations under General IFS Parameters, ultimately returning to the initial configuration. (too bad I can't figure out how to make the player loop the clip!)
Check it out:
All older entries
Website Copyright © 2004-2024 Jeff Epler