Questions tagged [avassetreader]

You use an AVAssetReader object to obtain media data of an asset, whether the asset is file-based or represents an assemblage of media data from multiple sources (as with an AVComposition object).

AVAssetReader lets you:

Read raw un-decoded media samples directly from storage, obtain samples decoded into renderable forms. Mix multiple audio tracks of the asset and compose multiple video tracks (by using AVAssetReaderAudioMixOutput and AVAssetReaderVideoCompositionOutput). AVAssetReader’s pipelines are multithreaded internally. After you initiate reading with initWithAsset:error:, a reader loads and processes a reasonable amount of sample data ahead of use so that retrieval operations such as copyNextSampleBuffer (AVAssetReaderOutput) can have very low latency. Note, however, that AVAssetReader is not intended for use with real-time sources, and its performance is not guaranteed for real-time operations.

Click Here for Apple documentation.

98 questions
0
votes
1 answer

Implementing fast-forward with AVAssetReaderOutput

I’m trying to add a fast-forward functionality in my app, which heavily uses GPUImage, but am running into some memory issues. At the top of -[GPUImageMovie readNextVideoFrameFromOutput:], I replace this: CMSampleBufferRef sampleBufferRef =…
0
votes
1 answer

CMSampleBufferRef and AVAssetReaderMixAudioOutput and PCM problems

So I am using a AVAssetReaderMixAudioOutput to extract audio samples from a quicktime file. In this case it is a ProRes video with multiple tracks of audio. (4 track, 16bit, interleaved samples littleEndian @ 48000) I can get the video frames…
James
  • 67
  • 7
0
votes
1 answer

Reading from two files one after other using avassetreader

What I need is to merge two movie files. What I need is to read from the files and write the sample to a different file. How can I read form one file and after its over continue reading the 2nd file. So that I continuously receive sample buffers…
borncrazy
  • 1,589
  • 1
  • 12
  • 9
0
votes
1 answer

AVAssetReader audio capture, samples missing

I've a weird question. I'm capturing some audio samples of a .mov/.wav/.aiff files to playback them. I'm using the following codes that captures unchanged PCM samples if available , otherwise convert them to 32 bit float. NSError *error =…
Leonardo Bernardini
  • 1,076
  • 13
  • 23
0
votes
1 answer

Using AudioUnits to play and eq songs from music library

I'm building an app that involves playing songs from the user's music library while applying an equalization (EQ) effect. I've only used AudioUnits to generate sound before, so I'm having a bit of trouble. My current plan is to use AVAssetReader to…
Rogare
  • 3,234
  • 3
  • 27
  • 50
0
votes
1 answer

AVAssetWriter can merge two video files

Do not tell me to use AVAssetExportSession, thank you. I tried this, but failed. for (int i =0; i < count; i++) { assetWriterInput = nil; assetWriterInput = [AVAssetWriterInput assetWriterInputWithMediaType:AVMediaTypeVideo…
bing
  • 1
  • 1
0
votes
1 answer

AVAssetReader Crash: tracks must all have media type AVMediaTypeAudio'

I am reading a AVURLAsset and init the reader with the following call AVAssetReaderOutput *assetReaderOutput = [AVAssetReaderAudioMixOutput assetReaderAudioMixOutputWithAudioTracks:songAsset.tracks audioSettings: nil]; The songAsset (AVURLAsset)…
some_id
  • 29,466
  • 62
  • 182
  • 304
0
votes
1 answer

exporting a video file in reverse order on iphone

I have been trying to export a video file in reverse order(play from end to start). any idea how it can be done efficiently? the best i could find is to create JPEGs files of the video frames (AVASSETREADER) and than to rewrite it in reverse order…
amit
  • 2,171
  • 4
  • 31
  • 50
1 2 3 4 5 6
7