开发者

Extract FLV Frame with FFmpeg - Supported Format

开发者 https://www.devze.com 2023-01-13 07:39 出处:网络
I\'ve searched for many topics through stackoverflow and found many good solutions. For example, when trying to extract a single frame from a video, i use this code:

I've searched for many topics through stackoverflow and found many good solutions. For example, when trying to extract a single frame from a video, i use this code:

ffmpeg -i video.mpg -f image2 -vframes 1 -ss 00:00:01 -y -s picture.png

and this will give a picture.png with the first frame of the video. The problem is, when i try to do the same with FLV files i get an error called:

[flv @ 0x5597b8] Unsupported video codec (7)
[flv @ 0x5597b8] Unsupported audio codec (a)
[flv @ 0x5597b8] skipping flv packet: type 250, size 758, flags 0
[flv @ 0x5597b8] Could not find codec parameters (Video: 0x0007)

So my question is, how can i add support for this?开发者_如何学编程 Where should i look?

Please help me, thanks.


Try this line

ffmpeg -i video.flv -an -vcodec png -vframes 1 -ss 00:00:01 -y picture.png

One thing I noticed is that you have "-s" but no dimension? That option is for resizing so it needs something like "-s 320x240"

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号