How to playback as fast as possible

This forum is about all development around libVLC.
maitrepiet
Blank Cone
Blank Cone
Posts: 69
Joined: 27 Oct 2009 14:44

How to playback as fast as possible

Postby maitrepiet » 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?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: How to playback as fast as possible

Postby Jean-Baptiste Kempf » 26 Sep 2016 11:36

It can be done, if you modify the demuxer related to that, and then use the option fast-seek
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 30 guests