generate h264 based on 100 image

1.  Generate test sources:   image and its h264 file.

                - copy 1 images for 100 times.

                   import shutil

                   source = "./1.png"
                   for i in range(2,100):
                          target = "./" + str(i) + ".png"
                          #print(target)
                          shutil.copy(source,target)

                - generate 20fps yuv420p h264 file ( ffmpeg -framerate 20 -i "%d.png" -vcodec h264 -b:v 10485760 -pix_fmt yuv420p "yuv420p_20fps.h264" )

猜你喜欢

转载自www.cnblogs.com/morganh/p/12905297.html