其他分享
首页 > 其他分享> > FFmpeg命令

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"

 

标签:map,FFmpeg,pref,ifnb,yuv,命令,mp4,ifn
来源: https://www.cnblogs.com/sinferwu/p/14644881.html