|
|
|
05-14-2019, 05:59 AM
|
#41
|
Human being with feelings
Join Date: Nov 2009
Location: UK
Posts: 669
|
Quote:
Originally Posted by X-Raym
@dysrock
You will have to write your own functions, based on pixel difference from one frame to another... That why it just 'in theory'.
But there is no real advantage of having this in video processor : you will be limited by playback speed, while ffprobe (used in this script) can do way faster analysis.
|
Video processor method has been used to compare difference versions of same video to spot VFX changes.
https://forum.cockos.com/showthread.php?t=204568
I wonder if that process could also be made quicker using ffprobe/ffmpeg? Instead of comparing to last frame you comparing to another video. You could put markers where they differ.
|
|
|
05-14-2019, 06:35 AM
|
#42
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,716
|
Quote:
Originally Posted by X-Raym
@dysrock
You will have to write your own functions, based on pixel difference from one frame to another... That why it just 'in theory'.
But there is no real advantage of having this in video processor : you will be limited by playback speed, while ffprobe (used in this script) can do way faster analysis.
|
Edit: moved this to https://forum.cockos.com/showthread.php?t=220900
Last edited by Justin; 05-14-2019 at 07:32 AM.
|
|
|
05-14-2019, 09:26 PM
|
#43
|
Human being with feelings
Join Date: Aug 2016
Posts: 91
|
Awesome work!
I was testing with a video that had a lot of bright flashing which was triggering the cuts, but I think generally it will save a good amount of time.
|
|
|
05-15-2019, 02:20 AM
|
#44
|
Human being with feelings
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
|
Quote:
Originally Posted by Sonorityscape
Awesome work!
I was testing with a video that had a lot of bright flashing which was triggering the cuts, but I think generally it will save a good amount of time.
|
I wonder if the script should have a minimum time before next detection to help with this then?
Also, it's definitely a scene rather than shot detector but that's still very useful!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
|
|
|
05-17-2019, 08:53 PM
|
#45
|
Human being with feelings
Join Date: Sep 2018
Location: China
Posts: 564
|
Quote:
Originally Posted by mrlimbic
It's basically set to 40% of change in colour space since last frame. I could make that a tweakable parameter. For some videos it may not work well at all not matter what threshold you set. Fades will never work well I think.
|
I have a question about ffprobe. As you said, the script base on the detection of change in colour space. There are so many values in the result of -show_frames. So do you know which value does ffprobe actually comparing and tell their difference?
Last edited by dsyrock; 05-17-2019 at 10:36 PM.
|
|
|
05-26-2019, 12:40 PM
|
#46
|
Human being with feelings
Join Date: Aug 2011
Posts: 508
|
Awesome script. Thanks!!
So, what is exactly needed to add the thumbnails?
|
|
|
06-01-2019, 07:31 PM
|
#47
|
Human being with feelings
Join Date: May 2011
Location: Nashville
Posts: 360
|
I just tried this out for the first time and WOW! This is incredible. I've been wanting this for a looooong time.
What is the likelihood of some type of sensitivity threshold parameter settings being added? I just did detection for a 90min feature and it got most everything correctly, but maybe 10% of the film has scene cuts that FFProbe missed.
|
|
|
06-02-2019, 12:39 AM
|
#48
|
Human being with feelings
Join Date: Nov 2009
Location: UK
Posts: 669
|
Quote:
Originally Posted by analogexplosions
I just tried this out for the first time and WOW! This is incredible. I've been wanting this for a looooong time.
What is the likelihood of some type of sensitivity threshold parameter settings being added? I just did detection for a 90min feature and it got most everything correctly, but maybe 10% of the film has scene cuts that FFProbe missed.
|
Threshold is currently set to .4 (40%) but I could make it easier to change.
The relevant lines are 123 (mac) and 127 (windows) if you want to hack it.
Code:
-show_frames -of compact=p=0 -f lavfi 'movie=%s,select=gt(scene\\,.4)' > %s && mv %s %s &
the select=gt(scene\\,.4) part determines the threshold.
EDIT: You will also need to delete the scene cut list text file in the project folder to refresh the list.
Last edited by mrlimbic; 06-02-2019 at 05:39 AM.
|
|
|
06-02-2019, 10:19 PM
|
#49
|
Human being with feelings
Join Date: May 2011
Location: Nashville
Posts: 360
|
Quote:
Originally Posted by mrlimbic
Threshold is currently set to .4 (40%) but I could make it easier to change.
The relevant lines are 123 (mac) and 127 (windows) if you want to hack it.
Code:
-show_frames -of compact=p=0 -f lavfi 'movie=%s,select=gt(scene\\,.4)' > %s && mv %s %s &
the select=gt(scene\\,.4) part determines the threshold.
EDIT: You will also need to delete the scene cut list text file in the project folder to refresh the list.
|
Hot.
I also have Nuendo, not sure what method they are using for its cut detection, but 70-80% seemed to be the sweet spot that caught everything.
|
|
|
05-27-2020, 07:17 PM
|
#50
|
Human being with feelings
Join Date: Oct 2019
Posts: 2
|
Hey @mrlimbic, first off: This script is awesome! Good job!
Also, is there any ETA on Thumbnails for the analyzed video scenes? That's like the one feature I'm missing from working in Logic all those years ago.
Thanks for sharing these awesome workflow savers!
|
|
|
05-27-2020, 07:43 PM
|
#51
|
Human being with feelings
Join Date: Nov 2009
Location: UK
Posts: 669
|
Quote:
Originally Posted by PabloSorribes
Hey @mrlimbic, first off: This script is awesome! Good job!
Also, is there any ETA on Thumbnails for the analyzed video scenes? That's like the one feature I'm missing from working in Logic all those years ago.
Thanks for sharing these awesome workflow savers!
|
I did try but at the time it was not easily doable as thumbnails looked really strange due to scaling.
https://forum.cockos.com/showthread.php?t=216516
However since then a prefs option to scale better for thumbnail purposes has been added to reaper.
I don't have an ETA on any scripts as I can't work on that much at the moment. But I probably could update some scripts & FX after Vordio 6.0 is out (so hopefully not long).
I suspect for thumbnailing/preview like you'd see typically in an NLE you should probably cut evenly on time, not based on scene changes.
That might be better done with a different script.
|
|
|
05-28-2020, 01:46 PM
|
#52
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Last edited by juliansader; 12-18-2020 at 03:16 PM.
|
|
|
05-28-2020, 01:59 PM
|
#53
|
Human being with feelings
Join Date: Nov 2009
Location: UK
Posts: 669
|
Quote:
Originally Posted by juliansader
|
That's great. Thanks. Do you put your scripts in Reapack so they are easier to install/update?
|
|
|
05-29-2020, 08:35 AM
|
#54
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Quote:
Originally Posted by mrlimbic
Do you put your scripts in Reapack so they are easier to install/update?
|
I do!
|
|
|
05-29-2020, 09:08 AM
|
#55
|
Human being with feelings
Join Date: Oct 2019
Posts: 229
|
Quote:
Originally Posted by mrlimbic
|
Many thanks for sharing @mrlimbic , it looks quite useful !
|
|
|
01-30-2021, 08:24 AM
|
#56
|
Human being with feelings
Join Date: Jun 2020
Posts: 7
|
Hey folks.
I've ben playing with MrLimbic's script and have found that 20% threshold gives great results, catching every cut without going too crazy during action sequences.
Happy to share the LUA if you wanna PM me..... thanks again to MrLimbic for putting this together!
Last edited by magrotten; 01-30-2021 at 08:57 AM.
|
|
|
11-28-2021, 09:12 AM
|
#57
|
Human being with feelings
Join Date: Jun 2021
Location: Moscow, Russia
Posts: 278
|
The script works for me wonderfully too. But little thing makes me sad - it cuts not by exact frames, it's close but not precisely, it cuts not further than a half of frame(tried with mp4 and dnxhd 25fps video). If it could be fixed somehow it would be very appreciated! Thanks a lot mrlimbic! I'll make a donation anyway, the most needed script in my post production work! And yes, value "2" is just perfect!
|
|
|
11-28-2021, 09:22 AM
|
#58
|
Human being with feelings
Join Date: Nov 2009
Location: UK
Posts: 669
|
Quote:
Originally Posted by McSound
The script works for me wonderfully too. But little thing makes me sad - it cuts not by exact frames, it's close but not precisely, it cuts not further than a half of frame. If it could be fixed somehow it would be very appreciated! Thanks a lot mrlimbic! I'll make a donation anyway, the most needed script in my post production work! And yes, value "2" is just perfect!
|
The script uses ffprobe to find the cuts. Unfortunately by default times are reported back in seconds. I think it only counts time per block of tramsport stream data not necessarily exact frames.
I'll see if it is possible to force times from exact frame counting instead. There may be filters/parameters that can do it more precisely.
|
|
|
11-28-2021, 10:17 AM
|
#59
|
Human being with feelings
Join Date: Jun 2021
Location: Moscow, Russia
Posts: 278
|
In that case the additional script that moves cuts to the nearest frame would be enough I think. If it's not very difficult for you - just tell me how much it would cost? I'll add this to my donation for scene detection script. I assure you it's important to me to have this script working the best way.
Also a side question to you as expert of ffmpeg: Is there any way to make Reaper plays video through Blackmagic Decklink card? I've tried some ways but unlucky.
Last edited by McSound; 11-28-2021 at 10:22 AM.
|
|
|
11-28-2021, 04:17 PM
|
#60
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Quote:
Originally Posted by McSound
Also a side question to you as expert of ffmpeg: Is there any way to make Reaper plays video through Blackmagic Decklink card? I've tried some ways but unlucky.
|
The devs are currently working on this in the pre-releases -- please check it out. I'm sure they would appreciate feedback about compatibility with different cards.
|
|
|
11-29-2021, 04:08 AM
|
#61
|
Human being with feelings
Join Date: Jun 2021
Location: Moscow, Russia
Posts: 278
|
Wonderful news! It can't believe it's happening! Could you give me the link to that, please? I've searched all prerelease threads but couldn't find info about blackmagic cards support (
|
|
|
11-29-2021, 04:20 PM
|
#62
|
Human being with feelings
Join Date: Dec 2019
Posts: 587
|
can't wait
|
|
|
11-30-2021, 02:45 AM
|
#63
|
Human being with feelings
Join Date: Jun 2021
Location: Moscow, Russia
Posts: 278
|
mrlimbic: Sorry, but I've just added a line in your code
local cut = tonumber(cols["pkt_dts_time"]) - videoOffset -- your line
cut = reaper.BR_GetClosestGridDivision(cut) -- my new line
And instantly it cuts on exact frames. Done!
|
|
|
06-24-2022, 03:17 AM
|
#64
|
Human being with feelings
Join Date: Apr 2022
Posts: 17
|
This is a real life saver!
But when I try to run the script is says: C:\Users\Gian\Desktop\detect scenes.lua:155: attempt to call a nil value (field 'ULT_SetMediaItemNote')
|
|
|
06-24-2022, 03:49 AM
|
#65
|
Human being with feelings
Join Date: Nov 2009
Location: UK
Posts: 669
|
Quote:
Originally Posted by brkncd
This is a real life saver!
But when I try to run the script is says: C:\Users\Gian\Desktop\detect scenes.lua:155: attempt to call a nil value (field 'ULT_SetMediaItemNote')
|
It requires SWS extensions installed. Is it?
Also just noticed this on SWS webpage which may have affected this script - "Deprecate ULT_GetMediaItemNote and ULT_SetMediaItemNote (use GetSetMediaItemInfo_String instead)"
|
|
|
06-24-2022, 03:49 AM
|
#66
|
Human being with feelings
Join Date: Nov 2009
Location: UK
Posts: 669
|
Quote:
Originally Posted by McSound
mrlimbic: Sorry, but I've just added a line in your code
local cut = tonumber(cols["pkt_dts_time"]) - videoOffset -- your line
cut = reaper.BR_GetClosestGridDivision(cut) -- my new line
And instantly it cuts on exact frames. Done!
|
Thanks. I'll add that to the script and push an update to reapack.
|
|
|
06-24-2022, 09:59 PM
|
#67
|
Human being with feelings
Join Date: Apr 2022
Posts: 17
|
Quote:
Originally Posted by mrlimbic
It requires SWS extensions installed. Is it?
Also just noticed this on SWS webpage which may have affected this script - "Deprecate ULT_GetMediaItemNote and ULT_SetMediaItemNote (use GetSetMediaItemInfo_String instead)"
|
Oh, I'm sorry, I thought I read all the messages and descriptions, but I think I've missed the part where it says that SWS extensions are required!
Now it works, but it creates an empty clips with no markers or scene splitting. Am I missing something else perhaps? Thank you so much
|
|
|
06-25-2022, 06:24 AM
|
#68
|
Human being with feelings
Join Date: Jun 2021
Location: Moscow, Russia
Posts: 278
|
These empty clips are indeed scenes of video. Every clip is new video scene. What else? If you want your video be splitted by these items edges - there must be a script for that.
Oh, btw, I changed default detection parameter from 2 to 1 cause of better scene detection(when 2 some scenes change were skipped and considered as one scene). Though it had nasty habit of making 1 or 2 frame cut in the beginning of some new scenes. I solved it by inserting some code in the script that stops creating cuts if its length less than 2 frames. Works fast as a lightning! Thanks again mrlimbic for that wonderful script!
Just to compare - in Nuendo 11 video scene detection takes about 30-40 minutes for 90 minutes video. In Reaper the same video scene detection takes about 1,5 minutes with your script! Ha!
Last edited by McSound; 06-25-2022 at 06:44 AM.
|
|
|
06-27-2022, 12:03 PM
|
#69
|
Human being with feelings
Join Date: Apr 2022
Posts: 17
|
Quote:
Originally Posted by McSound
These empty clips are indeed scenes of video. Every clip is new video scene. What else? If you want your video be splitted by these items edges - there must be a script for that.
|
The video is more than 2 mins long with many scenes and only one scene at the beginng of the video was cutted. Could it be an issue with the "threshold" the script has to determine when a scene is changed?
The video I tried is the following: https://www.youtube.com/watch?v=Nv9nUNw5OLY
|
|
|
06-28-2022, 10:27 PM
|
#70
|
Human being with feelings
Join Date: Jun 2021
Location: Moscow, Russia
Posts: 278
|
Maybe yes. You should try to change sensivity of scene difference(there's parameter in the script. It's 2 by default. Change it to 1 and try again) Btw your video is mostly of grey tones and the script based on color difference of scene detecting. Maybe that's the case of low detection.
mrlimbic, could ffmpeg have other scene detection ways than by color? Just for the cases like this?
|
|
|
06-29-2022, 01:15 AM
|
#71
|
Human being with feelings
Join Date: Apr 2022
Posts: 17
|
Quote:
Originally Posted by McSound
Maybe yes. You should try to change sensivity of scene difference(there's parameter in the script. It's 2 by default. Change it to 1 and try again) Btw your video is mostly of grey tones and the script based on color difference of scene detecting. Maybe that's the case of low detection.
mrlimbic, could ffmpeg have other scene detection ways than by color? Just for the cases like this?
|
Thank you so much, I'll try tweak the script a bit. I hope I won't break anything, but I can't promise that
|
|
|
06-30-2022, 12:25 PM
|
#72
|
Human being with feelings
Join Date: Jun 2021
Location: Moscow, Russia
Posts: 278
|
Look for this piece of code:
....local arguments = " -show_frames -of compact=p=0 -f lavfi 'movie=%s,select=gt(scene\\,.2)' > %s && mv %s %s &"
if windows then
file = file:gsub("", "/")
file = file:gsub(":", "\\:")
arguments = [[ -show_frames -of compact=p=0 -f lavfi "movie='%s',select=gt(scene\,.2)" > %s && move %s %s &]]....
Don't be afraid) Change these both two places of ",.2" in the script to ",.1"
|
|
|
07-05-2022, 02:24 AM
|
#73
|
Human being with feelings
Join Date: Apr 2022
Posts: 17
|
Quote:
Originally Posted by McSound
Look for this piece of code:
....local arguments = " -show_frames -of compact=p=0 -f lavfi 'movie=%s,select=gt(scene\\,.2)' > %s && mv %s %s &"
if windows then
file = file:gsub("", "/")
file = file:gsub(":", "\\:")
arguments = [[ -show_frames -of compact=p=0 -f lavfi "movie='%s',select=gt(scene\,.2)" > %s && move %s %s &]]....
Don't be afraid) Change these both two places of ",.2" in the script to ",.1"
|
Thank you so much once again, very useful
|
|
|
08-03-2022, 08:37 PM
|
#74
|
Human being with feelings
Join Date: Feb 2017
Location: Hollywood, CA
Posts: 125
|
Quote:
Originally Posted by mrlimbic
Thanks. I'll add that to the script and push an update to reapack.
|
I can't find this script on ReaPack, is it still available??
|
|
|
08-04-2022, 02:57 PM
|
#76
|
Human being with feelings
Join Date: Feb 2017
Location: Hollywood, CA
Posts: 125
|
Thanks, I didn't realize that was necessary, TIL.
|
|
|
08-11-2022, 02:06 AM
|
#77
|
Human being with feelings
Join Date: Apr 2022
Posts: 17
|
I would like to ask, has anyone ever tried to use the created .txt with the detected scenes in any cool way? Is it possible to use it for something?
|
|
|
02-09-2023, 11:28 AM
|
#78
|
Human being with feelings
Join Date: Jan 2020
Location: Canada
Posts: 84
|
Quote:
Originally Posted by McSound
Look for this piece of code:
....local arguments = " -show_frames -of compact=p=0 -f lavfi 'movie=%s,select=gt(scene\\,.2)' > %s && mv %s %s &"
if windows then
file = file:gsub("", "/")
file = file:gsub(":", "\\:")
arguments = [[ -show_frames -of compact=p=0 -f lavfi "movie='%s',select=gt(scene\,.2)" > %s && move %s %s &]]....
Don't be afraid) Change these both two places of ",.2" in the script to ",.1"
|
Heeeeeeeey!!! That worked like a charm!!!! I wish I could contribute and create a UI to tweak this parametere on the fly. Is there some ressouces some people could point out for someone who wants to start learning this? (Or I'll just ChatGPT it!)
I also want to thank you mrlimbic for Vordio 6 in general. Excellent tool that saved my a** recently.
|
|
|
09-05-2023, 04:20 AM
|
#79
|
Human being with feelings
Join Date: Sep 2021
Posts: 4
|
Hi there
I do post in reaper, and would love to have a tool like this !
Bur when i run it I only get one file ( no cuts ) :-(
any ideas ?
thanks
Last edited by Thomas Richard; 09-05-2023 at 04:36 AM.
|
|
|
09-06-2023, 04:34 AM
|
#80
|
Human being with feelings
Join Date: Nov 2009
Location: UK
Posts: 669
|
Quote:
Originally Posted by Thomas Richard
Hi there
I do post in reaper, and would love to have a tool like this !
Bur when i run it I only get one file ( no cuts ) :-(
any ideas ?
thanks
|
One file? It doesn't cut the file just creates empty items. Do you mean one long item/clip?
If so then sensitivity is wrong. It detects cuts based on % change between frames. So things like video crossfades won't be detected because change is not much. What kind of video is it?
You can change sensitivity using tip above.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 02:27 AM.
|