1

I have couple of video files with sudden transition from black frame to blue frame, both frames have burned-in frame numbers, I would like to use ffmpeg to define the timestamp of this transition in order to automate the cutting of these files. Is there a possibility to do that. I guess I can either do it with some form of scene detection or by using OCR tool to check the frame number of the current frame and then extract the timestamp.

1

See signalstats filter description, it works in YUV colorspace only. With it one can extract various per frame video statistics and even graph it in real time.

  • actually I have extracted the first frame after the change of the scene/background and then I am running a PSNR script to evaluate the average PSNR of the video files against the first frame. Afterwards I am extracting the frame number and multiplying it with the duration of the frame (1/fps) and cutting the video file at exactly this file. In case the video is not consisted of all I-frames, then you need also to convert it using some intra-frame codec like ffv1. I can share the commands if this is of interest for someone. – Georgе Stoyanov Jun 1 '18 at 9:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.