Skip to content

Commit

Permalink
Merge pull request #888 from EvanBldy/master
Browse files Browse the repository at this point in the history
[playlists] fix concat playlist build with Non-monotonic DTS
  • Loading branch information
EvanBldy authored Nov 20, 2024
2 parents e5c3495 + 25ab5c8 commit a95e725
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions zou/utils/movie.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ def generate_tile(movie_path):
height = 100
width = math.ceil(height * ratio)
if rows == 480:
select = f"select='not(mod(n\,{math.ceil(duration_in_frames/3840)}))',"
select = (
rf"select='not(mod(n\,{math.ceil(duration_in_frames/3840)}))',"
)
else:
select = ""
try:
Expand Down Expand Up @@ -493,7 +495,11 @@ def concat_demuxer(in_files, output_path, *args):

stream = ffmpeg.input(temp.name, format="concat", safe=0)
stream = ffmpeg.output(
stream.video, stream.audio, output_path, c="copy"
stream.video,
stream.audio,
output_path,
vf="select=concatdec_select",
af="aselect=concatdec_select,aresample=async=1",
)
return run_ffmpeg(stream, "-xerror")

Expand Down

0 comments on commit a95e725

Please sign in to comment.