I want to detect scene change with no audio using ffmpeg in window. I want a single command to detect at which point scene changed as well as no audio is there.
Asked
Active
Viewed 455 times
0
-
From the question it is not clear, what you actually want. What exactly do you mean by scene change? Do you want to know a frame number? What is the relation with audio? – micha137 Jun 11 '18 at 08:34
-
Actually i want to get diiferent parts in a running video. So, to differentiate the parts in a video. I am thinking of fetching scene chnage and audio silence together as fade in and fade out – Amit Singh Jun 11 '18 at 08:46
2 Answers
0
May be you can check how motion is doing this.
Motion is a camera monitor which detect activities.

Olivier Cazade
- 777
- 5
- 10
0
You can simply use the command:
ffmpeg inputvideo.mp4 -filter_complex "select='gt(scene,0.3)',metadata=print:file=time.txt" -vsync vfr img%03d.png
This will save just the relevant information in the time.txt file like below:
frame:0 pts:108859 pts_time:1.20954
lavfi.scene_score=0.436456
frame:1 pts:285285 pts_time:3.16983
lavfi.scene_score=0.444537
frame:2 pts:487987 pts_time:5.42208
lavfi.scene_score=0.494256
frame:3 pts:904654 pts_time:10.0517
lavfi.scene_score=0.462327
frame:4 pts:2533781 pts_time:28.1531
lavfi.scene_score=0.460413
frame:5 pts:2668916 pts_time:29.6546
lavfi.scene_score=0.432326
The frame is the serial number of the detected shot change from the starting. Also, choose your threshold value (here 0.3) appropriately for your use case to get correct outputs

Legolas
- 653
- 1
- 9
- 17