FFmpeg命令

2021/4/11 18:56:26

本文主要是介绍FFmpeg命令,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

 

ffmpeg -pix_fmt nv12 -s 1920x1080 -i input.yuv -vf scale=1280x720 -c:v rawvideo -pix_fmt nv12 -y output.yuv 

 

 

提取YUV分量

ffmpeg -s 1280x720 -pix_fmt nv12 -i output.yuv -filter_complex "extractplanes=y+u+v[y][u][v]" -an -map '[y]' "y.yuv" -map '[u]' "u.yuv" -map '[v]' "v.yuv"

 

 

 

https://hhsprings.bitbucket.io/docs/programming/examples/ffmpeg/manipulating_video_colors/extractplanes.html

ifn="Pexels_2877_2880.mp4"
ifnb="`basename \"${ifn}\" .mp4`"
pref="`basename $0 .sh`"

#
ffmpeg -y -i "${ifn}" \
  -filter_complex "extractplanes=y+u+v[y][u][v]" \
  -an \
  -map '[y]' "${pref}_${ifnb}_y.mp4" \
  -map '[u]' "${pref}_${ifnb}_u.mp4" \
  -map '[v]' "${pref}_${ifnb}_v.mp4"

 

#! /bin/sh
ifn="Pexels_2877_2880.mp4"
ifnb="`basename \"${ifn}\" .mp4`"
pref="`basename $0 .sh`"

#
ffmpeg -y -i "${ifn}" \
  -filter_complex "format=rgb24,extractplanes=r+g+b[r][g][b]" \
  -an \
  -map '[r]' "${pref}_${ifnb}_r.mp4" \
  -map '[g]' "${pref}_${ifnb}_g.mp4" \
  -map '[b]' "${pref}_${ifnb}_b.mp4"

 



这篇关于FFmpeg命令的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程