VLC does not play variable frame rate mp4
I transcode our lecture from trec (produced by Camtasia Studio screen recording software) to mp4 using ffmpeg/x264. I use variable frame rate, since the trec file only contains a new frame when the screen changes. This speeds up encoding speed and reduced the mp4 file size drastically.
However, VLC does not play these files anymore. I'm using VLC 3.0.3 on Arch Linux. The videos play fine in Firefox (Linux/Windows, uses Cisco mp4 codec AFAIK), Chrome (Linux/Windows, uses ffmpeg), mpv (uses ffmpeg), and Windows Media Player.
I recall that earlier versions of VLC (2.x) worked fine, when I wrote my transcoding scripts years ago.
VLC shows a black screen when opening the file. It also shows a black screen after seeking. Sometimes, probably when VLC encounters a keyframe, VLC recovers and actually shows content. Note that it is likely that one seeks to a position where there are no keyframes in the mp4. Due to the nature of the recording, even non-key frames are sparse. Seeking works just fine in other players.
I can provide a file via some private communication channel. I do not want to post the file here, as it is a lecture recording. I can also provide my script for transcoding in case you are interested in .