Big brother, your money is too little, to write all to you, not easy, can back to you are good, to tell the truth. Look, nobody else wants to. Understand each other lol
0 Answer
Big brother, your money is too little, to write all to you, not easy, can back to you are good, to tell the truth. Look, nobody else wants to. Understand each other lol
Transfer h.264 bare code to image implementation code. Hope to adopt
import av
import sys
def h264ToJpg_demo():
inputFileName = "input.h264"
container = av.open(inputFileName)
print("container:", container)
print("container.streams:", container.streams)
print("container.format:", container.format)
for frame in container.decode(video = 0):
print("process frame: %04d (width: %d, height: %d)" % (frame.index, frame.width, frame.height))
frame.to_image().save("output/frame-%04d.jpg" % frame.index)
def main():
h264ToJpg_demo()
if __name__ == "__main__":
sys.exit(main())
in CSDN copied again...
这家伙很懒,什么都没留下...