gpt4 book ai didi

select - ffmpeg "select"过滤器不适用于 MPEG-4 和 "-vcodec copy"

转载 作者:行者123 更新时间:2023-12-04 22:56:22 27 4
gpt4 key购买 nike

我有一个 MPEG-4 视频,mediainfo描述为:

Format                                   : MPEG-4
Format profile : Base Media
Codec ID : isom
Overall bit rate : 6 772 Kbps
Writing application : Lavf54.6.100

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Bit rate : 25.0 Mbps
Frame rate mode : Constant
Frame rate : 29.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.554
Stream size : 500 MiB (98%)
Writing library : x264 core 125
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / nalyse=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=12 / lookahead_threads=2 / 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=25000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00

(我删除了一些无用的信息)

我想做的是从视频中删除第一个,比如 200 帧。

但是,如果我尝试使用 ffmpeg (版本 0.11.1,从源代码编译)
ffmpeg -i video.mp4 -vf select='gte(n\,200)' -vcodec copy -strict -2 out.mp4

它不起作用,框架完全相同。如果我删除 -vcodec copy部分,发生的是前 190 帧都是相同的(等于第 190 帧);所以,它们并没有被删除,而是被第 190 个取代。

如果我尝试 select过滤器从视频中提取单个图像,使用
ffmpeg -i video.mp4 -vf "select=gte(n\,200)" %d.jpg

它工作正常。

有人知道为什么会这样吗?

谢谢!

最佳答案

你不能stream copy-vcodec copy并同时使用视频滤镜。如果要执行过滤,则必须重新编码。

如果要流式复制前 200 帧:

ffmpeg -i input -frames:v 200 -codec copy output.mkv

关于select - ffmpeg "select"过滤器不适用于 MPEG-4 和 "-vcodec copy",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19795771/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com