avfoundation

iOS 10 breaks custom CIFilter

↘锁芯ラ 提交于 2021-02-07 08:28:36
问题 I have written a chromakey filter for making the backgrounds of MPEG movies transparent so that you can use a movie file for longer animations without the need for lengthy sequences of PNGs (as is commonly done for some types of iOS animations). I am using AVPlayer , AVVideoComposition , and a custom CIFilter to render the video over a background image. The background image can be changed dynamically by the user interacting with the app. This used to work just fine until iOS 10 came out and

iOS 10 breaks custom CIFilter

拟墨画扇 提交于 2021-02-07 08:28:34
问题 I have written a chromakey filter for making the backgrounds of MPEG movies transparent so that you can use a movie file for longer animations without the need for lengthy sequences of PNGs (as is commonly done for some types of iOS animations). I am using AVPlayer , AVVideoComposition , and a custom CIFilter to render the video over a background image. The background image can be changed dynamically by the user interacting with the app. This used to work just fine until iOS 10 came out and

macOS/swift Capture Audio with AVCaptureSession

江枫思渺然 提交于 2021-02-07 07:05:22
问题 I am currently trying to implement a simple audio recording tool on my Mac. Since I need the raw audio buffers in-memory, I cannot use AVAudioRecorder, which would just write the recording to a file. My approach is to create a AVCaptureSession, Input(Microphone) and Output(AVCaptureAudioDataOutput) and start the session. Everything works fine, however the delegate callback of the output is never called . I made sure to add mic/camera permissions (just in case) in the project settings. Maybe

AVAssetExportSession stuck (not starting) export

这一生的挚爱 提交于 2021-02-06 05:22:30
问题 I have attempted to export videos from Photo Library, but the export callback is never executed. I periodically check the progress of the export, and the progress is always zero. The code below works in 99.9% cases, but sometimes on some devices (absolutely randomly) it stops working and only restart of the iPhone helps. AVAssetExportSession.Status always in waiting state class FilesInteractor { static func tempDirectoryPath() -> String { let documentsPath =

AVAssetExportSession stuck (not starting) export

亡梦爱人 提交于 2021-02-06 05:14:35
问题 I have attempted to export videos from Photo Library, but the export callback is never executed. I periodically check the progress of the export, and the progress is always zero. The code below works in 99.9% cases, but sometimes on some devices (absolutely randomly) it stops working and only restart of the iPhone helps. AVAssetExportSession.Status always in waiting state class FilesInteractor { static func tempDirectoryPath() -> String { let documentsPath =

AVAssetExportSession stuck (not starting) export

老子叫甜甜 提交于 2021-02-06 05:10:20
问题 I have attempted to export videos from Photo Library, but the export callback is never executed. I periodically check the progress of the export, and the progress is always zero. The code below works in 99.9% cases, but sometimes on some devices (absolutely randomly) it stops working and only restart of the iPhone helps. AVAssetExportSession.Status always in waiting state class FilesInteractor { static func tempDirectoryPath() -> String { let documentsPath =

AVAssetExportSession stuck (not starting) export

泪湿孤枕 提交于 2021-02-06 05:08:34
问题 I have attempted to export videos from Photo Library, but the export callback is never executed. I periodically check the progress of the export, and the progress is always zero. The code below works in 99.9% cases, but sometimes on some devices (absolutely randomly) it stops working and only restart of the iPhone helps. AVAssetExportSession.Status always in waiting state class FilesInteractor { static func tempDirectoryPath() -> String { let documentsPath =

AVAssetExportSession not working on devices, but working on simulator (AVFoundationErrorDomain Code = -11800, Unknown Error code -12780)

一曲冷凌霜 提交于 2021-02-05 09:23:58
问题 EDIT: To make things easier to anyone interested in checking out this problem, I added a demo project to this github repository. Issue I've seen several questions that had the same error, but none of the solutions found there helped me. Figured I'd try my luck. I'm trying to export a video as is, mainly to learn about AVFoundation and AVAssetExportSession. My export works perfectly fine on the simulator, but does not work on any iOS device I've tried (namely an iPhone X and an iPhone XR

AVPlayer not rendering to its AVPlayerLayer

放肆的年华 提交于 2021-02-04 19:54:05
问题 I have a AVPlayerLayer (subclass of CALayer) and I need to get in into a image type that can be passed to a QCRenderer (QCRenderer accepts NSImages and CIImages.) I can convert the CALayer to a CGImageRef, and that to an NSImage, but the contents is always clear. I've narrowed it down to one of two reasons: I am not creating the NSImage correctly. The AVPlayer is not rendering to the AVPlayerLayer. I am not receiving any errors, and have found some documentation on converting CALayers. Also,

How to access builtin webcam from a docker container using ffmpeg?

守給你的承諾、 提交于 2021-01-29 09:30:47
问题 I have wrote my code that captures videos by my builtin webcam of my MAC using ffmpeg . On local machine, the code works fine. However, I built a docker container of my code, and tried to run it, but I got the following error: error: Command failed: ffmpeg -f avfoundation -framerate 30 -i "0" -target pal-vcd -vf scale=640x480 -flags +global_header -f segment -segment_time 10 -segment_list ../out.csv -segment_format_options movflags=+faststart -reset_timestamps 1 -strftime 1 %Y%m%d-%H%M%S.mp4