videohelper

package
v0.1.38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VideoSize

func VideoSize(fp string) (width, height int, err error)

获取视频宽高 ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=p=0 input.mp4

func VideoSnapshot

func VideoSnapshot(videoSrc, poster string) (isSucc bool, err error)

获取视频快照 ffmpeg -i input_video.mp4 -ss 00:00:05 -frames:v 1 -f image2 output_snapshot.png

func VideoWaterMark

func VideoWaterMark(src, dst, watermark, position string) (isSucc bool, err error)

*

  • @param src 源视频
  • @param dst 需要生成的地址
  • @param watermark 水印图片地址
  • @param position 水印位置 lt-左上角 rt-右上角 lb-左下角 rb-右下角
  • ffmpeg -i e1829e3ae7b64f75a3321f1bcc66928b_h264.mp4 -i logo4-small.png -filter_complex "[1:v]scale=150:40[watermark];[0:v][watermark]overlay=main_w-overlay_w-10:main_h-overlay_h-10" -c:a copy e1829e3ae7b64f75a3321f1bcc66928b_logo.mp4

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL