Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NextLevelSessionExporter, did not complete #22

Closed
andrewjedi opened this issue Sep 25, 2019 · 6 comments
Closed

NextLevelSessionExporter, did not complete #22

andrewjedi opened this issue Sep 25, 2019 · 6 comments

Comments

@andrewjedi
Copy link

andrewjedi commented Sep 25, 2019

Even using the default project, it will not export, I just keep getting:

"NextLevelSessionExporter, did not complete"

I'm on the new Xcode 11 using Mojave 10.14.6

@piemonte
Copy link
Contributor

hey @andrewfashion if you use the 0.3.0 release as a workaround, will check into this

@piemonte
Copy link
Contributor

commit 301baa2 (HEAD -> master)
Author: patrick piemonte patrick.piemonte@gmail.com
Date: Wed Sep 25 15:10:44 2019 -0700

add status to debug message

commit c920e22
Author: patrick piemonte patrick.piemonte@gmail.com
Date: Wed Sep 25 15:10:33 2019 -0700

update project schema

commit e15ee09
Author: patrick piemonte patrick.piemonte@gmail.com
Date: Wed Sep 25 15:10:18 2019 -0700

SessionExporter, fix an issue where execution continues after failure

@andrewjedi
Copy link
Author

andrewjedi commented Sep 26, 2019

Thanks @piemonte ! Did your latest commits just now fix the issue?

@andrewjedi
Copy link
Author

andrewjedi commented Sep 26, 2019

Hey @piemonte , downgraded to 0.3.0, and I'm still getting a SIGABRT crash on the asset.nextlevel_export line :( any ideas?


let asset = AVMutableComposition(url: url)

        let tmpURL = URL(fileURLWithPath: NSTemporaryDirectory(), isDirectory: true)
            .appendingPathComponent(ProcessInfo().globallyUniqueString)
            .appendingPathExtension("mp4")
        
        let compressionDict: [String: Any] = [
            AVVideoAverageBitRateKey: NSNumber(integerLiteral: 2500000), //lower it if you wish
            AVVideoProfileLevelKey: AVVideoProfileLevelH264BaselineAutoLevel as String,
        ]
        
        let videoOutputConfiguration = [
            AVVideoCodecKey : AVVideoCodecType.h264,
            AVVideoWidthKey : NSNumber(integerLiteral: 1280),
            AVVideoHeightKey: NSNumber(integerLiteral: 720),
            AVVideoScalingModeKey: AVVideoScalingModeResizeAspectFill,
            AVVideoCompressionPropertiesKey: compressionDict
            ] as [String : Any]
        
        let audioOutputConfiguration = [
            AVFormatIDKey: kAudioFormatMPEG4AAC,
            AVEncoderBitRateKey: NSNumber(integerLiteral: 128000),
            AVNumberOfChannelsKey: NSNumber(integerLiteral: 2),
            AVSampleRateKey: NSNumber(value: Float(44100))
            ] as [String : Any]
        
        asset.nextlevel_export(outputFileType: .mp4,
                               outputURL: tmpURL,
                               videoOutputConfiguration: videoOutputConfiguration,
                               audioOutputConfiguration: audioOutputConfiguration,
                               progressHandler: { progress in
                                
            print(progress)
                                
        }) { status in
            switch status {
            case .completed:
                print("completed")
                completionHandler(tmpURL, nil)
                
            case .failed:
                print("failed")
                completionHandler(nil, DareError.unknownError)
                
            default:
                break
            }
        }

@andrewjedi
Copy link
Author

Any help is greatly appreciated @piemonte :)

@piemonte
Copy link
Contributor

piemonte commented Nov 5, 2019

64f9642

@piemonte piemonte closed this as completed Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants