An overview of the
In the last article, I told my friends about the process of SDK template in rendering. Let’s briefly review it, mainly including data creation, material replacement, audio and text, etc. In the last talk, I didn’t talk about them in detail because of time. Last time we said to the most complex part of the test of this piece to belong to our audio, because in addition to add material, to render the generated in the video to them to compare the effect of outside effect also to compare the time play point from the data and the accuracy of the broadcast content, this block is relatively complicated, more patience, So today we mainly explain the audio in the template test points and data replacement.
Audio function test
Material to replace
Again, we’re going to go ahead and prepare our audio data substitution before we test it, and we’re going to see if we’ve replaced the commission
As shown in the figure, the replaced audio data is displayed in the marked place, and it can be seen that the part with the suffix displayed in the data is mp3 as the suffix. If we replace our video/picture material in the audio data at this time, the template will not display the material after rendering. If it is displayed after rendering, the rendering does not conform to the data Settings at this time
Set the playback time period
In addition to confirming whether the material can be played after the replacement and whether the audio content is correct or not, we also need to confirm the duration of playing, setting the time point of playing in the data. For example, I want to display the audio within 10s of this template, so I set the time to 10, and then render. Let’s note that after rendering, we listen to the audio playback time is correct
Duration setting
Duration is what we do in this template if we want to play longer, we just set the duration that we want to play
For example, if we want to play 1s audio, we can set it to 1s, and then we can check whether the Settings are complete from the rendered template
Set the audio playback segment
This part is more important, mainly used to set the audio playback period. For example, if we want to capture the 12-30s of the audio, we can set the data to 12-30, as shown in the following picture:
StsrtTime is the start time, which is the 12s of the audio clip, and endTime is the endTime, which is the sound of the audio clip, which is the 12s to 30s of the audio clip displayed in this template. At this time there will certainly be a small partner question, is the assumption that MY time setting exceeds the audio playback time how to do, don’t worry now for you to explain to
Loop for
What if the duration we set exceeds the audio playback time we set, then the audio will continue to play, of course, will also stop, which requires us to set its playback state
The first part marked in red is loop. If we set loop to true, then the actual duration (inPoint) of the video exceeds the duration of the video, then the loop will be played until the set duration is stopped. If the loop is set to false so play to this audio time will stop, when such as if duration setting than the audio of the period of time, so no matter how long setting time, audio will play as long the time stop, if we put the last set to 0, which is no playing time limit, We can play a piece of audio through, and if we want to broadcast it live, we just set loop to true. The last volume is for setting the volume, so you can adjust the volume of the sound
conclusion
So that’s how we test a piece of audio, and maybe the more complicated part for some of you is this one that lasts a long time, because there are a lot of Settings. To summarize, if we want to keep looping we set the duration to 0, lopp to true, loop to false if we want to play only one piece of audio without looping, and we can set the duration from inPoint if we want to have a time limit. These can be more understanding, there is no clear partners can put forward, we can make progress together.