doralsoral:
I wrote this script for you.
save it as framefromtime.sh
go into a console
run 'chmod +x framefromtime.sh'
then run 'framefromtime.sh <your video standard> <minutes> <seconds>'
example: 'framefromtime.sh PAL 56 28' would give you the frame at the start of 56m:28s in the film
this is the first shell script i've written to do anything useful so don't give me crap if it's not written well, it works and that's all i care about
ENJOY
Code:
#!/bin/sh
# Converts time in minutes+seconds to frames in PAL (25fps),
# NTSC (29.97fps), or NTSC/film (24fps) video.
#
# (C) Copyright 2004 Daniel Phillips (dangaz).
# Permission is granted to use, distribute, modify,
# whatever, just keep my name on it somewhere :).
#
# usage:
# FORMAT: MINUTES: SECONDS:
# framefromtime.sh [PAL|NTSC|FILM] [123] [45]
function dumpusage
{
printf "correct usage: framefromtime.sh [PAL|NTSC|FILM] [minutes] [seconds]"
}
if [ $# != 3 ]; then
echo $(dumpusage)
exit 1
fi
if [ $1 = "PAL" ]; then
fps=25
elif [ $1 = "NTSC" ]; then
fps=30
echo "WARNING: using 30fps instead of 29.97 for ease of use"
elif [ $1 = "FILM" ]; then
fps=24
else
echo $(dumpusage)
exit 1
fi
secs=$((($2*60)+$3))
frame=$(($secs*$fps))
vidtime="$2:$3"
echo "At $fps frames per second, $vidtime would put you at frame $frame"
exit 0