3 # Calin-Andrei Burloiu, 2010, calin.burloiu@gmail.com
5 # This script cuts .mts video file starting from a seek point
6 # with a desired duration. Seek point and duration are expressed in
7 # seconds or in the hh:mm:ss[.xx] format.
10 if test $# -ne 4; then
11 echo "Usage: $0 mts-input-file mts-output-file seek-point duration"
19 FFMPEG=/usr/bin/ffmpeg
21 if test ! -f "$MTS_IN"; then
22 echo "Error: No such file $MTS_IN"
26 "$FFMPEG" -ss "$SEEK_POINT" -t "$DURATION" -i "$MTS_IN" -f mpegts -acodec copy -vcodec copy "$MTS_OUT"