[Libav-user] Second frame of video stream in mp4 file is duplicate of first frame
I am making video mp4 file from couple of jpg image files with
different sizes present as sample< number >.jpg (sample1.jpg,
sample2.jpg, etc) in a folder. I modified ffmpeg muxing.c example to make it create mp4 file from these set of jpg images(for
frames) and also modified it to create only video stream. It is able to
create mp4 file with n video frames from n different jpg image files,
but mp4 file it outputs when n=2 isn't as expected. I have tried from
n=1 to n=7 so far. When n=2 mp4 file is created but I could see only
first jpg image as frame in the entire video. It appears as if first
frame(first jpg image) is duplicated and used as second frame too, as I
just can't find image of second jpg image file when I play the video.
When I make video with 2 frames from 2 different jpg files, I want first
frame to be first jpg image and second frame to be second jpg image.
How do I achieve that?