{"id":13528072,"url":"https://github.com/rs/SDAVAssetExportSession","last_synced_at":"2025-04-01T11:30:54.607Z","repository":{"id":8010875,"uuid":"9419079","full_name":"rs/SDAVAssetExportSession","owner":"rs","description":"AVAssetExportSession drop-in replacement with customizable audio\u0026video settings","archived":false,"fork":false,"pushed_at":"2020-09-04T12:38:33.000Z","size":65,"stargazers_count":814,"open_issues_count":47,"forks_count":211,"subscribers_count":40,"default_branch":"master","last_synced_at":"2025-03-27T22:12:05.901Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-13T19:41:37.000Z","updated_at":"2025-03-21T09:04:22.000Z","dependencies_parsed_at":"2022-08-06T20:15:26.304Z","dependency_job_id":null,"html_url":"https://github.com/rs/SDAVAssetExportSession","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rs%2FSDAVAssetExportSession","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rs%2FSDAVAssetExportSession/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rs%2FSDAVAssetExportSession/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rs%2FSDAVAssetExportSession/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rs","download_url":"https://codeload.github.com/rs/SDAVAssetExportSession/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246631651,"owners_count":20808726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T06:02:11.878Z","updated_at":"2025-04-01T11:30:54.274Z","avatar_url":"https://github.com/rs.png","language":"Objective-C","readme":"SDAVAssetExportSession\n======================\n\n`AVAssetExportSession` drop-in replacement with customizable audio\u0026amp;video settings.\n\nYou want the ease of use of `AVAssetExportSession` but default provided presets doesn't fit your needs? You then began to read documentation for `AVAssetWriter`, `AVAssetWriterInput`, `AVAssetReader`, `AVAssetReaderVideoCompositionOutput`, `AVAssetReaderAudioMixOutput`… and you went out of aspirin? `SDAVAssetExportSession` is a rewrite of `AVAssetExportSession` on top of `AVAssetReader*` and `AVAssetWriter*`. Unlike `AVAssetExportSession`, you are not limited to a set of presets – you have full access over audio and video settings.\n\n\nUsage Example\n-------------\n\n``` objective-c\nSDAVAssetExportSession *encoder = [SDAVAssetExportSession.alloc initWithAsset:anAsset];\nencoder.outputFileType = AVFileTypeMPEG4;\nencoder.outputURL = outputFileURL;\nencoder.videoSettings = @\n{\n    AVVideoCodecKey: AVVideoCodecH264,\n    AVVideoWidthKey: @1920,\n    AVVideoHeightKey: @1080,\n    AVVideoCompressionPropertiesKey: @\n    {\n        AVVideoAverageBitRateKey: @6000000,\n        AVVideoProfileLevelKey: AVVideoProfileLevelH264High40,\n    },\n};\nencoder.audioSettings = @\n{\n    AVFormatIDKey: @(kAudioFormatMPEG4AAC),\n    AVNumberOfChannelsKey: @2,\n    AVSampleRateKey: @44100,\n    AVEncoderBitRateKey: @128000,\n};\n\n[encoder exportAsynchronouslyWithCompletionHandler:^\n{\n    if (encoder.status == AVAssetExportSessionStatusCompleted)\n    {\n        NSLog(@\"Video export succeeded\");\n    }\n    else if (encoder.status == AVAssetExportSessionStatusCancelled)\n    {\n        NSLog(@\"Video export cancelled\");\n    }\n    else\n    {\n        NSLog(@\"Video export failed with error: %@ (%d)\", encoder.error.localizedDescription, encoder.error.code);\n    }\n}];\n\n```\n\nLicenses\n--------\n\nAll source code is licensed under the [MIT-License](https://github.com/rs/SDAVAssetExportSession/blob/master/LICENSE).\n","funding_links":[],"categories":["Objective-C","Media"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frs%2FSDAVAssetExportSession","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frs%2FSDAVAssetExportSession","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frs%2FSDAVAssetExportSession/lists"}