about summary refs log tree commit homepage
path: root/lib/dtas/source/av.rb
blob: 0a9d39bcd80858d6fa43fc4b9b1de9871a442b85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
# frozen_string_literal: true
require_relative '../../dtas'
require_relative 'av_ff_common'

# this is usually one input file
class DTAS::Source::Av # :nodoc:
  include DTAS::Source::AvFfCommon

  AV_DEFAULTS = COMMAND_DEFAULTS.merge(
    "command" =>
      'avconv -v error $SSPOS $PROBE -i "$INFILE" $AMAP -f sox - |' \
      'sox -p $SOXFMT - $TRIMFX $RGFX',

    # this is above ffmpeg because this av is the Debian default and
    # it's easier for me to test av than ff
    "tryorder" => 1,
  )

  def initialize
    command_init(AV_DEFAULTS)
    @av_ff_probe = "avprobe"
  end

  def source_defaults
    AV_DEFAULTS
  end
end