How to playback as fast as possible
Posted: 24 Sep 2016 15:36
Hi,
I'm using libvlc under windows.
I'm trying to find a work around for the fact that when seeking to a specific time in a h.264 file, VLC jumps to any frame, not an I-frame.
This leaves me with some annoying artifacts.
My files are h.264 encoded, with an I-frame interval of 1.2 seconds. (It comes from an hardware encoder which seems to have this) The frame rate is also known and fixed.
So, I would like to jump to the desired time minus 1.2 seconds. Then decode all frames as fast as possible, preferrable discard them or don't display them, until I reach the desired time.
Then start playback normally.
Could this be done with libvlc?
I would like to use libvlc_media_player_next_frame().
Unfortunately, this function returns void, so I have no idea when the frame is actually decoded and I can issue the next trigger.
Any suggestions?
I'm using libvlc under windows.
I'm trying to find a work around for the fact that when seeking to a specific time in a h.264 file, VLC jumps to any frame, not an I-frame.
This leaves me with some annoying artifacts.
My files are h.264 encoded, with an I-frame interval of 1.2 seconds. (It comes from an hardware encoder which seems to have this) The frame rate is also known and fixed.
So, I would like to jump to the desired time minus 1.2 seconds. Then decode all frames as fast as possible, preferrable discard them or don't display them, until I reach the desired time.
Then start playback normally.
Could this be done with libvlc?
I would like to use libvlc_media_player_next_frame().
Unfortunately, this function returns void, so I have no idea when the frame is actually decoded and I can issue the next trigger.
Any suggestions?