Add metadata map to VideoSource and add MP4 H.265 preset
This commit is contained in:
parent
e0f5c1fca3
commit
009a5574fb
|
|
@ -3,6 +3,7 @@ package convert
|
||||||
// FormatOptions contains all available output format presets
|
// FormatOptions contains all available output format presets
|
||||||
var FormatOptions = []FormatOption{
|
var FormatOptions = []FormatOption{
|
||||||
{Label: "MP4 (H.264)", Ext: ".mp4", VideoCodec: "libx264"},
|
{Label: "MP4 (H.264)", Ext: ".mp4", VideoCodec: "libx264"},
|
||||||
|
{Label: "MP4 (H.265)", Ext: ".mp4", VideoCodec: "libx265"},
|
||||||
{Label: "MKV (H.265)", Ext: ".mkv", VideoCodec: "libx265"},
|
{Label: "MKV (H.265)", Ext: ".mkv", VideoCodec: "libx265"},
|
||||||
{Label: "MOV (ProRes)", Ext: ".mov", VideoCodec: "prores_ks"},
|
{Label: "MOV (ProRes)", Ext: ".mov", VideoCodec: "prores_ks"},
|
||||||
{Label: "DVD-NTSC (MPEG-2)", Ext: ".mpg", VideoCodec: "mpeg2video"},
|
{Label: "DVD-NTSC (MPEG-2)", Ext: ".mpg", VideoCodec: "mpeg2video"},
|
||||||
|
|
|
||||||
|
|
@ -77,8 +77,8 @@ type VideoSource struct {
|
||||||
Duration float64
|
Duration float64
|
||||||
VideoCodec string
|
VideoCodec string
|
||||||
AudioCodec string
|
AudioCodec string
|
||||||
Bitrate int // Video bitrate in bits per second
|
Bitrate int // Video bitrate in bits per second
|
||||||
AudioBitrate int // Audio bitrate in bits per second
|
AudioBitrate int // Audio bitrate in bits per second
|
||||||
FrameRate float64
|
FrameRate float64
|
||||||
PixelFormat string
|
PixelFormat string
|
||||||
AudioRate int
|
AudioRate int
|
||||||
|
|
@ -94,6 +94,7 @@ type VideoSource struct {
|
||||||
GOPSize int // GOP size / keyframe interval
|
GOPSize int // GOP size / keyframe interval
|
||||||
HasChapters bool // Whether file has embedded chapters
|
HasChapters bool // Whether file has embedded chapters
|
||||||
HasMetadata bool // Whether file has title/copyright/etc metadata
|
HasMetadata bool // Whether file has title/copyright/etc metadata
|
||||||
|
Metadata map[string]string
|
||||||
}
|
}
|
||||||
|
|
||||||
// DurationString returns a human-readable duration string (HH:MM:SS or MM:SS)
|
// DurationString returns a human-readable duration string (HH:MM:SS or MM:SS)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user