如何使用ffmpeg [英] how to use ffmpeg

查看:150
本文介绍了如何使用ffmpeg的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从视频中提取帧..我选择ffmpeg(告诉我,如果你知道更好的东西)这个任务

i下载它的来源..我不知道如何使用它?我如何编译它?

什么是推荐的语言?我知道python和C ++

请注意,我使用Windows Vista 64x。

im trying to extract frames from a video .. and i picked ffmpeg ( tell me if you know something better ) for this task
i downloaded it's source .. and i don't know how to use it ?? how do i compile it ??
what is the recommended language for it ?? i know python and C++
please note that i use windows vista 64x .

推荐答案

如果你只是想从视频中提取帧并将其保存到文件中,您可以在命令行中使用ffmpeg:

If you just want to extract the frames from a video and save them to file, you can just use ffmpeg at the command line:

ffmpeg -i video.avi image%d.jpg

对于这种方法,您不需要像那里一样构建ffmpeg应该是可以下载的Windows二进制文件。

For this method, you do not need to build ffmpeg as there should be a windows binary available for download.

如果要显示框架或对其执行其他处理,可能需要使用libavformat和libavcodec(main ffmpeg项目的一部分)以代码提取视频帧。 这里是一个很好的教程,介绍如何使用libavcodec和libavformat从视频中获取帧。 libavformat和libavcodec是C库,所以如果你想直接连接到它们,我将使用C或C ++。对于ffmpeg来说,这个python包装器看起来很有前途,但我还没有尝试过。

If you are wanting to display the frames or perform some other processing on them, you may want to use libavformat and libavcodec (main parts of the ffmpeg project) to extract the video frames in code. Here is a pretty good tutorial on how to get frames from a video using libavcodec and libavformat. libavformat and libavcodec are C libraries so I would use C or C++ if you want to interface directly to them. There is this python wrapper for ffmpeg that looks promising, but I haven't tried it.

您还可以下载编译的ffmpeg库,因此您不必自己构建它们。 ffmpeg不会根据文档在MSVC ++上构建,因此您必须设置一个mingw环境。 本网站有很多关于如何构建的Windows构建和教程如果你真的想图书馆。

You can download the compiled ffmpeg libraries as well so you shouldn't have to build them yourself. ffmpeg will not build on MSVC++ as per the documentation so you would have to set up a mingw environment. This site has a lot of Windows builds and tutorials on how to build the libraries if you really want to.

这篇关于如何使用ffmpeg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆