lars.schwarz
lars.schwarz

Reputation: 1274

Extract single frame based on position provided by subtitle/srt file and generate video of extracted stills

I'm looking into doing something that probably can't be done with simple ffmpeg cli commands:

  1. Extract single frames from video based on a provided srt file

  2. Generate a new video (same length as the original) but generated from the still images extracted with 1.

Example:

Video is 1 minute, srt file holds 2 subtitles at 00:00:15 and 00:00:25.

Extract 2 stills/frames and save them as still_00_00_15.jpg and still_00_00_25.jpg

Generate a new video that is 1 minute and only consits of these 2 images on their respective/original timestamps so the generated video of still images can be used with the original srt file.

Is this something that can be achieved using just ffmpeg cli or should I build it using pyffmpeg? More importantly: is there a name for this type of process and existing tools/libs for doing something like that or is this something so uncommong I need to build it myself anyway?

Upvotes: 0

Views: 152

Answers (1)

lars.schwarz
lars.schwarz

Reputation: 1274

Answering my own question: Piece of cake thanks to pysrt and moviepy

Upvotes: 0

Related Questions