Audio bookを作りたい...オーディオブック


まず iTunesで Audio.aif を Audio.m4aに変換する。

変換したAudio.m4a情報を確認する。
ターミナルを起動する。
Developerの中の Tools の中の、GetFileInfo と SetFileを使う。

ターミナルを起動する。
$ /Developer/usr/bin/GetFileInfo /Volumes/workA/Audio.m4a ... 確認
file: "/Volumes/Project & Work G5/Audio.m4a"
type: "M4A " ... 最後に \0かなんかがあるのだが
creator: "hook"
attributes: avbstclinmedz
created: 11/16/2011 17:04:11
modified: 11/16/2011 17:04:43

$ /Developer/usr/bin/SetFile -t M4B /Volumes/workA/Audio.m4a ... これで変更
$ /Developer/usr/bin/GetFileInfo /Volumes/workA/Audio.m4a ... 確認
file: "/Volumes/Project & Work G5/Audio.m4a"
type: "M4B" ... 変わっている
creator: "hook"
attributes: avbstclinmedz
created: 11/16/2011 17:04:11
modified: 11/16/2011 17:04:43

拡張子を変える。
Audio0.m4a -> Audio.m4b
これを iTunesで聞いて、聞き直したとき前の箇所から再生するか確かめる。
iTunesがまごつかないように、Audio0.m4a を Audio_book.m4b のようにファイル名も変えたほうがテストしやすい。

$ /Developer/usr/bin/SetFile -h
Usage: SetFile [option...] file...
-a attributes # attributes (lowercase = 0, uppercase = 1)*
-c creator # file creator
-d date # creation date (mm/dd/[yy]yy [hh:mm[:ss] [AM | PM]])*
-m date # modification date (mm/dd/[yy]yy [hh:mm[:ss] [AM | PM]])*
-P # perform action on symlink instead of following it
-t type # file type
Note: The following attributes may be used with the -a option:
A Alias file
B Bundle
C Custom icon*
D Desktop*
E Hidden extension*
I Inited*
M Shared (can run multiple times)
N No INIT resources
L Locked
S System (name locked)
T Stationery
V Invisible*
Z Busy*
Note: Items marked with an asterisk (*) are allowed with folders
Note: Period (.) represents the current date and time.
Note: [yy]yy < 100 assumes 21st century, e.g. 20yy

$ man GetFileInfo
GETFILEINFO(1) BSD General Commands Manual GETFILEINFO(1)
NAME
/usr/bin/GetFileInfo -- get attributes of files and directories
SYNOPSIS
/usr/bin/GetFileInfo [-P -a[] | -c | -d | -m | -t] file
...
DESCRIPTION
/usr/bin/GetFileInfo is a tool to get the file attributes.
With no flags, GetFileInfo retrieves all information about the file. If
exactly one option is provided, GetFileInfo retrieves and displays just
that information; supplying more than one is an error.
Flags:
-P Acts on a symlink file instead of the file the symlink resolves to.
-a[]
Gets a file's attribute bits where is
one of the following:
a Alias file
b Has bundle
c Custom icon (allowed on folders)
d Located on the desktop (allowed on folders)
e Extension is hidden (allowed on folders)
i Inited - Finder is aware of this file and has
given it a location in a window. (allowed on
folders)
l Locked
m Shared (can run multiple times)
n File has no INIT resource
s System file (name locked)
t "Stationery Pad" file
v Invisible (allowed on folders)
z Busy (allowed on folders)
The value of a single attribute is printed as 0 for off or
false, 1 for on or true. If no attribute letter is speci-
fied, the value of all attributes is returned, with lower-
case letters representing off or false, and uppercase rep-
resenting on or true.
-t Gets the file type, a string of exactly four characters.
If the type is not set, these will display as an empty
pair of quotation marks. Directories do not have types,
so the type will be skipped if all information is being
displayed; specifying -t for a directory is an error.
-c Gets the file's creator, a string of four characters
enclosed in quotation marks. If the creator is not set,
these will display as an empty pair of quotation marks.
Directories do not have creators, so the creator will be
skipped if all information is being displayed; specifying
-c for a directory is an error.
-d Gets the creation date, a string of the form "mm/dd/yyyy
hh:mm:ss" in 24-hour clock format.
-m Gets the modification date, a string of the form
"mm/dd/yyyy hh:mm:ss" in 24-hour clock format.
RETURN VALUES
0 success
1 syntax error
2 any other error
SEE ALSO
SetFile(1)
EXAMPLES
The following command line gets and prints the creator for the "Late
Breaking News" file:
/Developer/Tools/GetFileInfo -c "Late Breaking News"
This command line prints the modification date of "myFile":
/Developer/Tools/GetFileInfo -m myFile
Mac OS X September 27, 2005 Mac OS X
(END)

環境;Mac OS X 10.5.8 PowerMac G5 Dual 2.5GHz
ターミナル 文字エンコーディング:UTF-8

....Mac OS X 10.6c MacPro 2.66Ghz Quadでは SetFileでエラー表示だった。後日check
17 Nov, 2011 | mokimoc
« Prev item - Next Item »
---------------------------------------------

Comments



Leave comments

このアイテムは閲覧専用です。コメントの投稿、投票はできません。