Bug 389624 - Automatic scene split does not work in newer versions
Summary: Automatic scene split does not work in newer versions
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface (show other bugs)
Version: 17.12.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-30 02:29 UTC by John Bell
Modified: 2020-10-14 18:48 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 20.08.2
fritzibaby: timeline_corruption+


Attachments
screen shot after running my script (112.62 KB, image/jpeg)
2019-01-30 13:24 UTC, B Stewart
Details
Here is my script (Python3) (2.94 KB, text/x-python)
2019-01-30 13:39 UTC, B Stewart
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Bell 2018-01-30 02:29:31 UTC
Last version of Kdenlive that worked for me was 0.9.6.  I keep installing newer versions in the hope that the auto scene split works again, but no luck.  Not with Ubuntu software version, not with archlinux.
Comment 1 John Bell 2018-02-09 06:35:18 UTC
Same files that auto scene split on 0.9.6 (I have that version on another computer) will not auto scene split on 17.12.0 although it seems to go through the motions and I get a delay as a progress bar moves but does not result in separated scenes.  I am running ubuntu 16.04 LTS.
Comment 2 Tiago Levita 2018-03-17 00:00:42 UTC
I can confirm that is not working on 17.12.3. I've tried with a lot of different files. It seems it's processing something (based on the progress bar and 50% of CPU usage) and, in the end, I get nothing. I tried all combinations of adding markers, cutting and save result with and without the clip in the timeline and same null result.
Comment 3 emohr 2018-12-26 18:43:51 UTC
Please try with the current Kdenlive AppImage version 18.12.0c

Run the Appimage from the terminal (press CTRL + ALT + T). Move to the AppImage folder and run the .AppImage: ./Kdenlive*.AppImage
Comment 4 John Bell 2018-12-26 20:52:41 UTC
I tried 18.12.0c as suggested by emohr but still had no success.  Just to be sure the problem is understood, I am trying to split scenes from old silent movies which I converted to digital files so the scene split has to be identified from the image itself (presumably where the mpeg has to reset itself because the changes are major).  Older versions of kdenlive like 0.9.6 could do that.  Still on ubuntu 16.04 LTS.  Is there a way to download 0.9.6 just to do the scene splitting?
Comment 5 emohr 2018-12-27 17:00:44 UTC
I assume some MLT function is broken not maintained anymore since version 17.04.

Here https://files.kde.org/kdenlive/release/ you find Version 16.12, maybe it works. 

Version 0.9.6 see here: https://download.kde.org/stable/kdenlive/0.9.6/src/ . I’m not sure if this is just the source code.

Do you need the Automatic scene split for old DV-Tapes to split into scene? If yes and you are on Windows here is Scenanlyser for free. http://www.scenalyzer.com/ . With this program I split my DV-Tape video into each scene/take.
Comment 6 B Stewart 2019-01-30 13:24:43 UTC
Created attachment 117730 [details]
screen shot after running my script

This is also a problem for me, and it seems to have been around for a few years!

I'm currently using kdenlive 18.08.2 on Ubuntu 18.08

I have a temporary workaround that works for me.


If the (Save result in clip metadata) is checked from (Clip Jobs/Automatic scene split) then the clip is analysed (can take a few minutes to complete) and the scene change frames are available as a "shot change list".
The number between each ";" and "=" is the frame number where the scene changes.
This info is also available in the saved .kdenlive file.

I have written a Python3 script (about 70 lines of code) which reads the kdenlive file and creates a copy of it with "guide marks" at each shot change.
This can be opened with kdenlive, which then shows where all the shot changes occur.

It is a simple workaround to a problem that seems to have been around for ages.
Comment 7 B Stewart 2019-01-30 13:39:53 UTC
Created attachment 117731 [details]
Here is my script (Python3)

I'm not a programmer as such, I've just dabbled around with things.
This may not be the best written Python script but it works for me.

There must only be 1 clip which should be placed at time 0 on the timeline.
The project frame rate must equal the clip frame rate for it to work.
(I picked up the project frame rate rather than the clip frame rate).

run the script from a command line with the kdenlive filename (and path) as the first command line argument.

Alternatively on Ubuntu 18.10 place the script in ".local/share/nautilus/scripts". The script can then be run by right clicking on the kdenlive file to work with. A new file is created with "_new" added to the filename.

As usual,given in good faith, use at your own risk.
Brian
Comment 8 John Bell 2019-01-30 18:24:58 UTC
Thanks Brian.  Where do I find the 'shot change list'?

 From your other email I think part of my problem may have been not 
having the project frame rate match the clip frame rate, but fixing that 
has not been a complete fix - still trying to make it work.

I tried your script and again cannot find the output from it but I am 
still looking ...

John

On 1/30/19 8:24 AM, B Stewart wrote:
> https://bugs.kde.org/show_bug.cgi?id=389624
>
> B Stewart <every-day@outlook.com> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |every-day@outlook.com
>
> --- Comment #6 from B Stewart <every-day@outlook.com> ---
> Created attachment 117730 [details]
>    --> https://bugs.kde.org/attachment.cgi?id=117730&action=edit
> screen shot after running my script
>
> This is also a problem for me, and it seems to have been around for a few
> years!
>
> I'm currently using kdenlive 18.08.2 on Ubuntu 18.08
>
> I have a temporary workaround that works for me.
>
>
> If the (Save result in clip metadata) is checked from (Clip Jobs/Automatic
> scene split) then the clip is analysed (can take a few minutes to complete) and
> the scene change frames are available as a "shot change list".
> The number between each ";" and "=" is the frame number where the scene
> changes.
> This info is also available in the saved .kdenlive file.
>
> I have written a Python3 script (about 70 lines of code) which reads the
> kdenlive file and creates a copy of it with "guide marks" at each shot change.
> This can be opened with kdenlive, which then shows where all the shot changes
> occur.
>
> It is a simple workaround to a problem that seems to have been around for ages.
>
Comment 9 John Bell 2019-01-30 19:41:22 UTC
I have got it so it created _new.kdenlive which has the original clip 
with markers at the scene changes it has found (a little more sensitive 
than I would expect, but that is an error in the right direction) but 
without splitting the scenes as it used to do with earlier versions of 
Kdenlive.  But I can live with this as a workaround.  New versions is 
being promised later this year - I hope this can be fixed in the base 
Kdenlive including the scene split. Somewhere they need to give guidance 
on making the project frame rate match the clip frame rate as it was not 
obvious to me at the time.

Thanks Brian,

John

On 1/30/19 1:24 PM, John wrote:
> Thanks Brian.  Where do I find the 'shot change list'?
>
> From your other email I think part of my problem may have been not 
> having the project frame rate match the clip frame rate, but fixing 
> that has not been a complete fix - still trying to make it work.
>
> I tried your script and again cannot find the output from it but I am 
> still looking ...
>
> John
>
> On 1/30/19 8:24 AM, B Stewart wrote:
>> https://bugs.kde.org/show_bug.cgi?id=389624
>>
>> B Stewart <every-day@outlook.com> changed:
>>
>>             What    |Removed                     |Added
>> ---------------------------------------------------------------------------- 
>>
>>                   CC| |every-day@outlook.com
>>
>> --- Comment #6 from B Stewart <every-day@outlook.com> ---
>> Created attachment 117730 [details]
>>    --> https://bugs.kde.org/attachment.cgi?id=117730&action=edit
>> screen shot after running my script
>>
>> This is also a problem for me, and it seems to have been around for a 
>> few
>> years!
>>
>> I'm currently using kdenlive 18.08.2 on Ubuntu 18.08
>>
>> I have a temporary workaround that works for me.
>>
>>
>> If the (Save result in clip metadata) is checked from (Clip 
>> Jobs/Automatic
>> scene split) then the clip is analysed (can take a few minutes to 
>> complete) and
>> the scene change frames are available as a "shot change list".
>> The number between each ";" and "=" is the frame number where the scene
>> changes.
>> This info is also available in the saved .kdenlive file.
>>
>> I have written a Python3 script (about 70 lines of code) which reads the
>> kdenlive file and creates a copy of it with "guide marks" at each 
>> shot change.
>> This can be opened with kdenlive, which then shows where all the shot 
>> changes
>> occur.
>>
>> It is a simple workaround to a problem that seems to have been around 
>> for ages.
>>
>
Comment 10 B Stewart 2019-01-30 20:03:45 UTC
Hi John,
I typed in a loooong step by step how to do it as a reply to your post but you must have added your last comment while I was typing and I lost it all.

The important steps are:-
1. Start with a fresh project.
2. Open one clip only.
3. Make sure the project framerate matches the clip framerate.
4. Add the clip to the timeline at time 0.
5. Right click the clip in the "Project Bin" and select "Clip Jobs/Automatic scene split" and tick "Save result in metadata clip"
6. Wait until the progress bar finishes - can take a while for long clips.
7. Save the project - eg "Save As test" creaates test.kdenlive.
8. Run my script on the created file - a new file appears eg test_new.kdenlive.
9. Open the new file in kdenlive.

If its "oversensitive" ie you have markers early on where there is no scene change, this happens if steps 3, 4 or 5 are not done in order!
Comment 11 B Stewart 2019-01-30 20:11:15 UTC
John,
You asked "Where do I find the 'shot change list'?"
you'll find it in the "Clip Properties" window, scroll down the icons to the right of the window to the icon that looks like an eye "Analysis data".
This can be exported to a text file by clicking the middle icon under the window.
The list looks like:-

shot_change_list=1=25382/0:0x0:0;300=7663;648=6540;827=5105;1416=7401;1716=6503

The number following each ";" is the frame number of each shot change. This has to be divided by the framerate to create a time in seconds at which to set the "guide" marks. If the framerates for the clip don't match the project a load of low numbers seem to appear - don't know why.
Comment 12 J Edio 2020-05-28 15:28:16 UTC
The issue (in kdenlive) is also (still?) in V20.04.1. As reported in 421772.
Comment 13 J Edio 2020-05-28 15:28:49 UTC

*** This bug has been marked as a duplicate of bug 421772 ***