VLC ActiveX is skipping frames

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
DaveTW
New Cone
New Cone
Posts: 1
Joined: 04 Sep 2024 16:41

VLC ActiveX is skipping frames

Postby DaveTW » 04 Sep 2024 17:41

Hello Forum Members,

I use the ActiveX Control "VLC ActiveX Plugin and IE Web Plugin v2", to let the user play videos and go frame by frame through the video. Now I have difficulties to jump to everey frame in some videos.
Since I control the AX Control with LabVIEW, which is a quite uncommon programming language, I try to describe the code with Pseudo-Code:

Code: Select all

VLCPlugin2.playlist.clear(); // Clear Playlist VLCPlugin2.playlist.add(uri:"file:///C:\video.mp4"); // Set Video-Path VLCPlugin2.playlist.parse(options:0; timeout_ms:100); // retrieve informations about video, so later I can get VLCPlugin2.input.length & .fps VLCPlugin2.playlist.playItem(itemid:0); // start video playback do { delay (10ms); } while (!VLCPlugin2.playlist.isPlaying); // stop loop when playback started VLCPlugin2.playlist.pause(); // pause playback, in this state it is possible to show first frame VLCPlugin2.input.position = 0; // show first frame fps = VLCPlugin2.input.fps; FrameTime_ms = 1000 / fps; // For 50 fps -> 20ms FrameTime ... // To go frame by frame I use this VLCPlugin2.input.time = FrameTime * FrameNo + Offset_ms; ...
If I use the last line to set the current position, the control doesn't show every third frame, To be exact:

Code: Select all

time / ms | shown 0 | T 20 | T 40 | T 60 | F 80 | T 100 | T 120 | F 140 | T 160 | T 180 | F ...
If I go back, e.g. from 140 to 120, the frame at 100 ms is shown.
I can go with the VLC player frame by frame (Keystroke E), every frame is shown.
I extracted the video meta information of the video with ffmpeg, the appropriate information is:

Code: Select all

[mov,mp4,m4a,3gp,3g2,mj2 @ 000001b09fbb8240] st: 0 edit list: 1 Missing key frame while searching for timestamp: 3600 [mov,mp4,m4a,3gp,3g2,mj2 @ 000001b09fbb8240] st: 0 edit list 1 Cannot find an index entry before timestamp: 3600. Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2024_08_K1D_200_Laberer_WA.MP4': Metadata: major_brand : mp42 minor_version : 1 compatible_brands: mp42hvc1 creation_time : 2024-08-19T09:12:01.000000Z Duration: 00:00:59.04, start: 0.000000, bitrate: 95381 kb/s Stream #0:0(deu): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 95087 kb/s, 50 fps, 50 tbr, 180k tbn, 50 tbc (default)
I created a testvideo from images, where there are upcounting numbers are shown per frame. I created this with ffmpeg. This doesn't show these problems. The metadata is:

Code: Select all

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Frames.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 encoder : Lavf58.26.101 Duration: 00:00:40.00, start: 0.000000, bitrate: 1656 kb/s Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1655 kb/s, 25 fps, 25 tbr, 12800 tbn, 25 tbc (default)
For me it is unclear, what settings are to be made to convince the VLC plugin to show every frame.
Could this be a bug in the ActiveX control?

Greets, Dave

Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 8 guests