7

I am using FFmpeg to extract 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 command fails. Last 3 lines of the response are

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) 

Note that command runs successfully for other video types (3gp, mp4).

Also, when I replace "-ss 15" option with "itsoffset 15" it runs successfully with flv files as well.

Does anybody know why -ss option doesn't work for .flv files?

2
  • Complete ffmpeg console output is missing. Commented Jan 8, 2013 at 20:11
  • -ss option is working for me: ffmpeg -ss 5s -i input.flv -t 5s output.flv, skips 5 seconds and gives me 5 seconds output video. but my ffmpeg is actually avconv. Commented May 5, 2013 at 2:18

3 Answers 3

10

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

Sign up to request clarification or add additional context in comments.

2 Comments

But note that the position of -ss can be either before or after -i, they serve different purposes. Read here for more: trac.ffmpeg.org/wiki/Seeking
Worked in ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
1

It might be a syntax issue. The following should work just fine:

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

Notice i removed the codec and the format parameters. I don't think it's wise to force mjpeg on a png continuer & flv is not a rawvideo format

Comments

0

U need to set 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 issue when was cutting part from video, -c:v copy simply gives mentioned warning and nothing happens.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.