【发布时间】:2013-08-10 16:01:36
【问题描述】:
我想每秒从视频中创建缩略图,但由于某种原因mplayer 会跳过帧。
例如,在2mn 49s duration 的视频中,我只有 59 个缩略图而不是 169 个
我尝试过的:
mplayer -nosound -vo jpg:outdir=. -sstep 1 file.flv
媒体信息文件.flv
General
Complete name : file.flv
Format : Flash Video
File size : 12.6 MiB
Duration : 2mn 49s
Overall bit rate : 626 Kbps
Tagging application : Yet Another Metadata Injector for FLV - Version 1.8
Video
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.0
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : 7
Duration : 2mn 48s
Bit rate : 555 Kbps
Width : 704 pixels
Height : 396 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 30.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.066
Stream size : 11.2 MiB (89%)
Writing library : x264 core 125
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=48 / lookahead_threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=abr / mbtree=1 / bitrate=555 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
【问题讨论】:
-
在 Windows 上查看这个问题我也遇到了一个问题,sstep 的行为很奇怪......但可能与此相反。我的示例视频是 3:07(187 秒),但第 71 个以上的缩略图是结束帧。在我的情况下,我想要 X(嗯,10)个视频,所以我将总时间除以 X,四舍五入并将其设置为 sstep。然后我将最大帧数设置为 X。
mplayer -nosound -vo jpeg:outdir=thumbnails -sstep 18 -frames 10 video.mp4我不再得到空帧
标签: linux video ffmpeg thumbnails mplayer