J
J
jtag2019-08-03 19:12:05
fmpeg
jtag, 2019-08-03 19:12:05

How to save a screenshot from an rtsp stream?

When saving a screenshot using the ffmpeg library, 20% of the screenshots are not saved correctly, how can I fix this? Raspberry pi3, OS raspbian, using nodejs, fluent-ffmpeg module.

var ffmpeg = require('fluent-ffmpeg');
var command = ffmpeg();
var proc = ffmpeg('rtsp://192.168.0.6:8554/')
        .outputOptions(['-f image2', '-vframes 1', '-vcodec png', '-f rawvideo', '-s 320x240', '-ss 00:00:01'])
        .output('/home/pi/Documents/rtsp/img.png')
        .run();

5d45b24bac431588260075.jpeg
5d45b252901c1596310735.jpeg

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question