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

How can we play video and audio at the same time? #64

Open
lygialiem opened this issue Sep 13, 2020 · 1 comment
Open

How can we play video and audio at the same time? #64

lygialiem opened this issue Sep 13, 2020 · 1 comment

Comments

@lygialiem
Copy link

lygialiem commented Sep 13, 2020

Hi Silence-Github!

Your Library is so wonderful! But it still have some little issues which is waiting for you to resolve. #63. And also, could you have method that can play video and audio at the same time? In the sample project, at the VideoFilterVC, the audio is just appeared after recording. What about while playing video? I tried to add videoWriter and let it started. But the audio was still not appear. Here's my code in your sample project:

filePath = NSTemporaryDirectory() + "test.mp4"
        let outputUrl = URL(fileURLWithPath: filePath)
        videoWriter = BBMetalVideoWriter(url: outputUrl, frameSize: BBMetalIntSize(width: 1080, height: 1920))
        
        videoSource.audioConsumer = videoWriter
        videoSource
            .add(consumer: filter)
            .add(consumer: metalView)
            
        videoSource.add(consumer: videoWriter)
        
        videoWriter.start()
        videoSource.start()

If your library doesn't have that? I think I'll use the trick: Get the audio from video and play it standalone at the sametime with the video in metalView. Could you have any solution? Thank you for support.

@Silence-GitHub
Copy link
Owner

Now the library can not play audio. Maybe you can play audio with AVPlayer.

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