 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Media services for golang, including bindings for ffmpeg, command line application
and backend REST API for extraction, multiplexing and transcoding.
Index ¶
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
var ( AudioLayoutMono = AudioChannelLayout{1} AudioLayoutStereo = AudioChannelLayout{2} )
Functions ¶
This section is empty.
Types ¶
type AudioChannelLayout ¶
type AudioChannelLayout struct {
	Channels uint
}
    AudioChannelLayout represents number of channels and layout of those channels
type AudioFormat ¶
type AudioFormat int
AudioFormat represents how the samples are stored
const ( AUDIO_FMT_NONE AudioFormat = iota AUDIO_FMT_U8 // unsigned 8 bits AUDIO_FMT_U8P // unsigned 8 bits, planar AUDIO_FMT_S16 // signed 16 bits AUDIO_FMT_S16P // signed 16 bits, planar AUDIO_FMT_S32 // signed 32 bits AUDIO_FMT_S32P // signed 32 bits, planar AUDIO_FMT_F32 // float32 AUDIO_FMT_F32P // float32, planar AUDIO_FMT_F64 // float64 AUDIO_FMT_F64P // float64, planar AUDIO_FMT_S64 // signed 64 bits AUDIO_FMT_S64P // signed 64 bits, planar )
func (AudioFormat) String ¶
func (f AudioFormat) String() string
type DecodeIteratorFunc ¶
type DecodeIteratorFunc func(context.Context, MediaPacket) error
type Media ¶
type Media interface {
	URL() *url.URL    // Return URL for the media location
	Flags() MediaFlag // Return flags
}
    Media represents either input or output media
type MediaCodec ¶
type MediaCodec interface {
	// Name returns the unique name for the codec
	Name() string
	// Description returns the long description for the codec
	Description() string
	// Flags for the codec (Audio, Video, Encoder, Decoder)
	Flags() MediaFlag
}
    MediaCodec is the codec and parameters
type MediaFlag ¶
type MediaFlag uint64
const ( MEDIA_FLAG_ALBUM MediaFlag = (1 << iota) // Is part of an album MEDIA_FLAG_ALBUM_TRACK // Is an album track MEDIA_FLAG_ALBUM_COMPILATION // Album is a compliation MEDIA_FLAG_TVSHOW // Is part of a TV Show MEDIA_FLAG_TVSHOW_EPISODE // Is a TV Show episode MEDIA_FLAG_FILE // Is a file MEDIA_FLAG_VIDEO // Contains video MEDIA_FLAG_AUDIO // Contains audio MEDIA_FLAG_SUBTITLE // Contains subtitles MEDIA_FLAG_DATA // Contains data stream MEDIA_FLAG_ATTACHMENT // Contains attachment MEDIA_FLAG_ARTWORK // Contains artwork MEDIA_FLAG_CAPTIONS // Contains captions MEDIA_FLAG_ENCODER // Is an encoder MEDIA_FLAG_DECODER // Is an decoder MEDIA_FLAG_NONE MediaFlag = 0 MEDIA_FLAG_MIN = MEDIA_FLAG_ALBUM MEDIA_FLAG_MAX = MEDIA_FLAG_DECODER )
func (MediaFlag) FlagString ¶
type MediaKey ¶
type MediaKey string
const ( MEDIA_KEY_BRAND_MAJOR MediaKey = "major_brand" // string MEDIA_KEY_BRAND_COMPATIBLE MediaKey = "compatible_brands" // string MEDIA_KEY_CREATED MediaKey = "creation_time" // time.Time MEDIA_KEY_ENCODER MediaKey = "encoder" // string MEDIA_KEY_ALBUM MediaKey = "album" // string MEDIA_KEY_ALBUM_ARTIST MediaKey = "artist" // string MEDIA_KEY_COMMENT MediaKey = "comment" // string MEDIA_KEY_COMPOSER MediaKey = "composer" // string MEDIA_KEY_COPYRIGHT MediaKey = "copyright" // string MEDIA_KEY_YEAR MediaKey = "date" // uint MEDIA_KEY_DISC MediaKey = "disc" // uint MEDIA_KEY_ENCODED_BY MediaKey = "encoded_by" // string MEDIA_KEY_FILENAME MediaKey = "filename" // string MEDIA_KEY_GENRE MediaKey = "genre" // string MEDIA_KEY_LANGUAGE MediaKey = "language" // string MEDIA_KEY_PERFORMER MediaKey = "performer" // string MEDIA_KEY_PUBLISHER MediaKey = "publisher" // string MEDIA_KEY_SERVICE_NAME MediaKey = "service_name" // string MEDIA_KEY_SERVICE_PROVIDER MediaKey = "service_provider" // string MEDIA_KEY_TITLE MediaKey = "title" // string MEDIA_KEY_TRACK MediaKey = "track" // uint MEDIA_KEY_VERSION_MAJOR MediaKey = "major_version" // string MEDIA_KEY_VERSION_MINOR MediaKey = "minor_version" // string MEDIA_KEY_SHOW MediaKey = "show" // string MEDIA_KEY_SEASON MediaKey = "season_number" // uint MEDIA_KEY_EPISODE_SORT MediaKey = "episode_sort" // string MEDIA_KEY_EPISODE_ID MediaKey = "episode_id" // uint MEDIA_KEY_COMPILATION MediaKey = "compilation" // bool MEDIA_KEY_GAPLESS_PLAYBACK MediaKey = "gapless_playback" // bool MEDIA_KEY_ACCOUNT_ID MediaKey = "account_id" // string MEDIA_KEY_DESCRIPTION MediaKey = "description" // string MEDIA_KEY_MEDIA_TYPE MediaKey = "media_type" // string MEDIA_KEY_PURCHASED MediaKey = "purchase_date" // time.Time MEDIA_KEY_ALBUM_SORT MediaKey = "sort_album" // string MEDIA_KEY_ARTIST_SORT MediaKey = "sort_artist" // string MEDIA_KEY_TITLE_SORT MediaKey = "sort_name" // string MEDIA_KEY_SYNOPSIS MediaKey = "synopsis" // string MEDIA_KEY_GROUPING MediaKey = "grouping" // string )
type MediaPacket ¶
MediaPacket is a packet of data from a stream
       Directories
      ¶
      Directories
      ¶
    
    | Path | Synopsis | 
|---|---|
| cmd
       | |
| 
          
            mediatool
            
            command
          
          
         | |
| pkg
       | |
| 
          
            media
            
            
          
           Package media provides high-level media services for multiplexing, extracting and transcoding audio and video. | Package media provides high-level media services for multiplexing, extracting and transcoding audio and video. | 
| plugin
       | |
| 
          
            media
            
            command
          
          
         | |
| sys
       | |
| 
          
            _chromaprint
            
            
          
           This package provides chromaprint audio fingerprinting bindings | This package provides chromaprint audio fingerprinting bindings | 
| 
          
            dvb
            
            
          
           DVB (Digital Video Broadcasting) bindings for Go | DVB (Digital Video Broadcasting) bindings for Go | 
| 
          
            ffmpeg
            
            
          
           Package ffmpeg provides low-level ffmpeg for go | Package ffmpeg provides low-level ffmpeg for go | 
 Click to show internal directories. 
   Click to hide internal directories.