MediaInfoKit.frameworkを呼び出して、QuickTimeムービーから詳細な情報を取得するAppleScriptです。
MediaInfoKit.framework(To ~/Library/Frameworks/)
AppleScript名:MediaInfoKitでQuickTimeムービーから詳細な情報を取得する |
— Created 2017-01-24 by Takaaki Naganoya — 2017 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" use framework "MediaInfoKit" –https://github.com/jeremyvizzini/MediaInfoKit set aMovie to POSIX path of (choose file) –(choose file of type {"com.apple.quicktime-movie"}) set aURL to current application’s |NSURL|’s fileURLWithPath:aMovie set aInfo to current application’s MIKMediaInfo’s alloc()’s initWithFileURL:aURL set a1info to aInfo’s valuesOfStream:"General" –Get Each Information set a2info to aInfo’s valueForKey:"Complete name" ofStream:"General" –> (NSString) "/Users/me/Desktop/IMG_0217.MOV" set a4Info to aInfo’s jsonText() –json形式で取得 –set a5Info to aInfo’s plistText()–plist形式で取得 –set a6Info to aInfo’s csvText()–csv形式で取得 –set a3Info to aInfo’s attributedText()–スタイルつきテキストで取得 —JSON to NSDictionary to record set jsonData to a4Info’s dataUsingEncoding:(current application’s NSUTF8StringEncoding) set aJsonDict to current application’s NSJSONSerialization’s JSONObjectWithData:jsonData options:0 |error|:(missing value) set aRec to aJsonDict as record –Movie file –> {General:{Encoded date:"UTC 2017-01-24 04:03:48", Format profile:"QuickTime", Overall bit rate mode:"Variable", Tagged date:"UTC 2017-01-24 04:04:40", Codec ID:"qt 0000.00 (qt )", com.apple.quicktime.software:"10.2", Format:"MPEG-4", Complete name:"/Users/me/Desktop/IMG_0219.MOV", Duration:"52 s 53 ms", File size:"50.8 MiB", Writing library:"Apple QuickTime", Overall bit rate:"8 191 kb/s", com.apple.quicktime.make:"Apple", com.apple.quicktime.model:"iPhone 7", com.apple.quicktime.creationdate:"2017-01-24T13:03:47+0900", com.apple.quicktime.location.ISO6709:"+35.xxxx+139.xxxx+043.xxx/"}, Video:{Minimum frame rate:"28.571 FPS", Display aspect ratio:"16:9", Bit depth:"8 bits", Scan type:"Progressive", Title:"Core Media Video", Chroma subsampling:"4:2:0", Color range:"Limited", Format/Info:"Advanced Video Codec", Frame rate:"29.970 (29970/1000) FPS", Bits/(Pixel*Frame):"0.292", Frame rate mode:"Variable", Format:"AVC", Matrix coefficients:"BT.709", Encoded date:"UTC 2017-01-24 04:03:48", Rotation:"90°", Height:"720 pixels", Color space:"YUV", Transfer characteristics:"BT.709", Duration:"52 s 53 ms", Bit rate:"8 079 kb/s", Codec ID:"avc1", ID:"1", Width:"1 280 pixels", Tagged date:"UTC 2017-01-24 04:04:40", Format profile:"High@L3.1", Color primaries:"BT.709", Maximum frame rate:"30.000 FPS", Stream size:"50.1 MiB (99%)", Codec ID/Info:"Advanced Video Coding", Format settings:"CABAC,Yes"}, Audio:{Other:"1", Title:"Core Media Audio", Channel(s):"1 channel", Format/Info:"Advanced Audio Codec", Frame rate:"43.066 FPS (1024 spf)", Sampling rate:"44.1 kHz", Source duration:"52 s 106 ms", Format:"AAC", Compression mode:"Lossy", Encoded date:"UTC 2017-01-24 04:03:48", Channel positions:"Front: C", Type:"meta", Duration:"52 s 53 ms", Bit rate mode:"Variable", Source stream size:"568 KiB (1%)", Bit rate:"89.3 kb/s", Codec ID:"40", ID:"2", Tagged date:"UTC 2017-01-24 04:04:40", Format profile:"LC", Stream size:"568 KiB (1%)"}} –Image file –> {General:{Format/Info:"Portable Network Graphic", Complete name:"/Users/me/Desktop/スクリーンショット 2.png", File size:"33.3 KiB", Format:"PNG"}, Image:{Height:"319 pixels", Format:"PNG", Bit depth:"32 bits", Format/Info:"Portable Network Graphic", Width:"352 pixels", Compression mode:"Lossless", Stream size:"33.3 KiB (100%)"}} |
More from my site
(Visited 166 times, 1 visits today)