如何使用ffmpeg通过单个命令从流中提取关键帧和p帧


0

我想同时使用ffmpeg从电视流中提取两种帧。

我的问题是如何使用一个命令获得两个I和P帧?

例如:获取ffmpeg中所有关键帧的命令:

ffmpeg -i http://my-tv-stream.m3u8 -vf "select=eq(pict_type\,I)" -vsync vfr -qscale:v 2 thumbnails-%02d.jpeg

Answers:


1

使用

ffmpeg -i http://my-tv-stream.m3u8 -vf "select='eq(pict_type\,I)+eq(pict_type\,P)'" -vsync vfr -qscale:v 2 thumbnails-%02d.jpeg

要单独输出帧类型,请使用

ffmpeg -i http://my-tv-stream.m3u8 -vf "select='eq(pict_type\,I)" -vsync vfr -qscale:v 2 I-thumbnails-%02d.jpeg
       -vf "select='eq(pict_type\,P)" -vsync vfr -qscale:v 2 P-thumbnails-%02d.jpeg

我也忘了问这个问题。如何通过帧类型指示输出图像的类型呢?
— Seyed Vahid Hashemi 2016年

编辑回答。
— Gyan 2016年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.