mirror of https://github.com/AlfredoSequeida/fvid
Speed up ffmpeg part of H.265 encoding/decoding
At the expense of a bit of video size (~5% bigger files). This will cause files previously encoded with the H.265 codec to be incompatible. Since H.265 is still an experimental feature though and hasn't been released to PyPi, this will not be a major version bump.
This commit is contained in:
parent
c6263c55b4
commit
4affd7bf51
|
@ -227,7 +227,7 @@ def get_bits_from_video(video_filepath: str, use_h265: bool) -> str:
|
|||
+ video_filepath
|
||||
+ "' -c:v libx265 -filter:v fps=fps="
|
||||
+ FRAMERATE
|
||||
+ " -x265-params lossless=1 -preset 6 -tune grain "
|
||||
+ " -x265-params lossless=1 -tune grain "
|
||||
+ TEMPVIDEO
|
||||
)
|
||||
else:
|
||||
|
@ -436,7 +436,7 @@ def make_video(output_filepath: str, framerate: int = FRAMERATE, use_h265: bool
|
|||
"ffmpeg -r "
|
||||
+ framerate
|
||||
+ " -i ./fvid_frames/encoded_frames_%d.png -c:v libx265 "
|
||||
+ " -x265-params lossless=1 -preset 6 -tune grain "
|
||||
+ " -x265-params lossless=1 -tune grain "
|
||||
+ outputfile
|
||||
)
|
||||
else:
|
||||
|
@ -578,4 +578,4 @@ def main():
|
|||
cleanup()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
main()
|
||||
|
|
Loading…
Reference in New Issue