Blockage after several analyses in stabilising filter

What is your operating system?

What is your Shotcut version (see Help > About Shotcut)? Is it 32-bit?

Can you repeat the problem? If so, what are the steps?
(Please be specific and use the names as seen in Shotcut, preferably English. Include a screenshot or screen recording if you can. Also, you can attach logs from either View > Application Log or right-click a job and choose View Log.)
I have a 720x576 25 FPS video (Ut Video in Matroska container).
On a 33 second clip, I run the analysis to stabilize the video.
When I do this several times (trying different analysis settings) Shotcut does not respond.
Steps:
I run an analysis. The task finishes, however, the CPU consumption is still high (as if the analysis is not finished). Playback does not work.
Restarting Shotcut and calling the project again doesn’t work (preview window without video - empty video scopes).
I recovered normal operation by disabling White Balance, but I don’t know if it was a coincidence.

I have not been able to reproduce again the same problem of total blocking, but I did notice that repeated analysis (stabilize filter) slows down the response of Shotcut a lot.

No background applications, just Shotcut.


screenshot with the problem fixed, where you can see the clip in V1 and the filters applied, as well as the system resource monitor where I checked that CPU consumption was high at the time of the crash.
This is just an incidence report in case it is useful.

I found that there were invalid UTVideo and PCM messages, could this be the source of the issue?

  [matroska,webm @ 0x7f7f28002600] parser not found for codec utvideo, packets or times may be invalid.
    [matroska,webm @ 0x7f7f28002600] parser not found for codec pcm_s24le, packets or times may be invalid.
    [matroska,webm @ 0x7f7f28002600] parser not found for codec utvideo, packets or times may be invalid.
    [matroska,webm @ 0x7f7f28002600] parser not found for codec pcm_s24le, packets or times may be invalid.
    [matroska,webm @ 0x7f7f28190000] parser not found for codec utvideo, packets or times may be invalid.
    [matroska,webm @ 0x7f7f28190000] parser not found for codec pcm_s24le, packets or times may be invalid.
    [matroska,webm @ 0x7f7f28190000] parser not found for codec utvideo, packets or times may be invalid.
    [matroska,webm @ 0x7f7f28190000] parser not found for codec pcm_s24le, packets or times may be invalid.
    [matroska,webm @ 0x7f7f28194b80] parser not found for codec utvideo, packets or times may be invalid.
    [matroska,webm @ 0x7f7f28194b80] parser not found for codec pcm_s24le, packets or times may be invalid.
    [matroska,webm @ 0x7f7f28194b80] parser not found for codec utvideo, packets or times may be invalid.
    [matroska,webm @ 0x7f7f28194b80] parser not found for codec pcm_s24le, packets or times may be invalid.
    [producer avformat] audio: total_streams 1 max_stream 1 total_channels 2 max_channels 2
    [AVIOContext @ 0x7f7f2800b440] Statistics: 870751 bytes read, 3 seeks
    [producer avformat-novalidate] /home/ejmillan/Proyectos/Shotcut/Batalla de Mª Pita/Batalla de Mª Pita.mkv
        missing hwaccel parameters. skipping hardware initialization
    [producer avformat-novalidate] /home/ejmillan/Proyectos/Shotcut/Batalla de Mª Pita/Batalla de Mª Pita.mkv
        checking VFR: pkt.duration 40
    [vidstab] Multithreading: use 3 threads
    [vidstab] Fieldsize: 64, Maximal translation: 82 pixel
    [vidstab] Number of used measurement fields: 9 out of 35
    [vidstab] Fieldsize: 16, Maximal translation: 16 pixel
    [vidstab] Number of used measurement fields: 85 out of 320
    [filter vidstab] Analysis complete
    [producer avformat-novalidate] /home/ejmillan/Proyectos/Shotcut/Batalla de Mª Pita/Batalla de Mª Pita.mkv
         WILD TIMESTAMP: pkt.pts=[-9223372036854775808], pkt.dts=[-9223372036854775808], req_position=[24396], current_position=[24395], int_position=[0], pts=[-9223372036854775808] 
    [producer avformat-novalidate] /home/ejmillan/Proyectos/Shotcut/Batalla de Mª Pita/Batalla de Mª Pita.mkv
         WILD TIMESTAMP: pkt.pts=[-9223372036854775808], pkt.dts=[-9223372036854775808], req_position=[24397], current_position=[24396], int_position=[0], pts=[-9223372036854775808] 
    [producer avformat-novalidate] /home/ejmillan/Proyectos/Shotcut/Batalla de Mª Pita/Batalla de Mª Pita.mkv
         WILD TIMESTAMP: pkt.pts=[-9223372036854775808], pkt.dts=[-9223372036854775808], req_position=[24398], current_position=[24397], int_position=[0], pts=[-9223372036854775808] 
    [producer avformat-novalidate] /home/ejmillan/Proyectos/Shotcut/Batalla de Mª Pita/Batalla de Mª Pita.mkv
         WILD TIMESTAMP: pkt.pts=[-9223372036854775808], pkt.dts=[-9223372036854775808], req_position=[24399], current_position=[24398], int_position=[0], pts=[-9223372036854775808] 

    [AVIOContext @ 0x7f7f28197040] Statistics: 327832 bytes read, 0 seeks
    [AVIOContext @ 0x7f7f28198cc0] Statistics: 6569916494 bytes read, 4 seeks
    Completed successfully in 00:00:45

MLT XML:

   <?xml version='1.0' standalone='no'?>
    <mlt version="6.25.0" parent="producer3" in="00:00:00.000" title="Shotcut version 21.03.21" out="00:16:15.960" LC_NUMERIC="C">
      <profile sample_aspect_num="16" description="HD 1080p 25 fps" frame_rate_num="25" display_aspect_den="3" frame_rate_den="1" width="720" colorspace="601" height="576" display_aspect_num="4" sample_aspect_den="15" progressive="0"/>
      <consumer audio_off="1" no_meta="1" mlt_service="xml" all="1" resource="/tmp/Shotcut.DVgfRE"/>
      <producer in="00:00:00.000" title="Shotcut version 21.03.21" out="00:16:15.960" id="producer3">
        <property name="length">00:16:16.000</property>
        <property name="eof">pause</property>
        <property name="resource">/home/ejmillan/Proyectos/Shotcut/Batalla de Mª Pita/Batalla de Mª Pita.mkv</property>
        <property name="audio_index">1</property>
        <property name="video_index">0</property>
        <property name="mute_on_pause">0</property>
        <property name="mlt_serv
[/details]
ice">avformat-novalidate</property>
        <property name="seekable">1</property>
        <property name="aspect_ratio">1.06667</property>
        <property name="creation_time">2021-06-11T16:14:32</property>
        <property name="global_feed">1</property>
        <property name="xml">was here</property>
        <property name="shotcut:hash">e12f146a2741fe109559fac5dc2a376b</property>
        <property name="shotcut:caption">Batalla de Mª Pita.mkv</property>
        <property name="shotcut:projectAudioChannels">2</property>
        <property name="shotcut:projectFolder">1</property>
        <filter in="00:02:05.680" out="00:02:20.080" id="filter0">
          <property name="start">1</property>
          <property name="level">1</property>
          <property name="mlt_service">brightness</property>
          <property name="shotcut:filter">fadeInBrightness</property>
          <property name="alpha">00:00:00.000=0;00:00:00.960=1</property>
          <property name="shotcut:animIn">00:00:01.000</property>
          <property name="disable">0</property>
        </filter>
        <filter in="00:02:05.680" out="00:02:20.080" id="filter3">
          <property name="version">0.1</property>
          <property name="mlt_service">frei0r.colgate</property>
          <property name="threads">0</property>
          <property name="0">#373a55</property>
          <property name="1">0.64172</property>
          <property name="disable">0</property>
        </filter>
        <filter in="00:02:05.680" out="00:02:20.080" id="filter1">
          <property name="filename">/home/ejmillan/Proyectos/Shotcut/Batalla de Mª Pita/16.stab</property>
          <property name="shakiness">8</property>
          <property name="accuracy">4</property>
          <property name="stepsize">6</property>
          <property name="algo">1</property>
          <property name="mincontrast">0.3</property>
          <property name="show">0</property>
          <property name="tripod">0</property>
          <property name="smoothing">15</property>
          <property name="maxshift">-1</property>
          <property name="maxangle">-1</property>
          <property name="crop">0</property>
          <property name="invert">0</property>
          <property name="relative">1</property>
          <property name="zoom">0</property>
          <property name="optzoom">1</property>
          <property name="zoomspeed">0.25</property>
          <property name="reload">0</property>
          <property name="vid.stab.version">v1.1 (2015-05-16)</property>
          <property name="mlt_service">vidstab</property>
          <property name="analyze">1</property>
          <property name="disable">0</property>
        </filter>
        <filter in="00:02:05.680" out="00:02:20.080" id="filter4">
          <property name="version">0.2</property>
          <property name="mlt_service">frei0r.sharpness</property>
          <property name="0">0.5</property>
          <property name="1">0.5</property>
          <property name="disable">0</property>
        </filter>
        <filter in="00:02:05.680" out="00:02:20.080" id="filter2">
          <property name="window">75</property>
          <property name="max_gain">20dB</property>
          <property name="level">00:00:00.000=-60;00:00:00.960=0</property>
          <property name="mlt_service">volume</property>
          <property name="shotcut:filter">fadeInVolume</property>
          <property name="shotcut:animIn">00:00:01.000</property>
        </filter>
      </producer>
    </mlt>

I tried this on Ubuntu 20.04 but didn’t experience anything like this.

When this happens, can you check the process monitor to see if any instances of shotcut or melt are still running (even if not visible on the screen)?

1 Like

Hi @brian:
I will try to do more tests to try to reproduce this behavior.
I was trying to fine-tune the stabilization in a scene and that happened.
I couldn’t document it because it caught me by surprise. :scream:
When I get more information I will add it here.

I started a new project with a sub clip of my previous project.
I enabled proxy and preview scaling (last time I had proxy disabled because I wanted to work with image sequences and there was some problem with proxy).
These are the properties



The project is very simple:
SD PAL (720 x576 25 FPS)
A V1 track with video and audio.
White balance filter - Levels - Stabilise - Focus (Sharpen)

I made a first analysis of the stabilizer filter with the default settings. The analysis was completed in 23 seconds.
Next, I set to value 9 to the precision field of the stabilize filter. In the task window, the analysis was completed in 23 seconds, however, Shotcut does not respond.
On the system monitor, Shotcut is still using the CPU and takes a long time to free the system. During these moments Shotcut is unusable.

There are 86 seconds between these two screenshots, and the analysis has been completed in the task window for more than a minute.
I didn’t even have to force many stabilization analyses.

Things that may be important (I don’t know) :
I use an Nvidia proprietary driver for my GPU (I don’t use the X.org X server).
In the installation of this version, Ubuntu Studio did not configure SWAP space (I did the installation with default values).

stabilize test.mlt (6.2 KB)
1st Analysis Stabilize filter.txt (12.0 KB)
2nd Analysis Stab filter.txt (11.9 KB)

Did you know that when you use Stabilize with other filters, the analysis job includes these filters as well? This is intentional because the filters could be affecting the image in ways that affect the stabilization especially a crop or Size, Position & Rotate. Just an FYI because if these other filters are needed during stabilization you can temporarily disable them to make it faster.

I enabled proxy and preview scaling

Also FYI did you know that Stabilize disables preview scaling on that clip?

I did reproduce the problem in v21.03.21 and latest nightly build, but it does seem to always go away after you wait a while (yes, around a minute).

One thing I found in the log is that AnalyzeDelegate::updateFilter is triggered 3 times when the analysis job is done.

2 Likes

I didn’t know all that. I’m glad that’s within the expected parameters.
I just commented in case any leprechauns were playing around. :slightly_smiling_face:
Best regards and thanks.

The issue was related to those multiple messages. It was reloading the stabilize filter with the results of the analysis a few times, and refreshing the current frame.
This is fixed for the next version 21.06

1 Like