mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-05-17 10:45:53 +08:00
fix(lib): revert reverse-...
utils because of warnings
This commit is contained in:
@ -95,7 +95,7 @@ def reverse_video_file(src: Path, dest: Path) -> None:
|
|||||||
) as output_container:
|
) as output_container:
|
||||||
input_stream = input_container.streams.video[0]
|
input_stream = input_container.streams.video[0]
|
||||||
output_stream = output_container.add_stream(
|
output_stream = output_container.add_stream(
|
||||||
codec_name=input_stream.codec_context.name, rate=input_stream.base_rate
|
codec_name="libx264", rate=input_stream.base_rate
|
||||||
)
|
)
|
||||||
output_stream.width = input_stream.width
|
output_stream.width = input_stream.width
|
||||||
output_stream.height = input_stream.height
|
output_stream.height = input_stream.height
|
||||||
@ -118,9 +118,8 @@ def reverse_video_file(src: Path, dest: Path) -> None:
|
|||||||
|
|
||||||
for _ in range(frames_count):
|
for _ in range(frames_count):
|
||||||
frame = graph.pull()
|
frame = graph.pull()
|
||||||
|
frame.pict_type = 5 # Otherwise we get a warning saying it is changed
|
||||||
for packet in output_stream.encode(frame):
|
output_container.mux(output_stream.encode(frame))
|
||||||
output_container.mux(packet)
|
|
||||||
|
|
||||||
for packet in output_stream.encode():
|
for packet in output_stream.encode():
|
||||||
output_container.mux(packet)
|
output_container.mux(packet)
|
||||||
|
Reference in New Issue
Block a user