golang library to read and write various subtitle formats

libgosubs

Golang library to read and write subtitles in the following formats

  • Advanced SubStation Alpha v4
  • SRT
  • TTML v1.0 - This is based on the spec provided by Netflix in their documentation
  • WebVTT experimental support
  • MicroDVD experimental support

notes

TTML is somewhat complex to implement in Go due to the way that Go handles XML namespaces. Until this issue is fixed, two different structs for reading and writing, as well as a lengthy conversion function will probably be necessary. See the test file for a sample (and probably poor) implementation.

todo

  • Clean up the ASSv4 format, specifically do something about the way headers are handled

updates

  • Experimental MicroDVD format support added

libgosubs project garbage

Documentation

Available via Godoc

Godoc Format
GoDoc ASS
GoDoc SRT
GoDoc TTML
GoDoc WVTT
GoDoc MicroDVD

Test Coverage

Coverage Format
gocover.io go ASS
gocover.io go SRT
gocover.io go TTML
gocover.io go WVTT
gocover.io go MDVD

Other

Go Report Card

Similar Resources

Golang bindings for FFmpeg

goav Golang binding for FFmpeg A comprehensive binding to the ffmpeg video/audio manipulation library. Usage import "github.com/giorgisio/goav/avforma

Dec 27, 2022

🔥 Golang live stream lib/client/server. support RTMP/RTSP/HLS/HTTP[S]-FLV/HTTP-TS, H264/H265/AAC, relay, cluster, record, HTTP API/Notify, GOP cache. 官方文档见 https://pengrl.com/lal

🔥 Golang live stream lib/client/server. support RTMP/RTSP/HLS/HTTP[S]-FLV/HTTP-TS, H264/H265/AAC, relay, cluster, record, HTTP API/Notify, GOP cache. 官方文档见 https://pengrl.com/lal

lal是一个开源GoLang直播流媒体网络传输项目,包含三个主要组成部分: lalserver:流媒体转发服务器。类似于nginx-rtmp-module等应用,但支持更多的协议,提供更丰富的功能。lalserver简介 demo:一些小应用,比如推、拉流客户端,压测工具,流分析工具,调度示例程序等

Jan 1, 2023

live video streaming server in golang

live video streaming server in golang

中文 Simple and efficient live broadcast server: Very simple to install and use; Pure Golang, high performance, and cross-platform; Supports commonly us

Jan 4, 2023

live streaming server in golang

live streaming server in golang

中文 Simple and efficient live broadcast server: Very simple to install and use; Pure Golang, high performance, and cross-platform; Supports commonly us

Nov 10, 2022

Video converter with golang

Requirements Debian-like system (ubuntu, mint, etc...) with apt package manager Golang 1.15 Command tool make (use sudo apt install make -y to instal

Sep 10, 2022

ffmpeg core for golang

go-ffmpeg-core ffmpeg core for golang 基于ffmpeg命令封装简单功能,因此运行环境需事先安装有ffmpeg命令。 ffmpeg官方下载地址: http://ffmpeg.org/download.html 1. 剥离视频文件的音频/视频 package mai

Nov 26, 2021

📽 MovieGo - Video Editing in Golang

📽 MovieGo - Video Editing in Golang MovieGo is a Golang library for video editing. The library is designed for fast processing of routine tasks relat

Dec 26, 2022

Parse and demux MPEG Transport Streams (.ts) natively in GO

This is a Golang library to natively parse and demux MPEG Transport Streams (ts) in GO. WARNING: this library is not yet production ready. Use at your

Jan 9, 2023

Go bindings for libVLC and high-level media player interface

Go bindings for libVLC and high-level media player interface

Go bindings for libVLC 2.X/3.X/4.X and high-level media player interface. The package can be useful for adding multimedia capabilities to applications

Dec 31, 2022
Comments
  • the problem of

    the problem of "\ufeff" with a num

    https://github.com/wargarblgarbl/libgosubs/blob/7f03fb80e6de518d1533b4db0ed76b93d6a11a77/srt/readsrt.go#L49

    https://github.com/wargarblgarbl/libgosubs/blob/7f03fb80e6de518d1533b4db0ed76b93d6a11a77/srt/readsrt.go#L63

    if the file is code with utf8+bom, this package parse srt fail :

    the srt file like this:

    1  // here ! it is \ufeff and 1
    00:00:01,430 --> 00:00:03,230
    前情提要
    
    2
    00:00:01,430 --> 00:00:03,230
    {\pos(190.2,244.8)}西部世界
    

    use the function ParseSrt() to parse the file , go program throw error

    strconv.Atoi: parsing "\ufeff1": invalid syntax
    
xyz, is a tool for automating actions based on events from various sources used by streamers.
xyz, is a tool for automating actions based on events from various sources used by streamers.

Streaming Automation Software Support · Download · Report Bug · Request Feature What is xyz? xyz, is a tool for automating actions based on events fro

Nov 21, 2022
golang library for mux and demux file containers such as mpeg-ts,mpeg-ps,flv

gomedia mpeg-ts,mpeg-ps,flv muxer/demuxer mpeg-ts muxer mpeg-ts demuxer mpeg-ps muxer mpeg-ps demuxer flv muxer flv demuxer mpeg-ps will be done in th

Jan 4, 2023
lmmp3 is a little golang library that download a video from youtube, and convert it to a mp3 file using ffmpeg

lmmp3 lmmp3 is a function that download a video from youtube, and convert it to a mp3 file using ffmpeg You need to have installed ffmpeg in your syst

Aug 12, 2022
Parser and generator of M3U8-playlists for Apple HLS. Library for Go language. :cinema:

M3U8 This is the most complete opensource library for parsing and generating of M3U8 playlists used in HTTP Live Streaming (Apple HLS) for internet vi

Dec 20, 2022
RTSP 1.0 client and server library for the Go programming language

RTSP 1.0 client and server library for the Go programming language

Jan 3, 2023
A simple library to extract video and audio frames from media containers (based on libav).
A simple library to extract video and audio frames from media containers (based on libav).

Reisen A simple library to extract video and audio frames from media containers (based on libav, i.e. ffmpeg). Dependencies The library requires libav

Jan 2, 2023
Go4vl is Go library for working with the Video for Linux API (V4L2) natively, without any C bindings.

go4vl A Go library for working with the Video for Linux user API (V4L2). Gov4l hides all the complexities of working with V4L2 and exposes idiomatic G

Dec 23, 2022
Parse and generate m3u8 playlists for Apple HTTP Live Streaming (HLS) in Golang (ported from gem https://github.com/sethdeckard/m3u8)

go-m3u8 Golang package for m3u8 (ported m3u8 gem https://github.com/sethdeckard/m3u8) go-m3u8 provides easy generation and parsing of m3u8 playlists d

Nov 19, 2022
golang function that download a video from youtube, and convert it to a mp3 file using ffmpeg

echedwnmp3 echedwnmp3 is a function that download a video from youtube, and convert it to a mp3 file using ffmpeg example package main import(echedwn

Dec 7, 2021
ffcommander - An easy frontend to FFmpeg and Imagemagick to automatically process video and manipulate subtitles.

% FFCOMMANDER(1) ffcommander 2.39 % Mikael Hartzell (C) 2018 % 2021 Name ffcommander - An easy frontend to FFmpeg and Imagemagick to automatically pro

May 9, 2022