我有一个输入视频文件。 做完之后
ffprobe input.mp4
我得到以下信息:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42mp41
creation_time : 2018-01-20T03:43:28.000000Z
Duration: 00:08:55.62, start: 0.000000, bitrate: 3781 kb/s
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 3588 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
Metadata:
creation_time : 2018-01-20T03:43:28.000000Z
handler_name : Alias Data Handler
encoder : AVC Coding
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
Metadata:
creation_time : 2018-01-20T03:43:28.000000Z
handler_name : Alias Data Handler
我正在尝试通过以下命令将视频像素格式更改为8位单通道灰度:
ffmpeg -i input.mp4 -pix_fmt gray output.mp4
然后我要检查
ffprobe output.mp4
得到
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.79.100
Duration: 00:08:55.60, start: 0.000000, bitrate: 5589 kb/s
Stream #0:0(eng): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuvj444p(pc), 1920x1080, 5578 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 2 kb/s (default)
Metadata:
handler_name : SoundHandler
因此,正如我所看到的,像素格式没有更改为8位单通道灰度。
该怎么做?