Skip to content
This repository has been archived by the owner on Jun 13, 2019. It is now read-only.

Start assetWriter with video buffer #14

Merged
merged 1 commit into from Apr 4, 2016
Merged

Start assetWriter with video buffer #14

merged 1 commit into from Apr 4, 2016

Conversation

jnoh
Copy link
Contributor

@jnoh jnoh commented Apr 3, 2016

Bug: The video frequently begins with a black screen.

Only start the assetWriter with a video sample. Otherwise, the output video may be missing video frames at the start of the movie. Current fix ensures that no video frames are missing.

Bug: The video frequently begins with a black screen.

Only start the assetWriter with a video sample.  Otherwise, the output video may be missing video frames at the start of the movie.  Current fix ensures that no video frames are missing.
@remirobert
Copy link
Owner

thanks for you contribution ! 🎉

@remirobert remirobert merged commit f446fde into remirobert:master Apr 4, 2016
@patthehuman
Copy link
Contributor

This fix will still leave still frames at the beginning of the video. The problem is with the thread it's on. If you wrap the appendBuffer function block in dispatch_async(dispatch_get_main_queue()) { it will work better.

@remirobert
Copy link
Owner

I noticed that. It's because I use a different queue. 🤔

@patthehuman
Copy link
Contributor

I'm still looking deeper into the issue. Looks like my solution doesn't work all the time. I'm going to try wrapping it in the pods queue to see what happens.. Do you have any suggestions @remirobert ?

@remirobert
Copy link
Owner

I am also still looking on it. queue issue for sure here.

@patthehuman
Copy link
Contributor

@remirobert here is the solution: wrap the entire function block in a conditional for if CMSampleBufferDataIsReady(sampleBuffer)

Works perfectly. Would you like me to pull down changes and PR?

@remirobert
Copy link
Owner

@patthehuman awwwwww !! Yes sure go ahead with a PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants