depot/third_party/nixpkgs/pkgs/tools/audio/beets/convert-plugin-ffmpeg-path.patch
Default email ffc78d3539 Project import generated by Copybara.
GitOrigin-RevId: d9dba88d08a9cdf483c3d45f0d7220cf97a4ce64
2021-01-05 19:05:55 +02:00

43 lines
2.2 KiB
Diff

diff --git i/beetsplug/convert.py w/beetsplug/convert.py
index 70363f6e..2962aa4f 100644
--- i/beetsplug/convert.py
+++ w/beetsplug/convert.py
@@ -81,7 +81,7 @@ def get_format(fmt=None):
command = config['convert']['command'].as_str()
elif 'opts' in keys:
# Undocumented option for backwards compatibility with < 1.3.1.
- command = u'ffmpeg -i $source -y {0} $dest'.format(
+ command = u'@ffmpeg@/bin/ffmpeg -i $source -y {0} $dest'.format(
config['convert']['opts'].as_str()
)
if 'extension' in keys:
@@ -121,22 +121,22 @@ class ConvertPlugin(BeetsPlugin):
u'id3v23': u'inherit',
u'formats': {
u'aac': {
- u'command': u'ffmpeg -i $source -y -vn -acodec aac '
+ u'command': u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -acodec aac '
u'-aq 1 $dest',
u'extension': u'm4a',
},
u'alac': {
- u'command': u'ffmpeg -i $source -y -vn -acodec alac $dest',
+ u'command': u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -acodec alac $dest',
u'extension': u'm4a',
},
- u'flac': u'ffmpeg -i $source -y -vn -acodec flac $dest',
- u'mp3': u'ffmpeg -i $source -y -vn -aq 2 $dest',
+ u'flac': u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -acodec flac $dest',
+ u'mp3': u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -aq 2 $dest',
u'opus':
- u'ffmpeg -i $source -y -vn -acodec libopus -ab 96k $dest',
+ u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -acodec libopus -ab 96k $dest',
u'ogg':
- u'ffmpeg -i $source -y -vn -acodec libvorbis -aq 3 $dest',
+ u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -acodec libvorbis -aq 3 $dest',
u'wma':
- u'ffmpeg -i $source -y -vn -acodec wmav2 -vn $dest',
+ u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -acodec wmav2 -vn $dest',
},
u'max_bitrate': 500,
u'auto': False,