openshot-qt icon indicating copy to clipboard operation
openshot-qt copied to clipboard

Laggy current time bar when video is played

Open shadowvzs opened this issue 6 months ago • 7 comments

Describe the bug: when the video is played then instead of moving fluently the red line which show the current position during the playing the video, it became laggy, sometimes jump instead of moving sometimes stop to work and if i pause the video then it will be updated, sometimes shown in wrong position, it has a laggy feeling with the timebar because of laggy navigation.

Steps to reproduce the behavior:

  1. move a video to the timebar (around 1hours long)
  2. make the scale to highest as possible (i mean to see seconds for the fine cutting)
  3. start to play the video or click to a specific part of the video to navigate there

Expected behavior: work smoothly like it was in 2.46 (i had older hardware still was smooth)

System Details:

  • OpenShot Version 3.3.0|0.4.0
  • Operating System / Distro: Linux Mint 22.01
  • Hardware: Ryzen 9950x3d (8 core with vcache), 32 gb ddr5,rtx3060 with driver version 570

Log Files: log file is empty, i recently started to edit

Exception / Stacktrace:

  • no crash, simple just hard to browse in the video

Screenshots: (Optional)

https://github.com/user-attachments/assets/12005b67-60db-4935-862b-e7d8d38479d1

shadowvzs avatar May 31 '25 05:05 shadowvzs

When you say

"Expected behavior: work smoothly like it was in 2.46 (i had older hardware still was smooth)"

do you mean that the problem started happening after v2.46, ....

what is the size of the video you are editing is it multi gigabyte,

I use Arch linux Wayland and I tried with a 1 hour video, and I couldn't reproduce the problem maybe a Linux Mint issue, Mesa driver 1.25 / RX 6600 XT, AMD Ryzen 7 8840U

is the problem with just that video or with other videos, did you use effect on the video or add anything that made it turn into this..

Otmanraad avatar Jul 07 '25 18:07 Otmanraad

here it is 5 gigabyte but i have same lagg with 5 mb video too, i heard more ppl experiencing exactly the same issue so i doubt linux mint issue, maybe nvdia driver issue....

shadowvzs avatar Jul 07 '25 19:07 shadowvzs

I'm unable to reproduce it, try to run it in terminal maybe it will show something, I noticed that the video is 720p 30fps at the title bar with a old windows theme,

~ $ openshot-qt --debug

Also what is your desktop, compositor and environment (Example Sway Wayland) are you using x11 or Wayland.

Otmanraad avatar Jul 08 '25 15:07 Otmanraad

After some testing, I did not manage to reproduce the problem, but noticed that on x11=i3wm setting everything in the Edit = Preference under Tab=Performance, to the lowest(Threads and other settings) and CPU acceleration, it did struggle a bit with the Timeline so if you can check what you are using in that tab that will also help maybe your PC is struggling due to a misconfiguration.

But I do believe this is a Bug that need to be fixed, we will see what

openshot-qt --debug will show us

if its normal and nothing is showing an error, then this maybe a GPU/System problem.

Otmanraad avatar Jul 08 '25 17:07 Otmanraad

i did an update (kernel, driver, everything) now it is way better, openshot version still 3.3.0 - 0.4.0 but kernel is 6.11.0-29 nVidia driver is v570.133.07 or tried with xserver-xorg-video-nouveau, that works too (i do not changed the settings since last week in the openShot).

At performance tab atm:

- no acceleration
- HW decoder is Graphics Card 0
- HW encoder is Graphics Card 0
- OMP - 16
- FFmpeg threads 16
- 1950x1100

wayland version apt-cache show mutter | grep Version

Version: 46.2-1ubuntu0.24.04.9
Version: 46.0-1ubuntu9
DEBUG properties_model: updating clip properties model.
DEBUG preview_thread: Max timeline length/frames detected: 113667
DEBUG preview_thread: refreshFrame
DEBUG preview_thread: player Position(): 1
DEBUG timeline: sortItems
DEBUG main_window: addSelection: item_id: C0R8SPM4XG, item_type: clip, clear_existing: False
DEBUG preview_thread: refreshFrame
DEBUG preview_thread: player Position(): 1
DEBUG properties_model: Update item: clip
DEBUG properties_model: Update frame to 1
DEBUG properties_model: updating clip properties model.
INFO timeline: Dropping item on timeline - item_ids: ['C0R8SPM4XG'], item_type: clip
DEBUG project_data: _set key: ['clips', {'id': 'C0R8SPM4XG'}], values: {'id': 'C0R8SPM4XG', 'layer': 5000000, 'position': 0, 'start': 0, 'end': 3769.7}, add: False, remove: False
DEBUG properties_model: {'id': 'C0R8SPM4XG', 'layer': 5000000, 'position': 0, 'start': 0, 'end': 3769.7}
DEBUG properties_model: updating clip properties model.
DEBUG preview_thread: Max timeline length/frames detected: 113091
DEBUG preview_thread: refreshFrame
DEBUG preview_thread: player Position(): 1
DEBUG timeline: Changing timeline to length: 3779.7
DEBUG project_data: _set key: ['duration'], values: 3779.7, add: False, remove: False
DEBUG preview_thread: Max timeline length/frames detected: 113091
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7c34080041c0] Skipping unhandled metadata com.android.video.temporal_layers_count of type 67
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7c34080041c0] Skipping unhandled metadata com.android.video.temporal_layers_count of type 67
DEBUG timeline: sortItems
DEBUG timeline: sortItems
DEBUG project_data: _set key: ['scale'], values: 188.985, add: False, remove: False
DEBUG timeline: Skipping unneeded webview update for 'scale'
DEBUG timeline: DisableCacheThread: Stop caching frames on timeline
DEBUG properties_model: Update frame to 4593
DEBUG properties_model: updating clip properties model.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7c34080041c0] Skipping unhandled metadata com.android.video.temporal_layers_count of type 67
DEBUG timeline: redraw_audio_onTimeout
DEBUG properties_model: Update frame to 6408
C:\home\shadowvzs> glxinfo -B
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 12288 MB
    Total available memory: 12288 MB
    Currently available dedicated video memory: 11437 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce RTX 3060/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 570.133.07
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6.0 NVIDIA 570.133.07
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)

OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 570.133.07
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

C:\home\shadowvzs> nvidia-smi
Tue Jul  8 21:49:08 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 570.133.07             Driver Version: 570.133.07     CUDA Version: 12.8     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3060        Off |   00000000:04:00.0  On |                  N/A |
|  0%   41C    P5             15W /  170W |     451MiB /  12288MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A            1416      G   /usr/lib/xorg/Xorg                      237MiB |
|    0   N/A  N/A            1799      G   xfwm4                                     3MiB |
|    0   N/A  N/A            3351      G   /usr/lib/firefox/firefox                164MiB |
+-----------------------------------------------------------------------------------------+

shadowvzs avatar Jul 08 '25 18:07 shadowvzs

Thanks alot for your detailed message. I Really appreciate it.

Well I looked at your Timeline and its seems like its normal without any problem,

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7c34080041c0] Skipping unhandled metadata com.android.video.temporal_layers_count of type 67

this I think is caused because the video you had was taken on android but it does not seem to be related to the problem

DEBUG timeline: DisableCacheThread: Stop caching frames on timeline

While on my system Restart it, your stop without restarting,

The Reason why it stops is because you selected a new area in the Timeline and it stops caching the old area and then start caching the new area.

so this may be the problem here, so......

DEBUG timeline: DisableCacheThread: Stop caching frames on timeline
DEBUG timeline: EnableCacheThread: Start caching frames on timeline
DEBUG timeline: EnableCacheThread: Start caching frames on timeline

̶[̶]̶(̶h̶t̶t̶p̶s̶:̶/̶/̶g̶i̶t̶h̶u̶b̶.̶c̶o̶m̶/̶s̶e̶a̶r̶c̶h̶?̶q̶=̶o̶r̶g̶%̶3̶A̶O̶p̶e̶n̶S̶h̶o̶t̶%̶2̶0̶E̶n̶a̶b̶l̶e̶C̶a̶c̶h̶e̶T̶h̶r̶e̶a̶d̶&̶t̶y̶p̶e̶=̶c̶o̶d̶e̶)̶

T̶h̶e̶s̶e̶ ̶a̶r̶e̶ ̶a̶l̶l̶ ̶t̶h̶e̶ ̶p̶l̶a̶c̶e̶s̶ ̶w̶h̶e̶r̶e̶ ̶E̶n̶a̶b̶l̶e̶C̶a̶c̶h̶e̶T̶h̶r̶e̶a̶d̶ ̶i̶s̶ ̶t̶r̶i̶g̶g̶e̶r̶d̶,̶ ̶i̶m̶ ̶l̶o̶o̶k̶i̶n̶g̶ ̶i̶n̶t̶o̶ ̶i̶t̶,̶ ̶r̶i̶g̶h̶t̶ ̶n̶o̶w̶,̶ ̶I̶'̶m̶ ̶g̶o̶n̶n̶a̶ ̶t̶r̶y̶ ̶t̶o̶ ̶r̶e̶b̶u̶i̶l̶d̶ ̶O̶p̶e̶n̶s̶h̶o̶t̶ ̶w̶i̶t̶h̶ ̶o̶p̶e̶n̶s̶h̶o̶t̶.̶S̶e̶t̶t̶i̶n̶g̶s̶.̶I̶n̶s̶t̶a̶n̶c̶e̶(̶)̶.̶E̶N̶A̶B̶L̶E̶_̶P̶L̶A̶Y̶B̶A̶C̶K̶_̶C̶A̶C̶H̶I̶N̶G̶ ̶=̶ ̶F̶a̶l̶s̶e̶

an̶d̶ ̶I̶ ̶w̶i̶l̶l̶ ̶s̶e̶e̶ ̶i̶f̶ ̶t̶h̶a̶t̶ ̶c̶r̶e̶a̶t̶e̶s̶ ̶t̶h̶e̶ ̶s̶a̶m̶e̶ ̶p̶r̶o̶b̶l̶e̶m̶,(it doesnt even play if there is no caching)

@jonoomph Should be able to recognize something here and tell if it is a bug or a System problem as he basically worked his entire life on this project, so I would love to have some insight into this.

I will just recommend enabling NVENC or CUDA instead of CPU acceleration, You have a NVIDIA GPU All I can say is experiment with settings, see if you can play with the caching in the Cache Tab, toggle some things on and off. see if anything happens

This seems like a system specif issue not really a Bug in Openshot.

As you said it improved when you updated the kernal. and on older Hardware 2.46 worked too, so it didn't get broken after an update, as I thought

you can install the flatpak version, or use X11 if you can and see if that solves the problem. sometimes switching back to x11 solves most problems to be honest as a Wayland User myself..

Thank you alot @shadowvzs for all the cooperation you provided, anyway sorry for the long essay but I'm gonna see what I can to reproduce the problem.

Otmanraad avatar Jul 08 '25 21:07 Otmanraad

@Otmanraad i tried enable the HW acc. however then the video became green and flashy, it will be useless, i tried all option

this with Nvidia NVDEC (this was an example video, no politcal background or something, however the imported and exported videos became green dotted or as you see) Image

i do not have CUDA option, only:

  • Linux VA-API: after changed to this one and restarted then i cannot import any file, it will say "XY.mp4 is not a valid video, audio, or image file"
DEBUG files_model: Importing file list: ['/home/shadowvzs/Downloads/myvideo.mp4']
Hardware decoding device number: 0
[AVHWDeviceContext @ 0x37fbbc40] Failed to initialise VAAPI connection: -1 (unknown libva error).
Hardware decoding device number: 0
[AVHWDeviceContext @ 0x380525c0] Failed to initialise VAAPI connection: -1 (unknown libva error).
  • Linux VDPAU: same than above
Invalid setup for format vdpau: does not match the type of the provided device context.
  • Nvidia NVDEC: green overlay

shadowvzs avatar Jul 09 '25 12:07 shadowvzs

Hardware acceleration is broken in all environments. Additionally, if you are running the AppImage in the Linux world (recommended), hardware acceleration is not supported.

In Windows, when you enable Hardware Acceleration, some videos turn completely green.

My recommendation is to disable all hardware acceleration settings (return them to the default settings). I also recommend that everyone retests using v3.4.0-Release-Candidate. There are many performance improvements made to both the Caching and the timeline.

It might be worth it to close this ticket and start a new thread with issues identified in v3.4.0-RC.

Colorjet3 avatar Dec 12 '25 23:12 Colorjet3