The FFmpeg command with the -ss option fails on .flv files

I use FFmpeg to extract a screenshot from a video with the following command

/usr/bin/ffmpeg -ss 15 -y -i test.flv -vcodec mjpeg -vframes 1 -an -f rawvideo test.png 

But the team does not work. Last 3 lines of answer

 frame= 0 fps= 0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate= 0.0kbits/s video:0kB audio:0kB global headers:0kB muxing overhead -nan% Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used) 

Please note that the command runs successfully for other types of videos (3gp, mp4).

In addition, when I replace the "-ss 15" parameter with "itsoffset 15", it also starts successfully with FLV files.

Does anyone know why the -ss option does not work for .flv files?

+6
source share
3 answers

In newer versions of ffmpeg, the -ss and -t must come after -i [filename] .

+7
source

This may be a syntax issue. The following should work fine:

/usr/bin/ffmpeg -ss 15 -y -i test.flv -frames:v 1 -an test.png

Please note that I deleted the codec and format options. I donโ€™t think it would be wise to force mjpeg to png to continue, and flv is not a rawvideo format.

+1
source

U you need to set the video format options (EX: -preset ultrafast -s 1366x768 -r 10 -b:v 555k -crf 45 -vcodec libx264 -threads 0 -pix_fmt yuv420p)

I had the same problem when part of the video was cut out, -c:v copy just gives the warning mentioned and nothing happens.

0
source

All Articles