Hello,
First, some version and software details:
- Software: iOS 18.1
- Hardware: iPhone 14 Pro Max and later
- Xcode: 16.0
Summary: AVAssetReader is not concatenating a video at the beginning of the output video. The output video should contain a scene of me introducing the content, followed by a blue screen with AVSpeechSynthesizer reading out a text that I pasted above the "Generate Video" button.
Details:
Now, let's talk about the app.
Basically, I’m developing an app that generates a video with the following features:
- My app will create an output video that is split into an opening scene followed by a fully blue screen.
- The opening scene will be taken from a video I choose from my gallery.
- I will read the opening video using AVAssetReader as usual.
- After the opening scene, I will use the content of a text read by AVSpeechSynthesizer.write().
- After the opening scene, the synthesized audio will start playing while the blue screen is displayed.
All of this is already defined in the attached project.
Each project file has a comment at the beginning introducing its content.
How to test:
- Write something in the field above the "Generate Video" button. For example, type "Hello, world!"
- Then, press the "Library" button and select a video from the gallery, about 30 seconds long.
- That’s it. Press the "Generate Video" button.
The result I’ve experienced is a crash or failure to generate the video.
Practical example of what I want to achieve:
Suppose I record a 30-second video where I say, "I’m going to tell you the story of Snow White."
Then, I paste the "Snow White" story into the field above the "Generate Video" button.
The output video should contain me saying, "I’m going to tell you the story of Snow White."
After that, the AVSpeechSynthesizer will read the story I pasted, while displaying a blue screen.
I look forward to a solution.
Thank you very much!