Audio best practices (using PHP)
I'm working with the PHP SDK to create a video where I am adding multiple mp3 files on top of the video.
I'm currently adding the audio as a video onto the timeline (is that the right way to do it?)
E.g.
$video->overlay(Overlay::source(Source::video($external_audio))
->timeline(
Timeline::position()->startOffset($timeline_position)
)
);
What I see, however, is that if I add the audio this way, the volume on previous tracks goes down. So the audio on 1st second is very low, the audio on the next track on fifth second is slightly higher and the audio on the last track, on the 10th second is very high.
Should I be doing this any other way?
Does Cloudinary support having multiple audio tracks running at the same time?
-
Here is an example of a video where this happens (I've removed the username so it's not playable), but perhaps it's helpful.
As you can see, it uses a mp4 file as base and then just adds the same mp3 file overlay every second for 6 seconds. The result is a video that repeats the same audio louder every second, whereas I would like it repeat the same sound at the same volume every second. Is that possible?
https://res.cloudinary.com/[username]/video/upload/l_video:quiz:uploaded_audio:headid_40_questionno_1_type_question/fl_layer_apply,so_0/l_video:quiz:uploaded_audio:headid_40_questionno_1_type_question/fl_layer_apply,so_1/l_video:quiz:uploaded_audio:headid_40_questionno_1_type_question/fl_layer_apply,so_2/l_video:quiz:uploaded_audio:headid_40_questionno_1_type_question/fl_layer_apply,so_3/l_video:quiz:uploaded_audio:headid_40_questionno_1_type_question/fl_layer_apply,so_4/l_video:quiz:uploaded_audio:headid_40_questionno_1_type_question/fl_layer_apply,so_5/l_video:quiz:uploaded_audio:headid_40_questionno_1_type_question/fl_layer_apply,so_6/vc_h265/v1/quiz/quiz_omg_intro.mp4?_a=AACnOGX0 -
Hi Andri,
Thank you for reaching out.
Currently, when layering in audio files on concatenated videos, we have a limitation where the previous audio/video layer's volume gets lowered. We are aware of this and have an internal report to get this resolved.
I do not know have an ETA for when this will be resolved but we can keep you posted here.
Please let me know if you have any other questions or queries.
Kind Regards,Thomas0
Post is closed for comments.
Comments
2 comments