I have some H.264 videos that are encoded using closed GOPs
(x264 --open-gop none) and B-frames (using default settings,
i.e. --bframes 3).  From what I understand, when using closed GOPs,
it should be possible to pick any GOP at random, and decode every
frame inside it without looking at any other GOP.  This works
as expected when not using B-frames.  If I use B-frames, some calls
to avcodec_decode_video() obviously do not produce frames
but when I have sent the GOP's last compressed frame to libavcodec,
I should be able to flush out all delayed frames.

To flush them out, I have tried calling avcodec_decode_video
with a NULL pointer for data, and 0 for data length:

  avcodec_decode_video(vccx, picture, &got_picture, NULL, 0);

If I do this at the end of the GOP, libavcodec sets "got_picture"
to 1, indicating success, but every pixel produced is black
(RGB 0,0,0).

So, either x264 isn't closing the GOPs properly when using
B-frames, or I'm not flushing out the frames correctly.

Any help would be appreciated.

-- 
 Haakon
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to