forked from amiaopensource/vrecord
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhdv.sh
executable file
·34 lines (24 loc) · 911 Bytes
/
hdv.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# @description:
# Small script to make HDV-capture more convenient.
# @history:
# 27.11.2014 peter_b - Started.
# Programs used:
ZENITY="zenity"
DVCONT="dvcont"
DVGRAB="dvgrab"
if ! ARCHIVE_SIGNATURE=$($ZENITY --entry --text "Enter archive signature:" --title "HDV Ingest"); then
exit;
fi
ARCHIVE_SIGNATURE=${ARCHIVE_SIGNATURE,,} # Force archive signature to lowercase
#CMD_HDV_MASK="$DVGRAB -f hdv --size 0 -showstatus %s - | ffplay -f mpegts -x 640 -y 360 -"
CMD_HDV_MASK="$DVGRAB -f hdv --size 0 -showstatus %s/%s- - | ffplay -f mpegts -x 1280 -y 720 -"
PWD=$(pwd)
CMD=$(printf "$CMD_HDV_MASK" "$PWD" "$ARCHIVE_SIGNATURE")
$ZENITY --info --text="Capturing HDV with this command:\n $CMD" --width=500
eval "$CMD"
$DVCONT rewind
# TODO: Wait for rewind to finish, before ejecting (status = idle?)
STATUS=$($DVCONT status)
echo "$STATUS"
# $DVCONT eject