cutter

package module
v0.0.0-...-e6c5924 Latest Latest
Warning

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

Go to latest
Published: May 1, 2022 License: MIT Imports: 6 Imported by: 0

README

Go-video-cutter

Cuts videos using Go FFmpeg Bindings from github.com/3d0c/gmf

Cut from growing file

  • Start a stream forwarder
srt-live-transmit srt://:1234 srt://:4201 -v
  • Start a stream:
ffmpeg -re -f lavfi -i testsrc=size=1280x720:rate=30 -pix_fmt yuv420p -vf "drawtext=fontfile=/usr/share/fonts/dejavu/DejaVuSans-Bold.ttf: 'text=%{localtime\:%T}': fontcolor=white@0.8: x=7: y=70: fontsize=(h/20)" -c:v libx264 -preset ultrafast  -f mpegts "srt://127.0.0.1:1234?pkt_size=1316"
  • Start a listener that records to growing file:
ffmpeg -probesize 32 -analyzeduration 0 -i "srt://127.0.0.1:4201?transtype=live&latency=0&recv_buffer_size=0" -c copy -f mpegts - | tee -a /tmp/out.ts
TODO
  • add utc timestamps to the growing file

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cut

func Cut(input string, start, end int64, output string) error

Cut cuts a video file from start to end (in seconds). If end is -1, the end of the video is used.

func CutByCueSheet

func CutByCueSheet(sheet *cue.Sheet, inputFile, outputFolder, format string) error

func CutByTimeCode

func CutByTimeCode(input string, start, end string, output string) error

CutByTimeCode cuts a video file from start to end as timecode (e.g. "20:30:00:00")

func GetCueSheetFromFile

func GetCueSheetFromFile(filePath string) (*cue.Sheet, error)

func GetSecondsFromCueTrackIndex

func GetSecondsFromCueTrackIndex(index *cue.Index) int64

Types

This section is empty.

Jump to

Keyboard shortcuts

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