libVLC does not show all frames

This forum is about all development around libVLC.
infy
New Cone
New Cone
Posts: 2
Joined: 21 Sep 2020 13:26

libVLC does not show all frames

Postby infy » 21 Sep 2020 13:38

I am using libVLC within an JavaFX application. I am controlling the video milliseconds-wise, i.e. jumping from millisecond to millisecond.
With ffmpeg I read the PTS times and according to this a frame should by presented for example at 100ms. But this and other frames are skipped (approx. every second frame). When I extract all frame with OpenCV, all frames are extracted.
Could someony explain this behaviour? Is there an easy solution to this? But more importand for me would be an explanation why this occurs.
Thanks!

mfkl
Developer
Developer
Posts: 740
Joined: 13 Jun 2017 10:41

Re: libVLC does not show all frames

Postby mfkl » 21 Sep 2020 15:38

If you could share a sample project, that would help.
https://mfkl.github.io

infy
New Cone
New Cone
Posts: 2
Joined: 21 Sep 2020 13:26

Re: libVLC does not show all frames

Postby infy » 21 Sep 2020 17:33

I can share my project of the player that is written in Java and with that I tested it (here). Unfortunately I am not allowed to share my clips. But with this test video the same behaviour appears.
This leads me to the conclusion that this is not a file issue but a general behaviour due to compression? Also I am aware that that there is no guarantee that we get the exact frame as mentioned in this comment.

Here a short list of my results of the test video. It is a 30 FPS video.
The first column are the timestamps (ms) in which a ne frame appears.
Second column is the duration of the frame (row_i+1 - row_i - 1).
Third column are the pkt_pts timestamps that were read with ffmpeg (to verify that there are frames) and the 4th column are the frame types.
For example we can see that frame at 100ms and 167ms are skipped.

Code: Select all

0 0 0 I 1 32 33 B 34 33 67 B 68 65 100 P 134 66 133 B 201 66 167 B 268 65 200 B 334 66 233 P 401 66 267 B 468 65 300 B 534 333 B 367 P 400 B
Hope this helps and clarifies my question. Since I believe that there is probably no solution I would appreciate an explanation why this is the case. Because when using the next-frame function all frames -- that were skippen with the "time method" -- appear.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 22 guests