I have a video.mp4 file (with H.264 essence) and a audio.mp4 file (with HE-AAC essence) and I would like to dash them both using the same segment duration.
I use "MP4Box -dash 1000 -frag 1000 -out out video.mp4 audio.mp4
The resulting video segments store 25 video frames each since it is a 25 fps source video. This is good. The audio segments all store 47104 samples (with a timescale of 48000).
I understand that due to the constant length of AAC frames, MP4Box can not put exactly AAC frames with a total duration of 1000 ms. However, it seems problematic that in every segments there are "too less" AAC frames. This results in a growing drift between the video and audio dash segments when transmitting them together.
Is there a way to tell MP4Box to generate for some segments a "little too less" AAC frames and for other segments a "little too many" AAC frames, so in average there would be AAC frames with a duration of 1000 ms.
Are there other ways to solve this problem?
Thanks in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I have a video.mp4 file (with H.264 essence) and a audio.mp4 file (with HE-AAC essence) and I would like to dash them both using the same segment duration.
I use "MP4Box -dash 1000 -frag 1000 -out out video.mp4 audio.mp4
The resulting video segments store 25 video frames each since it is a 25 fps source video. This is good. The audio segments all store 47104 samples (with a timescale of 48000).
I understand that due to the constant length of AAC frames, MP4Box can not put exactly AAC frames with a total duration of 1000 ms. However, it seems problematic that in every segments there are "too less" AAC frames. This results in a growing drift between the video and audio dash segments when transmitting them together.
Is there a way to tell MP4Box to generate for some segments a "little too less" AAC frames and for other segments a "little too many" AAC frames, so in average there would be AAC frames with a duration of 1000 ms.
Are there other ways to solve this problem?
Thanks in advance.
We're working on that, you can test with the dash_avg_duration branch of our git;
https://github.com/gpac/gpac/tree/dash_avg_duration