Media Movie

[bluray]VLCのブルーレイ再生ライブラリのインストール(3.0.21対応)


【スクリプトエディタで開く】 |

VLCのブルーレイ再生ライブラリのインストール.scpt
ソース
001#!/usr/bin/env osascript
002----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
003(*
004
005v1.2 20250419 3.0.21対応 
006
007VLCのブルーレイ再生ライブラリのインストール
008ブルーレイライブラリは
009インテル版のVLCでないと利用できません
010そのため
011ロゼッタ2とインテル版のVLCが必要です
012
013https://www.videolan.org/vlc/download-macosx.html
0143.0.17.3
015https://quicktimer.cocolog-nifty.com/icefloe/2022/08/post-0940c9.html
0163.0.20
017https://quicktimer.cocolog-nifty.com/icefloe/2024/02/post-908916.html
018
019ブルーレイライブラリ
020https://vlc-bluray.whoknowsmy.name/
021
022DB
023https非対応なので
024サイトの帯域が脆弱で、20MBのダウンロード10分かかる等
025エラーすることが多い
026http://fvonline-db.bplaced.net/
027
028
029com.cocolog-nifty.quicktimer.icefloe*)
030----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
031##自分環境がos12なので2.8にしているだけです
032use AppleScript version "2.8"
033use framework "Foundation"
034use scripting additions
035property refMe : a reference to current application
036
037#ARM
038set strUrlVlcArm to ("https://repo.jing.rocks/videolan/vlc/3.0.21/macosx/vlc-3.0.21-arm64.dmg") as text
039
040####ARM版では動作しないので留意 VLC インテル版
041##set strUrlVlcIntel to ("https://repo.jing.rocks/videolan/vlc/3.0.21/macosx/vlc-3.0.21-arm64.dmg")as text
042#set strUrlVlcIntel to ("https://repo.jing.rocks/videolan/vlc/3.0.20/macosx/vlc-3.0.20-intel64.dmg")as text
043set strUrlVlcIntel to ("https://repo.jing.rocks/videolan/vlc/3.0.21/macosx/vlc-3.0.21-intel64.dmg") as text
044
045###AACライブラリ
046set strUrlLibaacs to "https://vlc-bluray.whoknowsmy.name/files/mac/libaacs.dylib"
047##キーDB
048set strUrlKeydb to "http://fvonline-db.bplaced.net/export/keydb_jpn.zip"
049
050#########################################
051###インテル互換のためにロゼッタ2をインストールしておく
052set strCnd to ("/usr/sbin/softwareupdate --install-rosetta  --agree-to-license") as text
053set boolDone to doZshShellScript(strCnd)
054if boolDone is false then return "softwareupdate: エラーしました"
055
056#########################################
057###ユーザーアプリケーションフォルダを作る
058set appFileManager to refMe's NSFileManager's defaultManager()
059set ocidURLsArray to (appFileManager's URLsForDirectory:(refMe's NSApplicationDirectory) inDomains:(refMe's NSUserDomainMask))
060set ocidApplicationDirPathURL to ocidURLsArray's firstObject()
061set ocidAppDirPathURL to ocidApplicationDirPathURL's URLByAppendingPathComponent:("Movies/VLC_intel")
062set ocidAppDirPath to ocidAppDirPathURL's |path|()
063set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s init()
064# 777-->511 755-->493 700-->448 766-->502 
065ocidAttrDict's setValue:(448) forKey:(refMe's NSFilePosixPermissions)
066set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidAppDirPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error|:(reference)
067if (item 1 of listBoolMakeDir) is false then
068   log "フォルダ作成でエラーしました"
069   return "フォルダ作成でエラーしました"
070end if
071set ocidAppARMDirPathURL to ocidApplicationDirPathURL's URLByAppendingPathComponent:("Movies/VLC_Arm")
072set ocidAppARMDirPath to ocidAppARMDirPathURL's |path|()
073set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidAppARMDirPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error|:(reference)
074if (item 1 of listBoolMakeDir) is false then
075   log "フォルダ作成でエラーしました"
076   return "フォルダ作成でエラーしました"
077end if
078#########################################
079#
080set strFolderIconURL to ("https://quicktimer.cocolog-nifty.com/icefloe/files/vlc.icns.icns") as text
081set ocidFolderIconURLString to refMe's NSString's stringWithString:(strFolderIconURL)
082set ocidFolderIconURL to refMe's NSURL's alloc()'s initWithString:(ocidFolderIconURLString)
083#アイコンデータ読み込み NSDATA
084set ocidOption to (refMe's NSDataReadingMappedIfSafe)
085set listResponse to refMe's NSData's alloc()'s initWithContentsOfURL:(ocidFolderIconURL) options:(ocidOption) |error|:(reference)
086set ocidIconData to (item 1 of listResponse)
087#NSIMAGE
088set ocidIconImage to refMe's NSImage's alloc()'s initWithData:(ocidIconData)
089#アイコンセット
090set appSharedWorkspace to refMe's NSWorkspace's sharedWorkspace()
091set ocidOption to (refMe's NSExclude10_4ElementsIconCreationOption)
092set boolDone to (appSharedWorkspace's setIcon:(ocidIconImage) forFile:(ocidAppDirPath) options:(ocidOption))
093set boolDone to (appSharedWorkspace's setIcon:(ocidIconImage) forFile:(ocidAppARMDirPath) options:(ocidOption))
094#########################################
095###ユーザーaacs Cachesフォルダを作る
096set ocidURLsArray to (appFileManager's URLsForDirectory:(refMe's NSCachesDirectory) inDomains:(refMe's NSUserDomainMask))
097set ocidCachesDirPathURL to ocidURLsArray's firstObject()
098set ocidAacsCachesPathURL to ocidCachesDirPathURL's URLByAppendingPathComponent:"aacs"
099set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s init()
100# 777-->511 755-->493 700-->448 766-->502 
101ocidAttrDict's setValue:(511) forKey:(refMe's NSFilePosixPermissions)
102set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidAacsCachesPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error|:(reference)
103if (item 1 of listBoolMakeDir) is false then
104   log "フォルダ作成でエラーしました"
105   return "フォルダ作成でエラーしました"
106end if
107#########################################
108###ユーザーbluray  Cachesフォルダを作る
109set ocidBlurayCachesPathURL to ocidCachesDirPathURL's URLByAppendingPathComponent:"bluray"
110set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s init()
111# 777-->511 755-->493 700-->448 766-->502 
112ocidAttrDict's setValue:(511) forKey:(refMe's NSFilePosixPermissions)
113set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidBlurayCachesPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error|:(reference)
114if (item 1 of listBoolMakeDir) is false then
115   log "フォルダ作成でエラーしました"
116   return "フォルダ作成でエラーしました"
117end if
118#########################################
119###初期設定フォルダを作る
120set ocidURLsArray to (appFileManager's URLsForDirectory:(refMe's NSLibraryDirectory) inDomains:(refMe's NSUserDomainMask))
121set ocidLibraryDirPathURL to ocidURLsArray's firstObject()
122set ocidPreferencesDirPathURL to ocidLibraryDirPathURL's URLByAppendingPathComponent:("Preferences/aacs")
123set strPreferencesDirPath to ocidPreferencesDirPathURL's |path| as text
124set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s init()
125# 777-->511 755-->493 700-->448 766-->502 
126ocidAttrDict's setValue:(448) forKey:(refMe's NSFilePosixPermissions)
127set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidPreferencesDirPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error|:(reference)
128if (item 1 of listBoolMakeDir) is false then
129   log "フォルダ作成でエラーしました"
130   return "フォルダ作成でエラーしました"
131end if
132#########################################
133####ダウンロードフォルダ
134set ocidTempDirURL to appFileManager's temporaryDirectory()
135set ocidUUID to refMe's NSUUID's alloc()'s init()
136set ocidUUIDString to ocidUUID's UUIDString
137set ocidSaveDirPathURL to ocidTempDirURL's URLByAppendingPathComponent:(ocidUUIDString) isDirectory:true
138set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s init()
139# 777-->511 755-->493 700-->448 766-->502 
140ocidAttrDict's setValue:(511) forKey:(refMe's NSFilePosixPermissions)
141set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidSaveDirPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error|:(reference)
142if (item 1 of listBoolMakeDir) is false then
143   log "フォルダ作成でエラーしました"
144   return "フォルダ作成でエラーしました"
145end if
146set strSaveDir to ocidSaveDirPathURL's |path| as text
147#########################################
148###vlcファイルのダウンロード ARM
149set objSysInfo to system info
150set strCpuType to (CPU type of objSysInfo) as text
151set strVlcARMSaveFilePath to (strSaveDir & "/vlcarm.dmg") as text
152if strCpuType contains "ARM" then
153   set strCommandText to "/usr/bin/curl -k \"" & strUrlVlcArm & "\" -o \"" & strVlcARMSaveFilePath & "\"  --connect-timeout 120" as text
154end if
155###コマンド実行
156log "VLCダウンロード開始"
157set boolDone to doZshShellScript(strCommandText)
158if boolDone is false then return "curl: エラーしました"
159log "VLCダウンロード終了"
160
161#########################################
162###vlcファイルのダウンロード
163set strVlcSaveFilePath to (strSaveDir & "/vlc.dmg") as text
164set strCommandText to "/usr/bin/curl -k \"" & strUrlVlcIntel & "\" -o \"" & strVlcSaveFilePath & "\"  --connect-timeout 120" as text
165###コマンド実行
166log "VLCダウンロード開始"
167set boolDone to doZshShellScript(strCommandText)
168if boolDone is false then return "curl: エラーしました"
169log "VLCダウンロード終了"
170
171#########################################
172###libaacs.dylibファイルのダウンロード
173set strAacsSaveFilePath to (strSaveDir & "/libaacs.dylib.bin") as text
174set strCommandText to "/usr/bin/curl -k \"" & strUrlLibaacs & "\" -o \"" & strAacsSaveFilePath & "\"  --connect-timeout 120" as text
175###コマンド実行
176log "libaacs.dylibダウンロード開始"
177set boolDone to doZshShellScript(strCommandText)
178if boolDone is false then return "curl: エラーしました"
179log "libaacs.dylibダウンロード終了"
180
181#########################################
182###keydb_jpnファイルのダウンロード
183
184set strKeySaveFilePath to (strSaveDir & "/keydb_jpn.zip") as text
185
186set strCommandText to "/usr/bin/curl -k \"" & strUrlKeydb & "\" -o \"" & strKeySaveFilePath & "\"  --connect-timeout 480" as text
187###コマンド実行
188log "keydb_jpn.zipダウンロード開始"
189try
190   set boolDone to doZshShellScript(strCommandText)
191   if boolDone is false then log "curl: エラーしました"
192on error
193   set strUrlKeydb to "https://force4u.cocolog-nifty.com/skywalker/files/keydb_jpn.zip"
194   set strCommandText to "/usr/bin/curl -k \"" & strUrlKeydb & "\" -o \"" & strKeySaveFilePath & "\"  --connect-timeout 480" as text
195   set boolDone to doZshShellScript(strCommandText)
196   if boolDone is false then return "curl: エラーしました"
197end try
198log "keydb_jpn.zipダウンロード終了"
199
200
201
202#########################################
203###ユーザーアプリケーションフォルダにVLC.appがあればゴミ箱へ入れる
204set ocidVlcPathURL to ocidAppDirPathURL's URLByAppendingPathComponent:"VLC.app"
205set ocidVlcAppPath to ocidVlcPathURL's |path|()
206set strVlcAppPath to ocidVlcAppPath as text
207##ゴミ箱に入れる
208set boolGoToTrash to appFileManager's trashItemAtURL:(ocidVlcPathURL) resultingItemURL:(ocidVlcPathURL) |error|:(reference)
209
210set ocidVlcARMPathURL to ocidAppARMDirPathURL's URLByAppendingPathComponent:"VLC.app"
211set ocidVlcARMPath to ocidVlcARMPathURL's |path|()
212set strVlcARMPath to ocidVlcARMPath as text
213##ゴミ箱に入れる
214set boolGoToTrash to appFileManager's trashItemAtURL:(ocidVlcARMPathURL) resultingItemURL:(ocidVlcARMPathURL) |error|:(reference)
215
216
217#########################################
218###VLCをコピー
219try
220   set strCommandText to ("/usr/bin/hdiutil attach  \"" & strVlcSaveFilePath & "\"  -noverify -nobrowse -noautoopen") as text
221   set boolDone to doZshShellScript(strCommandText)
222   if boolDone is false then log "attach: エラーしました"
223on error
224   set strCommandText to ("/usr/bin/hdiutil  detach \"Volumes/VLC media player\" -force") as text
225   set boolDone to doZshShellScript(strCommandText)
226   log "attachでエラーになりました"
227   return
228end try
229
230try
231   set strCommandText to ("/usr/bin/ditto \"/Volumes/VLC media player/VLC.app\" \"" & strVlcAppPath & "\"") as text
232   set boolDone to doZshShellScript(strCommandText)
233   if boolDone is false then return "ditto: エラーしました"
234on error
235   set strCommandText to ("/usr/bin/hdiutil  detach \"Volumes/VLC media player\" -force") as text
236   set boolDone to doZshShellScript(strCommandText)
237   log "dittoでエラーになりました"
238   return
239end try
240
241try
242   set strCommandText to ("/usr/bin/hdiutil  detach \"Volumes/VLC media player\" -force") as text
243   set boolDone to doZshShellScript(strCommandText)
244   if boolDone is false then return "hdiutil: エラーしました"
245on error
246   log "detachでエラーになりました"
247   return
248end try
249
250#ARM
251if strCpuType contains "ARM" then
252   try
253      set strCommandText to ("/usr/bin/hdiutil attach  \"" & strVlcARMSaveFilePath & "\"  -noverify -nobrowse -noautoopen") as text
254      set boolDone to doZshShellScript(strCommandText)
255      if boolDone is false then log "attach: エラーしました"
256   on error
257      set strCommandText to ("/usr/bin/hdiutil  detach \"Volumes/VLC media player\" -force") as text
258      set boolDone to doZshShellScript(strCommandText)
259      log "attachでエラーになりました"
260      return
261   end try
262   try
263      set strCommandText to ("/usr/bin/ditto \"/Volumes/VLC media player/VLC.app\" \"" & strVlcARMPath & "\"") as text
264      set boolDone to doZshShellScript(strCommandText)
265      if boolDone is false then return "ditto: エラーしました"
266   on error
267      set strCommandText to ("/usr/bin/hdiutil  detach \"Volumes/VLC media player\" -force") as text
268      set boolDone to doZshShellScript(strCommandText)
269      log "dittoでエラーになりました"
270      return
271   end try
272   try
273      set strCommandText to ("/usr/bin/hdiutil  detach \"Volumes/VLC media player\" -force") as text
274      set boolDone to doZshShellScript(strCommandText)
275      if boolDone is false then return "hdiutil: エラーしました"
276   on error
277      log "detachでエラーになりました"
278      return
279   end try
280end if
281#########################################
282###libaacs.dylibを指定の場所にコピー
283set ocidAacsSavePathURL to ocidVlcPathURL's URLByAppendingPathComponent:"Contents/MacOS/lib/libaacs.dylib"
284set strAacsSavePath to ocidAacsSavePathURL's |path| as text
285try
286   set strCommandText to ("/usr/bin/ditto \"" & strAacsSaveFilePath & "\" \"" & strAacsSavePath & "\"") as text
287   set boolDone to doZshShellScript(strCommandText)
288   if boolDone is false then return "hdiutil: エラーしました"
289on error
290   set strCommandText to ("/usr/bin/hdiutil  detach \"Volumes/VLC media player\" -force") as text
291   set boolDone to doZshShellScript(strCommandText)
292   log "libaacs.dylib dittoでエラーになりました"
293   return
294end try
295#########################################
296### keydb.cfg まずは解凍してからコピー
297try
298   set strCommandText to ("/usr/bin/unzip \"" & strKeySaveFilePath & "\" -d \"" & strSaveDir & "\"") as text
299   set boolDone to doZshShellScript(strCommandText)
300   if boolDone is false then return "unzip: エラーしました"
301on error
302   log "unzipでエラーになりました"
303   return
304end try
305set strUnzipPath to (strSaveDir & "/keydb.cfg") as text
306try
307   set strCommandText to ("/usr/bin/ditto \"" & strUnzipPath & "\" \"" & strPreferencesDirPath & "/keydb.cfg\"") as text
308   set boolDone to doZshShellScript(strCommandText)
309   if boolDone is false then return "ditto: エラーしました"
310on error
311   log "keydb.cfg dittoでエラーになりました"
312   return
313end try
314
315#########################################
316#アトリビュートをリセット
317set strCommandText to ("xattr -rc \"" & strVlcAppPath & "\"") as text
318set boolDone to doZshShellScript(strCommandText)
319if boolDone is false then return "xattr: エラーしました"
320if strCpuType contains "ARM" then
321   set strCommandText to ("xattr -rc \"" & strVlcARMPath & "\"") as text
322   set boolDone to doZshShellScript(strCommandText)
323   if boolDone is false then return "xattr: エラーしました"
324end if
325
326#########################################
327#インストール先を表示
328set ocidAppPathURL to ocidAppDirPathURL's URLByAppendingPathComponent:("VLC.app")
329set ocidAppPath to ocidAppPathURL's |path|
330set ocidContainerDirPath to ocidAppDirPathURL's |path|
331set appSharedWorkspace to refMe's NSWorkspace's sharedWorkspace()
332set boolDone to appSharedWorkspace's selectFile:(ocidAppPath) inFileViewerRootedAtPath:(ocidContainerDirPath)
333set boolDone to appSharedWorkspace's openURL:(ocidAppPathURL)
334if (boolDone as boolean) is false then
335   #ファイルを開く
336   set aliasSaveFilePath to (ocidAppDirPathURL's absoluteURL()) as alias
337   tell application "Finder"
338      open folder aliasSaveFilePath
339   end tell
340end if
341
342
343
344##########################
345# 【通常】ZSH 実行
346to doZshShellScript(argCommandText)
347   set strCommandText to argCommandText as text
348   log "\r" & strCommandText & "\r"
349   set strExec to ("/bin/zsh -c '" & strCommandText & "'") as text
350   #   log "\r" & strExec & "\r"
351   ##########
352   #コマンド実行
353   try
354      log "コマンド開始"
355      set strResnponse to (do shell script strExec) as text
356      log "コマンド終了"
357   on error
358      return false
359   end try
360   return true
361end doZshShellScript
AppleScriptで生成しました

| | コメント (0)

[Bash]DaVinciResolve再インストール・アップデート時のクリーナー


サンプルコード

サンプルソース(参考)
行番号ソース
001#!/bin/bash
002#com.cocolog-nifty.quicktimer.icefloe
003# DaVinciResolve 再インストール時のクリーナー
004#################################################
005###管理者インストールしているか?チェック
006USER_WHOAMI=$(/usr/bin/whoami)
007/bin/echo "実行ユーザー(whoami): $USER_WHOAMI"
008if [ "$USER_WHOAMI" != "root" ]; then
009  /bin/echo "このスクリプトを実行するには管理者権限が必要です。"
010  /bin/echo "sudo で実行してください"
011  ### path to me
012  SCRIPT_PATH="${BASH_SOURCE[0]}"
013  /bin/echo "/usr/bin/sudo \"$SCRIPT_PATH\""
014  /bin/echo "↑を実行してください"
015  ###実行しているユーザー名
016  CONSOLE_USER=$(/bin/echo "show State:/Users/ConsoleUser" | /usr/sbin/scutil | /usr/bin/awk '/Name :/ { print $3 }')
017  /bin/echo "コンソールユーザー(scutil): $CONSOLE_USER"
018  exit 1
019else
020  ###実行しているユーザー名
021  CONSOLE_USER=$(/bin/echo "show State:/Users/ConsoleUser" | /usr/sbin/scutil | /usr/bin/awk '/Name :/ { print $3 }')
022  /bin/echo "コンソールユーザー(scutil): $CONSOLE_USER"
023  ###実行しているユーザー名
024  HOME_USER=$(/bin/echo "$HOME" | /usr/bin/awk -F'/' '{print $NF}')
025  /bin/echo "実行ユーザー(HOME): $HOME_USER"
026  ###logname
027  LOGIN_NAME=$(/usr/bin/logname)
028  /bin/echo "ログイン名(logname): $LOGIN_NAME"
029  ###UID
030  USER_NAME=$(/usr/bin/id -un)
031  /bin/echo "ユーザー名(id): $USER_NAME"
032  ###STAT
033  STAT_USR=$(/usr/bin/stat -f%Su /dev/console)
034  /bin/echo "STAT_USR(console): $STAT_USR"
035fi
036
037#################################################
038###
039function DO_MOVE_TO_TRASH_C() {
040    STR_TMP_DIR=$(/usr/bin/dirname "$(/usr/bin/dirname "$(/usr/bin/sudo -u "$STAT_USR" /usr/bin/mktemp -d)")")
041    STR_TMP_DIR_C="${STR_TMP_DIR}/C/$1"
042    /bin/echo "$STR_TMP_DIR_C"
043  if [ -e "$STR_TMP_DIR_C" ]; then
044    TRASH_DIR=$(/usr/bin/sudo -u "$STAT_USR" /usr/bin/mktemp -d "/Users/${STAT_USR}/.Trash/XXXXXXXX")
045    /usr/bin/sudo -u "$STAT_USR" /bin/chmod 777 "$TRASH_DIR"
046    /bin/mv "$STR_TMP_DIR_C" "$TRASH_DIR"
047  else
048    /bin/echo "$STR_TMP_DIR_C""は見つかりませんでした"
049  fi
050}
051DO_MOVE_TO_TRASH_C "com.blackmagic-design.DaVinciResolve"
052DO_MOVE_TO_TRASH_C "com.blackmagic-design.UninstallDaVinciResolve"
053
054#################################################
055###
056function DO_MOVE_TO_TRASH() {
057  if [ -e "$1" ]; then
058    TRASH_DIR=$(/usr/bin/sudo -u "$STAT_USR" /usr/bin/mktemp -d "/Users/${STAT_USR}/.Trash/XXXXXXXX")
059    /usr/bin/sudo -u "$STAT_USR" /bin/chmod 777 "$TRASH_DIR"
060    /bin/mv "$1" "$TRASH_DIR"
061  else
062    /bin/echo "$1""は見つかりませんでした"
063  fi
064}
065
066DO_MOVE_TO_TRASH "/Applications/Blackmagic Proxy Generator Lite.app"
067DO_MOVE_TO_TRASH "/Applications/Blackmagic RAW"
068DO_MOVE_TO_TRASH "/Applications/DaVinci Resolve"
069DO_MOVE_TO_TRASH "/Library/Application Support/Blackmagic Design"
070DO_MOVE_TO_TRASH "/Library/Frameworks/DaVinciPanelAPI.framework"
071DO_MOVE_TO_TRASH "/Library/Frameworks/FairlightPanelAPI.framework"
072DO_MOVE_TO_TRASH "/Library/Extensions/CrystalDriver.kext"
073DO_MOVE_TO_TRASH "/Library/Extensions/CrystalDriver.kext"
074#この2つは好みの問題で外した方がいい人もいる
075DO_MOVE_TO_TRASH "/Users/${STAT_USR}/Movies/.gallery"
076DO_MOVE_TO_TRASH "/Users/${STAT_USR}/Movies/CacheClip"
077
078exit 0
AppleScriptで生成しました

|

【カーネル機能拡張】CrystalDriver.kext

/Library/Extensions/CrystalDriver.kext
Blackmagic Design製
カーネル機能拡張
Blackmagic DaVinci Resolveをインストールすると同時にインストールされる
バンドルIDは
com.blackmagic-design.driver.Crystal
バンドル名は
CrystalDriver

2024年時点で
InfoDictionary versionは6.0
DaVinci Resolveを使っていないならアンインストールも可
DMG同封のUninstall Resolve.appでは削除されないので
基本手動でアンインストール

|

Shutter Encoderからffmpegの取り出し

ダウンロード - mov2mp4arm.zip


#!/bin/bash
#com.cocolog-nifty.quicktimer.icefloe
#ユーザードメインの $HOME/binにインストールする
########################################
### 設定項目
STR_URL="https://www.shutterencoder.com/Shutter%20Encoder%2017.9%20Apple%20Silicon.pkg"

########################################
###管理者インストールしているか?チェック
USER_WHOAMI=$(/usr/bin/whoami)
/bin/echo "実行ユーザーは:$USER_WHOAMI"
###実行しているユーザー名
CONSOLE_USER=$(/bin/echo "show State:/Users/ConsoleUser" | /usr/sbin/scutil | /usr/bin/awk '/Name :/ { print $3 }')
/bin/echo "コンソールユーザー:$CONSOLE_USER"
###ログイン名ユーザー名※Visual Studio Codeの出力パネルではrootになる設定がある
LOGIN_NAME=$(/usr/bin/logname)
/bin/echo "ログイン名:$LOGIN_NAME"
###UID
USER_NAME=$(/usr/bin/id -un)
/bin/echo "ユーザー名:$USER_NAME"
###SUDOUSER
/bin/echo "SUDO_USER: $SUDO_USER"
########################################
##OS
PLIST_PATH="/System/Library/CoreServices/SystemVersion.plist"
STR_OS_VER=$(/usr/bin/defaults read "$PLIST_PATH" ProductVersion)
/bin/echo "OS VERSION :" "$STR_OS_VER"
STR_MAJOR_VERSION="${STR_OS_VER%%.*}"
/bin/echo "STR_MAJOR_VERSION :" "$STR_MAJOR_VERSION"
STR_MINOR_VERSION="${STR_OS_VER#*.}"
/bin/echo "STR_MINOR_VERSION :" "$STR_MINOR_VERSION"

############################################################
###旧バージョンをゴミ箱に
/bin/mkdir -p "/Users/$CONSOLE_USER/bin/"
# binは不可視にする
/usr/bin/chflags hidden "/Users/$CONSOLE_USER/bin"
/usr/bin/SetFile -a V "/Users/$CONSOLE_USER/bin"
#
USER_TRASH_DIR=$(/usr/bin/mktemp -d "$HOME/.Trash/FFMPEG.XXXXXXXX")
/bin/mkdir -p "/Users/$CONSOLE_USER/bin/ffmpeg.arm"
/bin/mv "/Users/$CONSOLE_USER/bin/ffmpeg.arm" "$USER_TRASH_DIR"

###ダウンロードSTR_URL
USER_TEMP_DIR=$(/usr/bin/mktemp -d)
/bin/echo "起動時に削除されるディレクトリ:" "$USER_TEMP_DIR"
if ! /usr/bin/curl -L -o "$USER_TEMP_DIR/install.pkg" "$STR_URL" --connect-timeout 20; then
/bin/echo "ファイルのダウンロードに失敗しました HTTP1.1で再トライします"
  if ! /usr/bin/curl -L -o "$USER_TEMP_DIR/install.pkg" "$STR_URL" --http1.1 --connect-timeout 20; then
/bin/echo "ファイルのダウンロードに失敗しました"
exit 1
  fi
fi
###########################
/usr/sbin/pkgutil --expand "$USER_TEMP_DIR/install.pkg" "$USER_TEMP_DIR/Expand"

###########################
/usr/bin/ditto -xz  "$USER_TEMP_DIR/Expand/com.paulpacifico.shutterencoder.pkg/Payload" "$USER_TEMP_DIR/Extract"
 
###########################
/usr/bin/ditto "$USER_TEMP_DIR/Extract/Shutter Encoder.app/Contents/Resources/Library" "/Users/$CONSOLE_USER/bin/ffmpeg.arm"

exit 0

|

[bluray]VLCのブルーレイ再生ライブラリのインストール(3.0.20対応)

[bluray]VLCのブルーレイ再生ライブラリのインストール(3.0.21対応)にアップデートがあります https://quicktimer.cocolog-nifty.com/icefloe/2025/04/post-8008f5.html

【スクリプトエディタで開く】|

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
##自分環境がos12なので2.8にしているだけです
use AppleScript version "2.8"
use framework "Foundation"
use scripting additions
property refMe : a reference to current application

####ARM版では動作しないので留意 VLC インテル版
###set strUrlVlcArm to "https://vlc.letterboxdelivery.org/vlc/3.0.17.3/macosx/vlc-3.0.17.3-arm64.dmg"
##set strUrlVlcIntel to "https://vlc.letterboxdelivery.org/vlc/3.0.17.3/macosx/vlc-3.0.17.3-intel64.dmg"
set strUrlVlcIntel to "https://free.nchc.org.tw/vlc/vlc/3.0.20/macosx/vlc-3.0.20-intel64.dmg"
###AACライブラリ
set strUrlLibaacs to "https://vlc-bluray.whoknowsmy.name/files/mac/libaacs.dylib"
##キーDB
set strUrlKeydb to "http://fvonline-db.bplaced.net/export/keydb_jpn.zip"


#########################################
###ユーザーアプリケーションフォルダを作る
set appFileManager to refMe's NSFileManager's defaultManager()
set ocidURLsArray to (appFileManager's URLsForDirectory:(refMe's NSApplicationDirectory) inDomains:(refMe's NSUserDomainMask))
set ocidApplicationDirPathURL to ocidURLsArray's firstObject()
set ocidAppDirPathURL to ocidApplicationDirPathURL's URLByAppendingPathComponent:("Movies/VLC_intel")
set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
# 777-->511 755-->493 700-->448 766-->502
ocidAttrDict's setValue:(448) forKey:(refMe's NSFilePosixPermissions)
set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidAppDirPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error|:(reference)
if (item 1 of listBoolMakeDir) is false then
log "フォルダ作成でエラーしました"
return "フォルダ作成でエラーしました"
end if
#########################################
###ユーザーaacs Cachesフォルダを作る
set ocidURLsArray to (appFileManager's URLsForDirectory:(refMe's NSCachesDirectory) inDomains:(refMe's NSUserDomainMask))
set ocidCachesDirPathURL to ocidURLsArray's firstObject()
set ocidAacsCachesPathURL to ocidCachesDirPathURL's URLByAppendingPathComponent:"aacs"
set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
# 777-->511 755-->493 700-->448 766-->502
ocidAttrDict's setValue:(511) forKey:(refMe's NSFilePosixPermissions)
set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidAacsCachesPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error|:(reference)
if (item 1 of listBoolMakeDir) is false then
log "フォルダ作成でエラーしました"
return "フォルダ作成でエラーしました"
end if
#########################################
###ユーザーbluray Cachesフォルダを作る
set ocidBlurayCachesPathURL to ocidCachesDirPathURL's URLByAppendingPathComponent:"bluray"
set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
# 777-->511 755-->493 700-->448 766-->502
ocidAttrDict's setValue:(511) forKey:(refMe's NSFilePosixPermissions)
set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidBlurayCachesPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error|:(reference)
if (item 1 of listBoolMakeDir) is false then
log "フォルダ作成でエラーしました"
return "フォルダ作成でエラーしました"
end if
#########################################
###初期設定フォルダを作る
set ocidURLsArray to (appFileManager's URLsForDirectory:(refMe's NSLibraryDirectory) inDomains:(refMe's NSUserDomainMask))
set ocidLibraryDirPathURL to ocidURLsArray's firstObject()
set ocidPreferencesDirPathURL to ocidLibraryDirPathURL's URLByAppendingPathComponent:("Preferences/aacs")
set strPreferencesDirPath to ocidPreferencesDirPathURL's |path| as text
set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
# 777-->511 755-->493 700-->448 766-->502
ocidAttrDict's setValue:(448) forKey:(refMe's NSFilePosixPermissions)
set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidPreferencesDirPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error|:(reference)
if (item 1 of listBoolMakeDir) is false then
log "フォルダ作成でエラーしました"
return "フォルダ作成でエラーしました"
end if
#########################################
####ダウンロードフォルダ
set ocidTempDirURL to appFileManager's temporaryDirectory()
set ocidUUID to refMe's NSUUID's alloc()'s init()
set ocidUUIDString to ocidUUID's UUIDString
set ocidSaveDirPathURL to ocidTempDirURL's URLByAppendingPathComponent:(ocidUUIDString) isDirectory:true
set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
# 777-->511 755-->493 700-->448 766-->502
ocidAttrDict's setValue:(511) forKey:(refMe's NSFilePosixPermissions)
set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidSaveDirPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error|:(reference)
if (item 1 of listBoolMakeDir) is false then
log "フォルダ作成でエラーしました"
return "フォルダ作成でエラーしました"
end if
set strSaveDir to ocidSaveDirPathURL's |path| as text
#########################################
###vlcファイルのダウンロード
set objSysInfo to system info
set strCpuType to (CPU type of objSysInfo) as text
set strVlcSaveFilePath to (strSaveDir & "/vlc.dmg") as text
if strCpuType contains "Intel" then
  set strCommandText to "/usr/bin/curl -k \"" & strUrlVlcIntel & "\" -o \"" & strVlcSaveFilePath & "\" --connect-timeout 120" as text
else
  set strCommandText to "/usr/bin/curl -l \"" & strUrlVlcIntel & "\" -o \"" & strVlcSaveFilePath & "\" --connect-timeout 120" as text
end if
###コマンド実行
log "VLCダウンロード開始"
do shell script strCommandText
log "VLCダウンロード終了"

#########################################
###libaacs.dylibファイルのダウンロード
set strAacsSaveFilePath to (strSaveDir & "/libaacs.dylib.bin") as text
set strCommandText to "/usr/bin/curl -k \"" & strUrlLibaacs & "\" -o \"" & strAacsSaveFilePath & "\" --connect-timeout 120" as text
###コマンド実行
log "libaacs.dylibダウンロード開始"
do shell script strCommandText
log "libaacs.dylibダウンロード終了"

#########################################
###keydb_jpnファイルのダウンロード
set strKeySaveFilePath to (strSaveDir & "/keydb_jpn.zip") as text
set strCommandText to "/usr/bin/curl -k \"" & strUrlKeydb & "\" -o \"" & strKeySaveFilePath & "\" --connect-timeout 480" as text
###コマンド実行
log "keydb_jpn.zipダウンロード開始"
try
do shell script strCommandText
on error
  set strUrlKeydb to "https://force4u.cocolog-nifty.com/skywalker/files/keydb_jpn.zip"
  set strCommandText to "/usr/bin/curl -k \"" & strUrlKeydb & "\" -o \"" & strKeySaveFilePath & "\" --connect-timeout 480" as text
do shell script strCommandText
end try
log "keydb_jpn.zipダウンロード終了"


#########################################
###ユーザーアプリケーションフォルダにVLC.appがあればゴミ箱へ入れる
set ocidVclPathURL to ocidAppDirPathURL's URLByAppendingPathComponent:"VLC.app"
set strVclAppPath to ocidVclPathURL's |path| as text
##ゴミ箱に入れる
set boolGoToTrash to appFileManager's trashItemAtURL:(ocidVclPathURL) resultingItemURL:(ocidVclPathURL) |error|:(reference)
#########################################
###VLCをコピー
try
  set strCommandText to ("/usr/bin/hdiutil attach \"" & strVlcSaveFilePath & "\" -noverify -nobrowse -noautoopen\n") as text
do shell script strCommandText
on error
log "attachでエラーになりました"
return
end try
try
  set theComandText to ("/usr/bin/ditto \"/Volumes/VLC media player/VLC.app\" \"" & strVclAppPath & "\"") as text
do shell script theComandText
on error
log "dittoでエラーになりました"
return
end try
try
  set theComandText to ("/usr/bin/hdiutil detach \"Volumes/VLC media player\" -force") as text
do shell script theComandText
on error
log "detachでエラーになりました"
return
end try
#########################################
###libaacs.dylibを指定の場所にコピー
set ocidAacsSavePathURL to ocidVclPathURL's URLByAppendingPathComponent:"Contents/MacOS/lib/libaacs.dylib"
set strAacsSavePath to ocidAacsSavePathURL's |path| as text
try
  set theComandText to ("/usr/bin/ditto \"" & strAacsSaveFilePath & "\" \"" & strAacsSavePath & "\"") as text
do shell script theComandText
on error
log "libaacs.dylib dittoでエラーになりました"
return
end try
#########################################
### keydb.cfg まずは解凍してからコピー
try
  set theComandText to ("/usr/bin/unzip \"" & strKeySaveFilePath & "\" -d \"" & strSaveDir & "\"") as text
do shell script theComandText
on error
log "unzipでエラーになりました"
return
end try
set strUnzipPath to (strSaveDir & "/keydb.cfg") as text
try
  set theComandText to ("/usr/bin/ditto \"" & strUnzipPath & "\" \"" & strPreferencesDirPath & "/keydb.cfg\"") as text
  
do shell script theComandText
on error
log "keydb.cfg dittoでエラーになりました"
return
end try

#########################################
#アトリビュートをリセット
set theComandText to ("xattr -rc \"" & strVclAppPath & "\"") as text
do shell script theComandText
#########################################
#インストール先を表示
set ocidAppPathURL to ocidAppDirPathURL's URLByAppendingPathComponent:("VLC.app")
set ocidAppPath to ocidAppPathURL's |path|
set ocidContainerDirPath to ocidAppDirPathURL's |path|
set appSharedWorkspace to refMe's NSWorkspace's sharedWorkspace()
set boolDone to appSharedWorkspace's selectFile:(ocidAppPath) inFileViewerRootedAtPath:(ocidContainerDirPath)
set boolDone to appSharedWorkspace's openURL:(ocidAppPathURL)
if (boolDone as boolean) is false then
  #ファイルを開く
  set aliasSaveFilePath to (ocidAppDirPathURL's absoluteURL()) as alias
  tell application "Finder"
open file aliasSaveFilePath
  end tell
end if




|

mp4にチャプターを追加する

留意ください: 7zzを使っています7zzバージョン24.09以下には重大な脆弱性があります。必ず入れ替えて利用してください。



チャプター用に割り切った字幕を作って

[DaVinci Resolve]字幕を使ってチャプタを指定する

[TTML]TTMLからYoutube用のチャプターテキストを作成する(修正版)

基本:FFMETADATA1

TTMLからFFMETADATA1を生成する

mp4にチャプターを追加する




QuickTimeでのこの設定部分です
Screen_1_20240105163501

クイックルックでもチャプターは有効です
Screen_2_20240105163701



準備
1:解凍用7zzバイナリをインストール
2:ffmpegバイナリをインストール
3:DaVinci Resolveをインストール


作成
基本:FFMETADATA1
1:字幕を使ってチャプタを指定する
2:字幕データをTTMLで書き出す
3:TTMLから各種チャプター用データを作成する
3−1:Youtube用チャプター用データを作成する
3−2:FFMPEG用チャプター用データを作成する


準備
1:解凍用7zzバイナリをインストール
AppleScript
https://quicktimer.cocolog-nifty.com/icefloe/2024/01/post-01fee7.html
Bash
https://quicktimer.cocolog-nifty.com/icefloe/2023/11/post-c5ab17.html
2:ffmpegバイナリをインストール
AppleScript
https://quicktimer.cocolog-nifty.com/icefloe/2024/01/post-1ce12f.html
Bash
https://quicktimer.cocolog-nifty.com/icefloe/2023/12/post-c0e627.html
3:DaVinci Resolveをインストール
DaVinci Resolve公式サイトから
https://www.blackmagicdesign.com/support/family/davinci-resolve-and-fusion
Apple App Store
https://apps.apple.com/jp/app/davinci-resolve/id571213070?mt=12


作成
字幕トラックでチャプターの位置と内容を指定して
出来上がった字幕データをTTMLに書き出し
TTMLファイルをFFMETADATA1データに変換する方法で設定します

基本:FFMETADATA1
https://quicktimer.cocolog-nifty.com/icefloe/2023/10/post-3f2621.html
1:字幕を使ってチャプタを指定する
https://quicktimer.cocolog-nifty.com/icefloe/2024/01/post-b3c054.html
2:字幕データをTTMLで書き出す
[DaVinci Resolve]字幕データをTTMLで書き出す
https://quicktimer.cocolog-nifty.com/icefloe/2023/09/post-e6d806.html
3:チャプター用データを作成する
3−1:Youtube用チャプター用データを作成する
[TTML]TTMLからYoutube用のチャプターテキストを作成する(修正版)
https://quicktimer.cocolog-nifty.com/icefloe/2023/10/post-6042c5.html
3−2:FFMPEG用チャプター用データを作成する
TTMLからチャプター付与用のFFMETADATA1を作成する(Bash対応)
https://quicktimer.cocolog-nifty.com/icefloe/2023/09/post-e3a2ce.html

|

[DaVinci Resolve]字幕を使ってチャプタを指定する

チャプター用に割り切った字幕を作って [DaVinci Resolve]字幕を使ってチャプタを指定する [TTML]TTMLからYoutube用のチャプターテキストを作成する(修正版) 基本:FFMETADATA1 TTMLからFFMETADATA1を生成する
字幕トラックを作成して Ffmetadata11
すでに字幕がある場合は チャプター用として別に字幕トラックを作成します (複数字幕を同じトラックではなく別の字幕トラックにするのがポイント) Ffmetadata12
チャプターは タイミングだけ指定しても機能としては動作します Ffmetadata13
チャプタ設定用のには スタートフレームとエンドフレーム番号が必要ですので
[CHAPTER]
TIMEBASE=1/16 
START=0   
END=480   
title=1:最初の30秒

このように設定するのが『ベター』です Ffmetadata14
詳しくは パネルで設定となります タイミングと内容が必要なだけですので フォントや位置指定等は配慮不要です
Ffmetadata15
字幕のON OFF 字幕は常に1つ選択ですので 書き出し時には『どの』字幕を書き出すのか?を意識する必要があります 3_20240105162701
4_20240105162701
5_20240105162701

|

[QuickTime]イメージシーケンス(複数画像)からムービーを作成する

ファイルメニューから読み込みます Screen2_20240108164101
一般的なGIFアニメでは 1秒間に16フレーム か 8フレームが多いが QuickTimeでは最低でも24/秒フレームなので どうしても動作が『速く』なるので Gifターゲットにする場合はフレーム数の計算が容易な25か50が個人的にはおすすめ Screen_1_20240108164101

|

[DaVinci Resolve]CrystalDriver.kext

[Extensions]CrystalDriver.kext
https://quicktimer.cocolog-nifty.com/icefloe/2022/07/post-2ffce3.html
OS再インストール時にメッセージが出たのでメモ
20231203-231124

機能拡張がブロックされました
"Blackmagic Design Inc"によって署名された新しい機能拡張を読み込もうとしました。これらの機能拡張はデベロッパによるアップデートが必要です。

/Library/Extensions/CrystalDriver.kext
これの事
システムレポートで読み込み可能になっていればOK
Screen_4


サンプルコード

サンプルソース(参考)
行番号ソース
001#!/bin/bash
002#com.cocolog-nifty.quicktimer.icefloe
003#set -x
004#export PATH=/usr/bin:/bin:/usr/sbin:/sbin
005#################################################
006###管理者インストールしているか?チェック
007
008/usr/bin/sudo /usr/bin/kmutil load -p /Library/Extensions/CrystalDriver.kext
009
010exit 0
011
012zsh $ /usr/bin/sudo /usr/bin/kmutil load -p /Library/Extensions/CrystalDriver.kext
013zsh $
014zsh $
015zsh $
016zsh $ /usr/bin/sudo /usr/bin/kmutil load -p /Library/Extensions/CrystalDriver.kext
017Error Domain=KMErrorDomain Code=71 "Incompatible architecture: Binary is for x86_64, but needed arch arm64e
018Unsupported Error: one or more extensions are unsupported to load:    Kext com.blackmagic-design.driver.Crystal v1.1 in executable kext bundle com.blackmagic-design.driver.Crystal at /Library/Extensions/CrystalDriver.kext" UserInfo={NSLocalizedDescription=Incompatible architecture: Binary is for x86_64, but needed arch arm64e
019Unsupported Error: one or more extensions are unsupported to load:    Kext com.blackmagic-design.driver.Crystal v1.1 in executable kext bundle com.blackmagic-design.driver.Crystal at /Library/Extensions/CrystalDriver.kext}
020zsh $
AppleScriptで生成しました


【スクリプトエディタで開く】 |

名称未設定
ソース
001(*
002KMUTIL(8)        KernelManagement utility for kext collections       KMUTIL(8)
003
004SYNOPSIS
005       kmutil <subcommand>
006       kmutil <load|unload|showloaded>
007       kmutil <find|libraries|print-diagnostics>
008       kmutil <create|inspect|check|log|dumpstate>
009       kmutil <clear-staging|trigger-panic-medic>
010       kmutil -h
011
012DESCRIPTION
013       kmutil is a multipurpose tool for managing kernel extensions (kexts)
014       and kext collections on disk.  It takes a subcommand and a number of
015       options, some of which are common to multiple commands.
016
017       kmutil interacts with the KernelManagement subsystem for loading,
018       unloading, and diagnosing kexts.  It can also be used for inspecting
019       the contents of a kext collection, interacting with the kernel to query
020       load information, finding kexts and kext dependencies on disk, creating
021       new collections of kexts, and displaying other diagnostic information.
022
023COLLECTIONS
024       Starting in macOS 11, kernel extensions are found in 3 different
025       artifacts on disk.  Each artifact is loaded exactly once at boot, and a
026       kext must be linked into one of the three artifacts before it can be
027       used.
028
029       • The boot kext collection contains the kernel and all system kexts
030         necessary for starting and bootstrapping the operating system.  It is
031         an immutable artifact in /System/Library/KernelCollections.  On Apple
032         Silicon Macs, this artifact is kept exclusively in the Preboot
033         volume.
034
035       • The system kext collection, if used, contains all remaining system
036         kexts required by the operating system, and is loaded after boot.  It
037         is prelinked against the boot kext collection, and is also an
038         immutable artifact in /System/Library/KernelCollections.  Note that
039         on Apple Silicon Macs, there is no system kext collection.
040
041       • The auxiliary kext collection, if built, contains kexts placed in
042         /Library/Extensions and any other third-party kexts installed on the
043         system.  It is dynamically built by kernelmanagerd(8) and prelinked
044         against the boot kext collection and, if present, the system kext
045         collection.  On Apple Silicon Macs, the auxiliary kext collection is
046         located in the Preboot volume.  For more information on installing
047         third-party kexts into the auxiliary kext collection, see INSTALLING.
048
049INSTALLING
050       As of macOS 11, a kext is only loadable once it has been built into the
051       auxiliary kext collection by kernelmanagerd(8), and the system has
052       rebooted.  At boot, kernelmanagerd(8) will load this collection into
053       the kernel, which allows all of the kexts in the collection to match
054       and load.  If kmutil load, kextload(8), or any invocation of a
055       KextManager function attempts to load a kext that is not yet loadable,
056       kernelmanagerd(8) will stage the kext into a protected location,
057       validate it, and prompt the user to approve a rebuild of the auxiliary
058       kext collection.  If the validation and rebuild are successful, the
059       kext will be available on the next boot.
060
061COMMANDS
062       Commands and their specific options are listed below.  For other
063       options common to most commands, see OPTIONS.
064
065       • create: Create a new kext collection according to the options
066         provided.  This command should only be used by developers
067         investigating custom kernels or replacing the contents of the boot
068         kext collection or system kext collection.  As of macOS 13.0, a KDK
069         is required to create a new boot or system kext collection.  To load
070         or unload kexts already in a collection see the load and unload
071         subcommands.
072
073         -n, --new <boot|sys|aux>
074                Specify one or more of boot, sys, or aux to build one or more
075                collections at a time.
076
077         -L, --no-system-collection
078                If building an auxiliary collection, don’t look for or
079                generate a system kext collection.
080
081         -s, --strip
082                Specify none, all, or allkexts (default: none) to strip symbol
083                information after a kext has been built into a collection.
084
085         -k, --kernel
086                When building the boot kext collection, specify the path to
087                the kernel.  If -V is specified, kmutil will append the
088                variant extension.
089
090         -x, --explicit-only
091                Only consider the bundle identifiers and paths explicitly
092                specified, along with their dependencies.
093
094         --compress
095                Compress results using the LZFSE algorithm.
096
097         --img4-encode
098                Encode the collection in an img4 payload.
099
100       • inspect: Inspect & display the contents of a kext collection
101         according to the options provided.
102
103         --show-mach-header
104                Print the mach header(s) in the collection(s).  Use with
105                --verbose to also display contents of inner fileset entries.
106
107         --show-fileset-entries
108                Only print mach header information present in fileset
109                subentries.  This is useful for determining prelink addresses
110                and other load information about a kext in a collection.
111
112         --show-kext-load-addresses
113                When displaying the default output, include the load addresses
114                of the kexts inline.
115
116         --show-kext-uuids
117                Include the UUIDs of each kext in the output.
118
119         --show-kernel-uuid
120                Print the UUID (and version) of the kernel if present in the
121                collection.  This will output nothing if a kernel is not found
122                in the specified collection(s).
123
124         --show-kernel-uuid-only
125                Print the UUID of the kernel if present in the collection, and
126                suppress default kext information.
127
128         --show-prelink-info
129                Dump the raw __PRELINK_INFO segment of the collection(s).
130
131         --show-collection-metadata
132                Print the metadata of the collection(s), such as their prelink
133                uuids, the uuids of collections they link against, and the
134                build version that produced the collection.
135
136         --show-mach-boot-properties
137                Print derived Mach-O boot properties of the collection(s).
138
139         --json Output the section layout as JSON.
140
141       • load: Load the extension(s) specified with -b or -p.  If the
142         extension is not already in the auxiliary kext collection, the
143         collection will be dynamically rebuilt by kernelmanagerd(8) for use
144         on the next reboot.  For more information, see INSTALLING.  For kexts
145         already contained in the boot, system, or auxiliary kext collection,
146         the load subcommand will start the kext if it has not already been
147         started.
148
149         For most kexts, the load subcommand must run as the superuser (root).
150         Kexts installed under /System/ with an OSBundleAllowUserLoad property
151         set to true may be loaded via the load subcommand by non-root users.
152
153         macOS 10.6 introduced C functions for loading kexts,
154         KextManagerLoadKextWithIdentifier() and KextManagerLoadKextWithURL(),
155         which are described in Apple’s developer documentation.  These
156         functions continue to be supported as of macOS 11.
157
158         -P, --personality-name
159                If this kext is already loaded, send the named personality to
160                the catalog.
161
162         -e, --no-default-repositories
163                Don’t use the default repositories for kexts.  If you use this
164                option, you will have to explicitly specify all dependencies
165                of the kext being loaded, or otherwise worked on using the
166                --repository option.
167
168         --load-style
169                Control the load style of the request to load extension.
170                Valid options:
171
172                • start-and-match: Start the kernel extension and also begin
173                  matching on any accompanying personalities.  (default)
174
175                • start-only: Start any specified kernel extensions but do not
176                  begin matching against any personalities provided by those
177                  extensions (unless matching has already started for them).
178
179                • match-only: Do not explictly start any of the given kernel
180                  extensions but do begin matching on IOKit personalities
181                  provided by them.  This is useful to allow extensions that
182                  were previous loaded with start-only to now begin matching.
183
184       • unload: Unload the extension(s) specified with -b or -p.  The
185         extension must have been previously linked into a kext collection and
186         loaded by the KernelManagement system.  A successfull call to the
187         unload subcommand will invoke the kext’s stop function and end the
188         kext’s IOKit lifecycle, however the kext remains in kernel memory as
189         part of the kext collection from which it was loaded.  The extension
190         will not be removed from any collection, including the auxiliary kext
191         collection, and will still be available for loading without requiring
192         a reboot.
193
194         If another loaded kext has a dependency on the kext being unloaded,
195         the unload will fail.  You can determine whether a kext has
196         dependents using the showloaded subcommand.
197
198         -c, --class-name <class-name>
199                Terminate all instances of the IOService class, but do not
200                unload its kext or unload its personalities.
201
202         -P, --personalities-only
203                Terminate services and remove personalities only; do not
204                unload kexts.
205
206       • libraries: Search for library kexts in the boot kext collection and
207         the system kext collection (if available) that define symbols needed
208         for linking the specified kexts, printing their bundle identifiers
209         and versions.  Information on symbols not found are printed after the
210         library kext information for each architecture.
211
212         A handy use of the libraries subcommand is to run it with just the
213         --xml flag and pipe the output to pbcopy(1).  If the exit status is
214         zero (indicating no undefined or multiply-defined symbols), you can
215         open your kext’s Info.plist file in a text editor and paste the
216         library declarations over the OSBundleLibraries property.
217
218         You can specify other collections with the libraries subcommand to
219         look for dependencies in other collections as well.
220
221         --all-symbols
222                List all symbols; found, not found, or found more than once.
223
224         --onedef-symbols
225                List all symbols found, with the library kext they were found
226                in.
227
228         --multdef-symbols
229                List all symbols found more than once, with their library
230                kexts.
231
232         --undef-symbols
233                List all symbols not found in any library.
234
235         --unsupported
236                Look in unsupported kexts for symbols.
237
238         -c, --compatible-versions
239                Use library kext compatible versions rather than current
240                versions.
241
242         --xml  Print XML fragment suitable for pasting.
243
244       • showloaded: Display the status/information of loaded kernel
245         extensions on the system, according to the options provided.  By
246         default, the following is shown for each kext:
247
248         Index  The load index of the kext (used to track linkage references).
249                Gaps in the list indicate kexts that have been unloaded.
250
251         Refs   The number of references to this kext by others.  If nonzero,
252                the kext cannot be unloaded.
253
254         Address
255                The address in kernel space where the kext has been loaded.
256
257         Size   The number of bytes of kernel memory that the kext occupies.
258                If this is zero, the kext is a built-in part of the kernel
259                that has an entry as a kext for resolving dependencies among
260                kexts.
261
262         Wired  The number of wired bytes of kernel memory that the kext
263                occupies.
264
265         Architecture
266                The architecture of the kext, displayed only if using the
267                --arch-info option.
268
269         Name   The CFBundleIdentifier of the kext.
270
271         Version
272                The CFBundleVersion of the kext.
273
274         <Linked Against>
275                The index numbers of all other kexts that this kext has a
276                reference to.
277
278         The following options are available for the showloaded command:
279
280         --show-mach-headers
281                Show the mach headers of the loaded extensions and/or kernel,
282                if --show-kernel is specified.
283
284         --show <loaded|unloaded|all>
285                Restrict output to a specific load state.
286
287         --collection <boot|sys|aux|codeless>
288                Restrict the load information to a particular kind.  Defaults
289                to all non-codeless kexts if unspecified.  To display
290                information about codeless kexts and dexts that the kernel
291                knows about, use --collection codeless --show all.
292
293         --sort Sort the output by load address of each extension, instead of
294                by index.
295
296         --list-only
297                Print the list of extensions only, omitting the header on the
298                first line.
299
300         --arch-info
301                Include the architecture info in output.
302
303         --no-kernel-components
304                Do not show kernel components in output.
305
306         --show-kernel
307                Show load information about the kernel in the output.  Use
308                with --show-mach-headers to view the kernel mach header.
309
310       • dumpstate: Display diagnostic information about the state of
311         kernelmanagerd(8).
312
313       • find: Locate and print paths of kexts (or kexts in collections)
314         matching the filter criteria.  For more information on filtering, see
315         FILTERING OPTIONS.  Searches are performed using the same kext
316         management logic used elsewhere in kmutil, by which only kexts
317         specified with the repository or bundle options are eligible; this is
318         specifically not an exhaustive, recursive filesystem search.
319
320       • check: Check that load information and/or kext collections on the
321         system are consistent.
322
323         --collection-linkage
324                Check to see that the collections on the system are properly
325                linked together by inspecting the UUID metadata in the prelink
326                info section of each collection on the system.
327
328         --load-info
329                Check to see that the load information in the kernel properly
330                mirrors the collections on disk.  This is the default action
331                if no other options are specified.
332
333         --kernel-only
334                If checking load info, just check that the kernel matches, and
335                no other kexts.
336
337         --collection <boot|sys|aux>:
338                Restrict consistency check to one (or more) of the specified
339                collection types.  If unspecified, check all by default.
340
341       • log: Display logging information about the kext management subsystem.
342         This is a wrapper around the system log(1) command with a pre-defined
343         predicate to show only logs from kernelmanagerd and kmutil.
344
345       • print-diagnostics: Perform all possible tests on one or more kexts,
346         and indicate whether or not the kext can be successfully built into a
347         collection.  If there are issues found with the kext, diagnostic
348         information is reported which can help to isolate and resolve the
349         problem.  Note that some tests require root.  Note that custom
350         collections, variants, and architectures can be specified with the
351         GENERIC and COLLECTION kmutil options.
352
353         -p, --bundle-path
354                Print diagnostics for the bundle specified at this path (can
355                be specified more than once).
356
357         -Z --no-resolve-dependencies
358                Don’t resolve kext dependencies
359
360         -D --diagnose-dependencies
361                Recursively diagnose all kext dependencies of each kext
362                specified with -p.  Ignored when -Z is present.
363
364         --plugins
365                Diagnose each kext found in the PlugIns directory of kexts
366                specified with -p.
367
368         --do-staging
369                Perform kext staging to the SIP protected location.  This test
370                requires root privileges.
371
372       • clear-staging: Clear the staging directory managed by
373         kernelmanagerd(8) and kmutil(8).
374
375       • migrate: System subcommand used during a software update.
376
377       • install: System subcommand used to update the Boot and System kext
378         collections.
379
380       • rebuild: System subcommand used to attempt an Auxiliary kext
381         collection rebuild.  This command evaluates the current Auxiliary
382         kext collection for changes, which may add newly approved third-party
383         kexts and remove kexts that were previously installed and have since
384         been deleted or moved from their installed location.
385
386         To uninstall a kext from the Auxiliary kext collection:
387
388         1. Delete or move the kext bundle(s) to be uninstalled from their
389            installed location.
390
391         2. Run “kmutil rebuild” from Terminal and confirm the Auxiliary kext
392            collection changes.
393
394         3. Authorize the Auxiliary kext collection rebuild.
395
396         4. Reboot the system for the changes to take effect.
397
398RECOVERY COMMANDS
399       The following commands can only be run in Recovery Mode.
400
401       • trigger-panic-medic: Remove the auxiliary kext collection and remove
402         all kext approvals on the next boot.  This subcommand can only be
403         used in Recovery Mode.  This command can be used to recover the
404         system from a kext that causes a kernel panic.  After calling
405         trigger-panic-medic, all previously installed kexts will prompt the
406         user to re-approve them when they are loaded or installed.
407
408       • configure-boot: Configure a custom boot object policy.  This command
409         can be used to install a custom mach-o file from which the system
410         will boot.  In order to install custom boot objects, you must first
411         enter Medium Security by using the Startup Disk utility in Recovery
412         Mode.  Setting a custom boot object will further lower the system
413         security to Permissive Security, and you will be prompted to confirm
414         this action.
415
416         -c, --custom-boot-object
417                The Mach-O that the booter will load and start.  The file can
418                be optionally compressed and wrapped in an img4.
419
420         -C, --compress
421                Compress the custom boot object
422
423         -v, --volume
424                Install the custom boot object for the specified volume
425
426         --raw  Treat custom boot object as a raw file to be installed.  The
427                object will be installed with custom Mach-O boot properties
428                derived from –lowest-virtual-address and –entry-point
429
430         --lowest-virtual-address
431                Lowest virtual memory address of the raw boot object.  (iBoot
432                will map the raw boot object at this virtual address)
433
434         --entry-point
435                Virtual memory address of entry point into the raw boot object
436
437OPTIONS
438   GLOBAL OPTIONS
439       The following options are global to most kmutil subcommands.
440
441       -a, --arch
442              Specify the architecture to use for the extensions or
443              collections specified.  Defaults to the current running
444              architecture.
445
446       -V, --variant-suffix
447              Specify a variant, i.e., development, debug, or kasan, of
448              extensions or collections to prefer instead of the release
449              defaults.
450
451       -z, --no-authentication
452              Disable staging and validation of extensions when performing an
453              action.
454
455       -v, --verbose
456              Enable verbose output.
457
458       -r, --repository
459              Paths to directories containing extensions.  If -R is specified,
460              the volume root will be automatically prepended.
461
462       -R, --volume-root
463              Specify the target volume to operate on.  Defaults to /.
464
465   FILTERING OPTIONS
466       The following options can be used in certain kmutil commands for
467       filtering its input or output.
468
469       -p, --bundle-path
470              Include the bundle specified at this path in the results.
471              Return an error if not found.
472
473       -b, --bundle-identifier
474              Search for, and/or include this identifier in the results.
475              Return an error if not found.
476
477       --optional-identifier
478              Search for, and/or include this identifier in the results, if
479              possible.
480
481       --elide-identifier
482              Do not include this identifier in the results.
483
484       -f, --filter
485              Specify a filter, in predicate syntax, which must match against
486              properties of an extension to be included in the input or
487              output.  This argument can be overridden by other arguments for
488              specifying and including extensions.
489
490       -F, --filter-all
491              Specify a filter, in predicate syntax, which must match against
492              properties of an extension to be included in the input or
493              output.  This argument can not be overridden by other arguments
494              for specifying and including extensions.
495
496       –kdk   The KDK path to use for discovering kexts when creating a new
497              boot or sys kext collection.
498
499       –build Use with caution. This specifies the build version number to use
500              when discovering kexts and building kext collections.  If no
501              build version is specified, the current system build version
502              number is used.
503
504       For more information on predicate filter syntax, see the predicate
505       programming guide available in the Apple developer documentation.
506
507   COLLECTION OPTIONS
508       The following options can be used to specify paths and options for
509       handling kext collections.  If left unspecified, collection paths will
510       default to the default paths for the system kext collections.
511
512       -B, --boot-path
513              The path to the boot kext collection.
514
515       -S, --system-path
516              The path to the system kext collection.
517
518       -A, --aux-path
519              The path to the auxiliary kext collection.
520
521       -M, --allow-missing-collections
522              Recover gracefully, where applicable, if a collection is
523              missing.
524
525EXAMPLES
526       Inspect the contents of system kext collections:
527
528
529              $ kmutil inspect -v --show-mach-header -B /System/Library/KernelCollections/BootKernelExtensions.kc
530              $ kmutil inspect --show-fileset-entries --bundle-identifier com.apple.kernel
531
532
533       Load and unload kexts:
534
535
536              $ kmutil load -b com.apple.filesystems.apfs
537              $ kmutil load -p /Library/Extensions/foo.kext
538              $ kmutil unload -p /System/Library/Extensions/apfs.kext
539
540
541       Show load information about kexts:
542
543
544              $ kmutil showloaded --show-mach-headers --bundle-identifier com.example.foo
545              $ kmutil showloaded --show-kernel --collection boot
546              $ kmutil showloaded --show unloaded --filter "'CFBundleVersion' == '15.2.13'"
547
548
549       Find dependencies of kexts:
550
551
552              $ kmutil libraries -p /Library/Extensions/foo.kext --xml | pbcopy
553
554
555       Create custom kext collections:
556
557
558              $ kmutil -n boot -B myboot.kc -k mykernel --elide-identifier com.apple.filesystems.apfs
559
560              $ kmutil -n boot sys -B myboot.kc -S mysys.kc -V debug
561
562              $ kmutil -n boot -B myboot.kc -k mykernel
563              $ kmutil -n sys -B myboot.kc -S mysys.kc -F "'OSBundleRequired' == 'Safe Boot'" -s stripkexts
564
565              $ kmutil -n aux -r /Library/Extensions -L
566
567
568DIAGNOSTICS
569       kmutil exits with a zero status on success.  On error, kmutil prints an
570       error message and then exits with a non-zero status.
571
572       Well known exit codes:
573
574       • 3 : kmutil failed because the kext is missing when trying to unload
575         it.
576
577       • 27 : kmutil failed because user approval is required.
578
579       • 28 : kmutil failed because a reboot is required.
580
581COMPLETIONS
582       For frequent users, kmutil can generate a shell completion script by
583       invoking:
584
585
586              $ kmutil --generate-completion-script <shell>
587
588
589       This option supports zsh(1), bash(1), and fish.  If no shell is
590       specified, then a completion script will be generated for the current
591       running shell.
592
593   SEE ALSO
594       kernelmanagerd(8)
595
5962023-08-25                                                           KMUTIL(8)
597
598[プロセスが完了しました]
599
600*)
AppleScriptで生成しました

|

[DaVinci Resolve]字幕データをTTMLで書き出す

1_20240105162701

すでに字幕がある場合は
チャプター用として別に字幕トラックを作成します
(複数字幕を同じトラックではなく別の字幕トラックにするのがポイント)
2_20240105162701

字幕のON OFF 字幕は常に1つ選択
3_20240105162701


4_20240105162701


5_20240105162701

|

その他のカテゴリー

Accessibility Acrobat Acrobat 2020 Acrobat 2024 Acrobat AddOn Acrobat Annotation Acrobat AppleScript Acrobat ARMDC Acrobat AV2 Acrobat BookMark Acrobat Classic Acrobat DC Acrobat Dialog Acrobat Distiller Acrobat Form Acrobat GentechAI Acrobat JS Acrobat JS Word Search Acrobat Maintenance Acrobat Manifest Acrobat Menu Acrobat Merge Acrobat Open Acrobat PDFPage Acrobat Plugin Acrobat Preferences Acrobat Preflight Acrobat Print Acrobat Python Acrobat Reader Acrobat Reader Localized Acrobat Reference Acrobat Registered Products Acrobat SCA Acrobat SCA Updater Acrobat Sequ Acrobat Sign Acrobat Stamps Acrobat URL List Mac Acrobat URL List Windows Acrobat Watermark Acrobat Windows Acrobat Windows Reader Admin Admin Account Admin Apachectl Admin ConfigCode Admin configCode Admin Device Management Admin LaunchServices Admin Locationd Admin loginitem Admin Maintenance Admin Mobileconfig Admin NetWork Admin Permission Admin Pkg Admin Power Management Admin Printer Admin Printer Basic Admin Printer Custompapers Admin SetUp Admin SMB Admin softwareupdate Admin Support Admin System Information Admin TCC Admin Tools Admin Umask Admin Users Admin Volumes Admin XProtect Adobe Adobe AUSST Adobe Bridge Adobe Documents Adobe FDKO Adobe Fonts Adobe Reference Adobe RemoteUpdateManager Adobe Sap Code AppKit Apple AppleScript AppleScript Duplicate AppleScript entire contents AppleScript List AppleScript ObjC AppleScript Osax AppleScript PDF AppleScript Pictures AppleScript record AppleScript Video Applications AppStore Archive Archive Keka Attributes Automator BackUp Barcode Barcode Decode Barcode QR Bash Basic Basic Path Bluetooth BOX Browser Calendar CD/DVD Choose Chrome Chromedriver CIImage CityCode CloudStorage Color Color NSColor Color NSColorList com.apple.LaunchServices.OpenWith Console Contacts CotEditor CURL current application Date&Time delimiters Desktop Desktop Position Device Diff Disk do shell script Dock Dock Launchpad DropBox Droplet eMail Encode % Encode Decode Encode HTML Entity Encode UTF8 Error EXIFData exiftool ffmpeg File File Name Finder Finder Window Firefox Folder FolderAction Font List FontCollections Fonts Fonts Asset_Font Fonts ATS Fonts Emoji Fonts Maintenance Fonts Morisawa Fonts Python Fonts Variable Foxit GIF github Guide HTML Icon Icon Assets.car Illustrator Image Events ImageOptim Input Dictionary iPhone iWork Javascript Jedit Ω Json Label Language Link locationd lsappinfo m3u8 Mail Map Math Media Media AVAsset Media AVconvert Media AVFoundation Media AVURLAsset Media Movie Media Music Memo Messages Microsoft Microsoft Edge Microsoft Excel Microsoft Fonts Microsoft Office Microsoft Office Link Microsoft OneDrive Microsoft Teams Mouse Music Node Notes NSArray NSArray Sort NSAttributedString NSBezierPath NSBitmapImageRep NSBundle NSCFBoolean NSCharacterSet NSData NSDecimalNumber NSDictionary NSError NSEvent NSFileAttributes NSFileManager NSFileManager enumeratorAtURL NSFont NSFontManager NSGraphicsContext NSGraphicsContext Crop NSImage NSIndex NSKeyedArchiver NSKeyedUnarchiver NSLocale NSMetadataItem NSMutableArray NSMutableDictionary NSMutableString NSNotFound NSNumber NSOpenPanel NSPasteboard NSpoint NSPredicate NSRange NSRect NSRegularExpression NSRunningApplication NSScreen NSSet NSSize NSString NSString stringByApplyingTransform NSStringCompareOptions NSTask NSTimeZone NSUbiquitous NSURL NSURL File NSURLBookmark NSURLComponents NSURLResourceKey NSURLSession NSUserDefaults NSUUID NSView NSWorkspace Numbers OAuth PDF PDF Image2PDF PDF MakePDF PDF nUP PDF Pymupdf PDF Pypdf PDFContext PDFDisplayBox PDFImageRep PDFKit PDFKit Annotation PDFKit AnnotationWidget PDFKit DocumentPermissions PDFKit OCR PDFKit Outline PDFKit Start PDFPage PDFPage Rotation PDFView perl Photoshop PlistBuddy pluginkit plutil postalcode PostScript PowerShell prefPane Preview Python Python eyed3 Python pip QuickLook QuickTime ReadMe Regular Expression Reminders ReName Repeat RTF Safari SaveFile ScreenCapture ScreenSaver Script Editor Script Menu SF Symbols character id SF Symbols Entity Shortcuts Shortcuts Events sips Skype Slack Sound Spotlight sqlite StandardAdditions StationSearch Subtitles LRC Subtitles SRT Subtitles VTT Swift swiftDialog System Events System Settings TemporaryItems Terminal Text Text CSV Text MD Text TSV TextEdit Tools Translate Trash Twitter Typography UI Unit Conversion UTType valueForKeyPath Video VisionKit Visual Studio Code VMware Fusion Wacom Weather webarchive webp Wifi Windows XML XML EPUB XML HTML XML LSSharedFileList XML LSSharedFileList sfl2 XML LSSharedFileList sfl3 XML objectsForXQuery XML OPML XML Plist XML Plist System Events XML RSS XML savedSearch XML SVG XML TTML XML webloc XML xmllint XML XMP YouTube Zero Padding zoom