Documentation ¶
Index ¶
- Constants
- func Concat(filePath, dst string) error
- func GetFrame(src string, f Frame) error
- func H264ToH265(filePath, dst string) error
- func ImgToAvif(filePath, dst string) error
- func ImgToHeif(filePath, dst string) error
- func ImgToJxl(filePath, dst string) error
- func ImgToWebp(filePath, dst string) error
- func ImgToWebp2(filePath, dst string) error
- func ImgToWebpWithOptions(filePath, dst string, quality int) error
- func ResizeImg(filePath, dst string) error
- func TransferFormat(filePath, dst string) error
- func TransferFormatGPU(filePath, dst string) error
- type Frame
Constants ¶
View Source
const CommonCmd = `ffmpeg -i %s `
View Source
const ConcatCmd = `ffmpeg -f concat -safe 0 -i %s -c copy -y %s`
View Source
const GetFrameCmd = CommonCmd + `-vf "select=eq(pict_type\,%s)" -fps_mode vfr -qscale:v 2 -f image2 %s/%%03d.jpg`
View Source
const GifToWebpCmd = CommonCmd + `-c:v libwebp -lossless 1 -quality 100 -compression_level 6 %s.webp`
View Source
const ImgTAvifCmd = CommonCmd + `-c:v libaom-av1 -still-picture 1 %s.avif`
View Source
const ImgToHeifCmd = CommonCmd + `-crf 12 -psy-rd 0.4 -aq-strength 0.4 -deblock 1:1 -vf "scale=trunc(iw/2):trunc(ih/2)*2" -preset veryslow -pix_fmt yuv420p101e -f hevc %s.hevc`
View Source
const ImgToHeifCmd2 = `` /* 206-byte string literal not displayed */
View Source
const ImgToHeifCmd3 = `` /* 238-byte string literal not displayed */
View Source
const ImgToJxlCmd = CommonCmd + `-c:v libjxl %s.jxl`
View Source
const ImgToWebpCmd = CommonCmd + `-c:v libwebp -lossless 1 -quality 100 -compression_level 6 %s.webp`
View Source
const ImgToWebpWithOptionsCmd = CommonCmd + `-c:v libwebp -quality %d %s.webp`
View Source
const ResizeCmd = CommonCmd + `-vf "scale=iw*.5:ih*.5" %s`
View Source
const TransferCodecByIntelGPUCmd = `ffmpeg -hwaccel_output_format qsv -c:v h264_qsv -i %s -c:v hevc_qsv -preset veryslow -g 60 -gpu_copy 1 -c:a copy %s`
View Source
const TransferFormatCmd = `ffmpeg -i %s -c copy -y %s`
View Source
const TransferFormatGPUCmd = `ffmpeg -hwaccel qsv -i %s -c copy -y %s`
Variables ¶
This section is empty.
Functions ¶
func H264ToH265 ¶
func ImgToWebpWithOptions ¶ added in v1.1.0
图片带选项转webp格式,选项目前支持质量
func TransferFormat ¶
func TransferFormatGPU ¶ added in v1.1.0
Types ¶
Click to show internal directories.
Click to hide internal directories.