In Swift 4, I try to launch a command line to know the frame rate of a video. I use mediainfo tool.
The command to execute is (tested in Terminal)
"/Users/Lorenzo/mediainfo --Inform="Video;%FrameRate%" /Users/Lorenzo/Desktop/1.mov"
And my swift code for that purpose is:
let taskfindfps = Process()
taskfindfps.launchPath = "/Users/Lorenzo/mediainfo"
taskfindfps.arguments = ["--Inform=\"Video;%FrameRate%\"", myVideo]
let pipefindfps = Pipe()
taskfindfps.standardOutput = pipefindfps
But the first argument isn't valid, and I don't know why... The result I have is like the result of the command without the optional argument:
"/Users/Lorenzo/mediainfo /Users/Lorenzo/Desktop/1.mov"
Is there something wrong in "--Inform=\"Video;%FrameRate%\"" ?