Closed smhk closed 5 years ago
This code run successfully on my mac, please show me your crash info.
let fmtCtx = try AVFormatContext(url: "/Users/sun/AV/kda.flv")
try fmtCtx.set(1000, forKey: "analyzeduration")
print(try fmtCtx.integer(forKey: "analyzeduration"))
1000
Program ended with exit code: 0
I want to do it this way by options:
let option:[String:String] = ["probesize":"4096"]
guard let _ = try? fmtCtx.findStreamInfo(options: [option]) else{return}
but print this log:Option 'probesize' not found.
I'm wondering if there's a way to read, and set
analyzeduration
and similar options,opt.h ...
analyzeduration is an integer (microseconds) https://ffmpeg.org/ffmpeg-formats.html
I had a guess at reading it,
let AD = try fmtCtx.integer(forKey: "analyzeduration")
crashes,I had a guess at this sort of thing,
try fmtCtx.set(1000, forKey: "analyzeduration")
crashes ..Is it possible?