开发者

rawvideo and rgb32 values passed to FFmpeg

开发者 https://www.devze.com 2023-03-31 20:11 出处:网络
I\'m converting a file to PNG format using this call: ffmpeg.exe -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgb32 -s <width>x<height> -i infile -f image2 -vcodec png out.png

I'm converting a file to PNG format using this call:

ffmpeg.exe -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgb32 -s <width>x<height> -i infile -f image2 -vcodec png out.png

I want to use a converter that can be linked or compiled into a closed-source commercial product, unlike FFmpeg, so I need to understand the format of the input file I'm passing in.

开发者_运维问答

So, what does rawvideo mean to FFmpeg?

Is FFmpeg determining what type of raw format the input file has, or does rawvideo denote something distinct?

What does rgb32 mean here?

The size of the input file is a little more than (width * height * 8) bytes.


Normally a video file contains a video stream (whose format is specified using -vcodec), embedded in a media container (e.g. mp4, mkv, wav, etc.). The -f option is used to specify the container format. -f rawvideo is basically a dummy setting that tells ffmpeg that your video is not in any container.

-vcodec rawvideo means that the video data within the container is not compressed. However, there are many ways uncompressed video could be stored, so it is necessary to specify the -pix_fmt option. In your case, -pix_fmt rgb32 says that each pixel in your raw video data uses 32 bits (1 byte each for red, green, and blue, and the remaining byte ignored).

For more information on what the options mean, see the ffmpeg documentation.

0

精彩评论

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