openh264 icon indicating copy to clipboard operation
openh264 copied to clipboard

Questions about encoding some similar images

Open taigacon opened this issue 12 years ago • 2 comments

Suppose I have some pictures with similar content, and I want to compress it using h264 format, making it into something similar to a video stream. Also, I want it to be able for me to get every frame’s picture whenever I want to, but after I’ve read through the api, I’m a little bit confused and here are some questions I have: While encoding the pictures, do I just put these pictures into the encoder and let it encode? How do I get the image of any frames? I didn’t find a seek method in the decoder’s api. How should I implement it?

taigacon avatar Aug 09 '14 07:08 taigacon

Currently encoder supports only I420 input. You should change your pictures into this format, and let encoder encode one picture by one. There is not an easy way to get the image of any frame, especially for all P picture coding. It's not required as a pure enc/dec. I guess you need a player.

huili2 avatar Sep 18 '14 05:09 huili2

as answered, the input format has to be yuv, you can convert the image format to yuv, then set encoder to be IDRperiod=1, then the encoder will encoder all frames into IDR frame which you can separately decode.

sijchen avatar Oct 08 '15 18:10 sijchen