Skip to content

Commit

Permalink
Implementation of EIA-608 captions in FFmpeg engine
Browse files Browse the repository at this point in the history
  • Loading branch information
Sami32 committed Sep 23, 2017
1 parent c7f31a4 commit baf8b94
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/external-resources/renderers/DefaultRenderer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -690,10 +690,11 @@ CharMap =
# ------------------------------------
# ASS .ass or .ssa
# MICRODVD .sub
# PGS .sup
# SAMI .smi
# SUBRIP .srt
# TEXT .txt
# WEBVTT .wtt
# WEBVTT .vtt
#
# Example: SupportedExternalSubtitlesFormats = SUBRIP,ASS,MICRODVD
# Default: ""
Expand All @@ -716,7 +717,10 @@ VideoFormatsSupportingStreamedExternalSubtitles =
# ------------------------------------
# ASS .ass/.ssa
# BMP
# EIA608
# EIA708
# DIVX (XSUB)
# DVBSUB
# MICRODVD .sub
# PGS .sup
# SAMI .smi
Expand Down
28 changes: 28 additions & 0 deletions src/main/java/net/pms/encoders/FFMpegVideo.java
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,38 @@ public synchronized List<String> getVideoTranscodeOptions(DLNAResource dlna, DLN
transcodeOptions.add("-f");
if (dtsRemux) {
transcodeOptions.add("mpeg2video");
if (
params.sid.isEmbedded() &&
(
params.sid.getType() == SubtitleType.EIA608
// || params.sid.getType() == SubtitleType.EIA708
)
) {
transcodeOptions.add("-a53cc");
}
} else if (renderer.isTranscodeToMPEGTS()) {
transcodeOptions.add("mpegts");
if (
!renderer.isTranscodeToH264() &&
params.sid.isEmbedded() &&
(
params.sid.getType() == SubtitleType.EIA608
// || params.sid.getType() == SubtitleType.EIA708
)
) {
transcodeOptions.add("-a53cc");
}
} else {
transcodeOptions.add("vob");
if (
params.sid.isEmbedded() &&
(
params.sid.getType() == SubtitleType.EIA608
// || params.sid.getType() == SubtitleType.EIA708
)
) {
transcodeOptions.add("-a53cc");
}
}
}
}
Expand Down

0 comments on commit baf8b94

Please sign in to comment.