1

My goal is to use FFMPEG to record a livestream while also segmenting the stream into scenes using the built-in scene detection and saving them as MP4s. I've found a few helpful SO answers that get me close but not what I need. FFMPEG has so many flags and the docs are tough to navigate though. What I've tried so far:

this answer and this answer helped me a bunch and I modified it slightly to copy the entire stream without segmenting, but im hoping to modify it to write mp4s instead of pngs:

ffmpeg -i 'http://live.cgtn.com/500/prog_index.m3u8' \
    -map 0:v -map 0:a -c:v copy -c:a copy -f matroska "output.mkv" \
    -map 0:v -an -filter:v "select='gt(scene,0.3)'" -vsync 0 -strftime 1 "%Y%m%d%H%M%S_scenechange.png"

this gives me screenshots of scene changes but i want videos. I'm using a livestream of a news channel to test with.

is it even possible to do what I'm asking?

Brodan
  • 152
  • 1
  • 18

0 Answers0