about summary refs log tree commit homepage
path: root/lib/dtas/source/ff.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-08-26 08:26:58 +0000
committerEric Wong <normalperson@yhbt.net>2013-08-26 08:26:58 +0000
commitbc00dd1b3fee22bd91bd713e697b8b31be978d4e (patch)
tree0ae20084aa4bdeb1c5c793bb472102711cf2e268 /lib/dtas/source/ff.rb
parentb7b0697b035c08e818204397a1c0cd19ba161eb4 (diff)
downloaddtas-bc00dd1b3fee22bd91bd713e697b8b31be978d4e.tar.gz
Since ffmpeg/ffprobe are wrappers around their libav-variants,
I haven't had the chance to actually test with "real" ffmpeg,
but the usage is probably similar enough to not matter.
Diffstat (limited to 'lib/dtas/source/ff.rb')
-rw-r--r--lib/dtas/source/ff.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/dtas/source/ff.rb b/lib/dtas/source/ff.rb
new file mode 100644
index 0000000..db0e609
--- /dev/null
+++ b/lib/dtas/source/ff.rb
@@ -0,0 +1,30 @@
+# -*- encoding: binary -*-
+# Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
+# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
+require_relative '../../dtas'
+require_relative 'av_ff_common'
+
+# ffmpeg support
+# note: only tested with the compatibility wrapper in the Debian 7.0 package
+# (so still using avconv/avprobe)
+class DTAS::Source::Ff  # :nodoc:
+  include DTAS::Source::AvFfCommon
+
+  FF_DEFAULTS = COMMAND_DEFAULTS.merge(
+    "command" =>
+      'ffmpeg -v error $SSPOS -i "$INFILE" $AMAP -f sox - |' \
+      'sox -p $SOXFMT - $RGFX',
+
+    # I haven't tested this much since av is in Debian stable and ff is not
+    "tryorder" => 2,
+  )
+
+  def initialize
+    command_init(FF_DEFAULTS)
+    @av_ff_probe = "ffprobe"
+  end
+
+  def source_defaults
+    FF_DEFAULTS
+  end
+end