Skip to content

Instantly share code, notes, and snippets.

Created October 10, 2012 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/3865174 to your computer and use it in GitHub Desktop.
Save anonymous/3865174 to your computer and use it in GitHub Desktop.
stdin
( rewire_inputs
if [ x"$t" = x"unknown" ]; then
# HACK for undecodable subs. Don't ask.
if $seen_sub_out; then
ffmpeg -i "$in" "$@" -vn -an \
-filter_complex "$filtergraph" \
-map "[SUB_OUT]" \
-codec copy \
-f matroska \
"$tempdir"/subtitles.mkv
else
ffmpeg -i "$in" "$@" -vn -an \
-map "0:$s" \
-codec copy \
-f matroska \
"$tempdir"/subtitles.mkv
fi
ffmpeg -i "$tempdir"/subtitles.mkv \
"$tempdir"/subtitles.ass
else
if $seen_sub_out; then
ffmpeg -i "$in" "$@" -vn -an \
-filter_complex "$filtergraph" \
-map "[SUB_OUT]" \
-f ass \
"$tempdir"/subtitles.ass
else
ffmpeg -i "$in" "$@" -vn -an \
-map "0:$s" \
-f ass \
"$tempdir"/subtitles.ass
fi
fi )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment