Skip to content

Commit 4e7abe8

Browse files
committed
fix(lib): revert reverse-... utils because of warnings
1 parent 49e2c31 commit 4e7abe8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

manim_slides/utils.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def reverse_video_file(src: Path, dest: Path) -> None:
9595
) as output_container:
9696
input_stream = input_container.streams.video[0]
9797
output_stream = output_container.add_stream(
98-
codec_name=input_stream.codec_context.name, rate=input_stream.base_rate
98+
codec_name="libx264", rate=input_stream.base_rate
9999
)
100100
output_stream.width = input_stream.width
101101
output_stream.height = input_stream.height
@@ -118,9 +118,8 @@ def reverse_video_file(src: Path, dest: Path) -> None:
118118

119119
for _ in range(frames_count):
120120
frame = graph.pull()
121-
122-
for packet in output_stream.encode(frame):
123-
output_container.mux(packet)
121+
frame.pict_type = 5 # Otherwise we get a warning saying it is changed
122+
output_container.mux(output_stream.encode(frame))
124123

125124
for packet in output_stream.encode():
126125
output_container.mux(packet)

0 commit comments

Comments
 (0)