2012-04-04 11 views
0

Wie können wir die aufgezeichnete Datei als mp4 Audioformat in Ziel speichern c. Kann ich in den Aufnahmeeinstellungen ändern, wie mp4 speichern file.I Aufnahmeeinstellungen wie follow.Would codiert haben u mir bitte helfen zu anpassen Aufnahmeeinstellungen für als mp4 Format aufgenommene Audiodatei zu speichern.Gespeicherte Datei als mp4 Audio speichern

recordSettings= [[NSDictionary alloc] initWithObjectsAndKeys: 
         [NSNumber numberWithFloat: 32000], AVSampleRateKey, 
         [NSNumber numberWithInt: kAudioFormatMPEG4AAC], AVFormatIDKey, 
         [NSNumber numberWithInt: 1], AVNumberOfChannelsKey, 
         nil]; 

Antwort

0

Try this,

-(NSURL *) tempFileURL 
{ 

    NSString *outputPath = [[NSString alloc] initWithFormat:@"%@%@", NSTemporaryDirectory(), @"output.mp4"]; 
    NSLog(@"Saved %@",outputPath); 
    NSURL *outputURL = [[NSURL alloc] initFileURLWithPath:outputPath]; 
    NSFileManager *fileManager = [NSFileManager defaultManager]; 
    if ([fileManager fileExistsAtPath:outputPath]) { 
     [fileManager removeItemAtPath:outputPath error:NULL]; 
    } 
    [outputPath release]; 
    return [outputURL autorelease]; 
} 
Verwandte Themen