Questions tagged [avassetwriter]

on OS X API, you use an AVAssetWriter object to write media data to a new file of a specified audiovisual container type, such as a QuickTime movie file or an MPEG-4 file, with support for automatic interleaving of media data for multiple concurrent tracks

529 questions
14
votes
4 answers

create video from array of UIImages and save the video to iPhone library. AVAssetLibrary +AVFoundation

Problem in saving video to iPhone Library. i have an array of UIImages,and two buttons ,"convertToVideo"&"saveToiPhoneLib" -(IBAction) convertToVideo { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask,…
aToz
  • 2,463
  • 1
  • 24
  • 34
14
votes
3 answers

How to check Resolution, bitrate of video in iOS

I'm developing a video compression functionally; my ideas are below: Getting resolution and bit-rate of video. Check resolution of video. If it larger 640x480, I will compress this video in half and adjust the bit rate in 1/4 . E.g., if resolution…
user3214941
  • 387
  • 1
  • 9
  • 17
13
votes
2 answers

How do I control AVAssetWriter to write at the correct FPS

Let me see if I understood it correctly. At the present most advanced hardware, iOS allows me to record at the following fps: 30, 60, 120 and 240. But these fps behave differently. If I shoot at 30 or 60 fps, I expect the videos files created from…
Duck
  • 34,902
  • 47
  • 248
  • 470
13
votes
2 answers

How can I track the progress of AVAssetWriter’s writing?

How can I calculate the progress of an AVAssetWriter process? So if I have something like: [assetWriterInput requestMediaDataWhenReadyOnQueue:queue usingBlock:^{ while (1){ if ([assetWriterInput isReadyForMoreMediaData]) { …
Eric Christensen
  • 819
  • 3
  • 9
  • 21
13
votes
2 answers

Unknown underlying OSStatus error -16364 when using AVAssetWriter

I'm building a video export feature for one of my apps. In essence, the video is a series of one of six different images lasting for different (short) durations. The export works fine when I export something containing 283 images of varying…
Linuxios
  • 34,849
  • 13
  • 91
  • 116
13
votes
0 answers

Pausing AVAssetWriter when using appendSampleBuffer for audio and video results in desynchronization. Is there a way to pause recording?

I have two methods (one for audio, and one for video) that append their respective samples to an AVAssetWriter via respective AVAssetWriterInput's. Everything works well for the simple start-and-stop case. Some background here is that the audio…
Bernie Habermeier
  • 2,580
  • 2
  • 22
  • 20
12
votes
1 answer

How do I use AVAssetWriter to write AAC audio out in ios?

I am using an AVCaptureSession to capture audio and video samples from the devices microphone and camera. I am then attempting to write the CMSampleBuffers (Using AVAssetWriter and AVAssetWriterInputs) returned via the AVCaptureSessions delegate…
RyanSullivan
  • 635
  • 1
  • 5
  • 19
12
votes
2 answers

AVAssetWriter Woes

I'm trying to use AVAssetWriter to write CGImages to a file to create a video from images. I've gotten this to work successfully in three different ways on the simulator, but every method fails on an iPhone 4 running iOS 4.3. This all has to do with…
listing boat
  • 251
  • 1
  • 4
  • 14
12
votes
1 answer

AVAssetExportSession ignoring videoComposition rotation & stripping metadata

I am attempting to rotate video prior to upload on my iOS device because other platforms (such as android) do not properly interpret the rotation information in iOS-recorded videos and, as a result, play them improperly rotated. I have looked at…
esilver
  • 27,713
  • 23
  • 122
  • 168
11
votes
3 answers

How to use AVAssetReader and AVAssetWriter for multiple tracks (audio and video) simultaneously?

I know how to use AVAssetReader and AVAssetWriter, and have successfully used them to grab a video track from one movie and transcode it into another. However, I'd like to do this with audio as well. Do I have to create and AVAssetExportSession…
akaru
  • 6,299
  • 9
  • 63
  • 102
11
votes
3 answers

AVAssetWriter finishWritingWithCompletionHandler error with unknown error

I have been struggling with this problem for over a week. I hope someone sees what I'm doing wrong. I am attempting to use the finishWritingWithCompletionHandler: method since the finishWriting method is now deprecated. I have not had any success…
Rob
  • 4,149
  • 5
  • 34
  • 48
10
votes
7 answers

OpenGL ES 2.0 to Video on iPad/iPhone

I am at my wits end here despite the good information here on StackOverflow... I am trying to write an OpenGL renderbuffer to a video on the iPad 2 (using iOS 4.3). This is more exactly what I am attempting: A) set up an…
Angus Forbes
  • 982
  • 1
  • 9
  • 21
10
votes
4 answers

AVAssetWriterInput and readyForMoreMediaData

Is AVAssetWriterInput's readyForMoreMediaData updated in a background thread? If readyForMoreMediaData is NO, can I block in the main thread and wait until the value changes to YES? I'm using an AVAssetWriterInput by pushing data to it (i.e. without…
Mike
  • 1,169
  • 9
  • 26
10
votes
0 answers

Add Text to individual segments of video using SCRecorder in iOS

Im using this wildly popular library for recording segments of video like Vine: https://github.com/rFlex/SCRecorder It works great and in the demo it adds a watermark to all videos created, but the problem is it adds the mark to all segments of the…
ChuckKelly
  • 1,742
  • 5
  • 25
  • 54
10
votes
1 answer

AVVideoProfileLevelH264High41 breaking on iPhone 4

I am using AVAssetWriter to compress a video, the code works in both iPhone 5 and 4 in iOS7. I am attempting to use the AVVideoProfileLevelKey of AVVideoProfileLevelH264High41 to attain better compression than that of Baseline or Main profiles. …
1
2
3
35 36