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" )

 

 

posted on 2020-05-17 14:56  cdekelon  阅读(129)  评论(0编辑  收藏  举报

导航