Skip to content

Latest commit

 

History

History
35 lines (30 loc) · 588 Bytes

README.md

File metadata and controls

35 lines (30 loc) · 588 Bytes

FFmpeg go wrapper

Example 1

NewFFmpeg().
    InputFile("testdata/input.mp4").
    OutputFile("testdata/output.mp4").
    AudioBitrate(126000).
    VideoBitrate(440000).
    Preset("fast").
    Seek(3).
    Duration(5).
    Run()

Example 2

fout, _ := os.Create("testdata/output.mp4")
defer fout.Close()

fin, _ := os.Open("testdata/input.mp4")

NewFFmpeg().
    Input(fin).
    Output(fout).
    AudioBitrate(126000).
    VideoBitrate(440000).
    Preset("fast").
    Seek(3).
    Duration(5).
    Format("mp4").
    Movflags("+faststart").
    Run()