Skip to content

Commit

Permalink
Add support for BT.709, restructure sources
Browse files Browse the repository at this point in the history
Color spaces are now automatically guessed based on video dimensions
unless the user specifies a specific color space.
  • Loading branch information
Martin Herkt committed Apr 20, 2012
1 parent f93fbef commit b0b86f3
Show file tree
Hide file tree
Showing 11 changed files with 629 additions and 545 deletions.
16 changes: 16 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 2.8)

project(assrender)

find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBASS REQUIRED libass>=0.10.0)
find_package(EXPAT REQUIRED)
find_package(ZLIB REQUIRED)

if (CMAKE_COMPILER_IS_GNUCXX)
add_definitions("-Wall -Wno-comment -pedantic -std=gnu99")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "-s")
set(CMAKE_C_FLAGS_RELEASE "-O3")
endif()

add_subdirectory(src)
17 changes: 15 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
AssRender is an AviSynth plugin that renders ASS/SSA and SRT (without the
HTML-like markup) subtitles. It uses libass to render the subtitles, which makes
it the fastest and most correct ASS renderer for AviSynth.

This also means that it is much more picky about script syntax than VSFilter
and friends, so keep that in mind before blaming the filter. Yes, people have
reported a lot of errors that were actually the script author’s fault.

Usage:
assrender(clip, string file, [string vfr, int hinting, float scale,
float line_spacing, float dar, float sar, int top, int bottom, int left,
int right, string charset, int debuglevel, string fontdir,
string srt_font])
string srt_font, string colorspace])

string file:
Your subtitle file. May be ASS, SSA or SRT.
Expand Down Expand Up @@ -30,4 +38,9 @@ string fontdir:
Useful if you are lazy but want to keep your system fonts clean.
string srt_font:
Font to use for SRT subtitles.
Defaults to whatever Fontconfig chooses for “Sans”.
Defaults to whatever Fontconfig chooses for “Sans”.
string colorspace:
The color space of your (YUV) video. Possible values:
- auto, guess (guess based on video resolution)
- Rec709, BT.709
- Rec601, BT.601
17 changes: 1 addition & 16 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,2 @@
cmake_minimum_required(VERSION 2.8)

project(assrender)

find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBASS REQUIRED libass>=0.10.0)
find_package(EXPAT REQUIRED)
find_package(ZLIB REQUIRED)

if (CMAKE_COMPILER_IS_GNUCXX)
add_definitions("-Wall -pedantic -std=gnu89")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "-s")
set(CMAKE_C_FLAGS_RELEASE "-O3")
endif()

add_library(assrender SHARED assrender.c)
add_library(assrender SHARED render.c sub.c timecodes.c assrender.c)
target_link_libraries(assrender ${LIBASS_LDFLAGS} ${EXPAT_LIBRARY} ${ZLIB_LIBRARY} avisynth.lib)
Loading

0 comments on commit b0b86f3

Please sign in to comment.