-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_iso.sh
executable file
·60 lines (49 loc) · 1.25 KB
/
build_iso.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
## Image sequence builder for SD/Rec.601 colour calibration
## Designed for use with ColorHCFR software
## Expects a format passed that matches ffmpeg's "-target"
## i.e.: one of pal-vcd, pal-svcd, pal-dvd, ntsc-vcd, ntsc-svcd, ntsc-dvd
## Assumes "dvd-menu" is in $PATH.
# Set resolutions for disc formats based on video/broadcast/SMPTE standards
case "${1}" in
pal-dvd)
XRES=720
YRES=576
RATE=25
CSPACE="bt601-6-625"
CMATRIX="bt470bg"
CTRC="gamma28"
PAL='-p'
REGION=PAL
LREGION=pal
;;
ntsc-dvd)
XRES=720
YRES=480
RATE="30000/1001"
CSPACE="bt601-6-525"
CMATRIX="smpte170m"
CTRC="smpte170m"
PAL=''
REGION=NTSC
LREGION=ntsc
;;
*)
echo "No format supplied"
exit 1
;;
esac
DATESTAMP=$(cat datestamp.txt)
mkdir iso-${1} >/dev/null 2>&1
rm -rf iso-${1}/*
rm FreeCalRec601_${REGION}_${DATESTAMP}.iso
TODAY=$(date +%F)
## Create the DVD menu page
echo "Calling spumux..."
spumux -m dvd menu_${LREGION}.xml < ${1}/dvd_menu_nosound.vob > ${1}/menu_${LREGION}.vob
## Create the DVD file system
echo "Calling dvdauthor..."
dvdauthor -x dvd_${LREGION}.xml
## Build the DVD iso
echo "Calling mkisofs..."
mkisofs -V "FreeCalRec601${REGION}_${TODAY}" -dvd-video -udf -o FreeCalRec601_${REGION}_${DATESTAMP}.iso iso-${1}/dvd_fs/