Post

Replies

Boosts

Views

Activity

Reply to AVFoundation: Compression property Quality is not supported for video codec type avc1
I have a hypothesis. Would love it if someone could confirm or add information. Compression quality actually not supported by avc1/hvc1 (h264/h265) codecs. In some systems, like mine, AV Foundation translates compression quality to bitrate. In other systems, like my user's, AV Foundation crashes. Testing the hypothesis Write a video with H264 at 40% compression quality Write the same video with H264 at 100% compression quality Compare the bitrates with ffprobe The first video is encoded with a bitrate of 1000 kb/s The second video is encoded with a bitrate of 25841 kb/s These results support the hypothesis. The next question is if bitrate is the only thing adjusted when passing a compression quality value. I haven't tested if it changes any of the other compression settings. Another datapoint is that the docs explicitly say about the compression quality key, "A key to set the JPEG compression quality of the video." which does sound like it's only applicable if the JPEG codec is chosen. Hat tip to this SO answer
Topic: Media Technologies SubTopic: Audio Tags:
Aug ’23
Reply to AttributeGraph: cycle detected
I was able to get rid of the cycle message by adding an .id(myIdentifier) to the root container of the view. I'm not sure why, because myIdentifier is a let value on the view, so I would assume it would already be a part of the view's identity
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’23
Reply to Xcode error: Abort Trap 6
I'm able to reliably reproduce this with the code below. If I comment it out, the Abort trap disappears. extension DocumentGroup {   func useDefaultSizeIfAvailable() -> some Scene {     if #available(macOS 13.0, *) {       return self.defaultSize(.init(width: 750, height: 750))     } else {       return self.windowStyle(.automatic)     }   } }
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’23
Reply to ProRes encoding on M1 Max fails for high bit depth buffers
Same issue here, but with HEVC With Alpha. Apple's own sample code* crashes with a nil pixel buffer pool after a few frames. I'm getting an increasing amount of bug reports from paying users as they upgrade to M1 pro and max. A workaround I'm testing right now is 1. Not setting the alpha quality, and 2. kVTCompressionPropertyKey_AllowTemporalCompression : false. Maybe that could help someone. I have filed FB9972239, which currently has "similar reports: none", although FB9757381 seems very similar. https://developer.apple.com/documentation/avfoundation/media_playback_and_selection/using_hevc_video_with_alpha -> HEVC-Videos-With-Alpha-AssetWriting
Topic: App & System Services SubTopic: Core OS Tags:
Apr ’22
Reply to SwiftUI Picker with option for no selection?
Make your State variable optional @State private var selectedCategoryIndex = Int? 2. Provide an option for "No selection" and tag it with nil as an optional Int to match it. Place it before or after your ForEach Text("Nothing").tag(nil as Int?) // ForEach here 3. Cast your actual values as Optionals the same way // ForEach here Text(categories[$0].name!).tag($0 as Int?) I'd also consider using the actual object array in your Picker rather than the indices.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’21