File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments