Zulko / moviepy

Video editing with Python
https://zulko.github.io/moviepy/
MIT License
12.07k stars 1.51k forks source link

Audio out of sync for combined DASH video #2147

Open ncugit-sec opened 3 months ago

ncugit-sec commented 3 months ago

Expected Behavior

When editing segmented DASH video, it's common to encounter missing segments. These missing segments should be skipped during editing, mirroring the behavior of a video player.

https://github.com/Zulko/moviepy/assets/53465444/c40f5dc3-c71a-4354-8581-27774ea369a8

Actual Behavior

Duplicate frames are inserted, but the audio does not correspond accordingly, resulting in audio being out of sync.

https://github.com/Zulko/moviepy/assets/53465444/5c793332-3a70-4aff-b2ee-fe58f6a6c1fc

Steps to Reproduce the Problem

https://github.com/Zulko/moviepy/assets/53465444/137e250f-6879-4c85-8ff3-7ca7d7a9ab0e

# Using above raw video
from moviepy.editor import VideoFileClip
clip = VideoFileClip('movie.mp4')
cvc = CompositeVideoClip([clip])
cvc.write_videofile('encoded.mp4')

Specifications