From db2a2d1e25623d2aa23d8877ac56a2042a450c42 Mon Sep 17 00:00:00 2001 From: Bruno Cauet Date: Mon, 21 Apr 2014 15:37:10 +0200 Subject: [PATCH 1/2] Disable video feed in ffmpeg's flac conversion Video feeds may be found in flac files, and the current ffmpeg conversion command does not ignore them, causing beets to fail to convert the file. Add `-vn` to the command line to fix the problem. Fix issue #712. --- beetsplug/convert.py | 2 +- docs/changelog.rst | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/beetsplug/convert.py b/beetsplug/convert.py index 2d8984f5d..702857cc7 100644 --- a/beetsplug/convert.py +++ b/beetsplug/convert.py @@ -264,7 +264,7 @@ class ConvertPlugin(BeetsPlugin): u'extension': u'm4a', }, u'flac': { - u'command': u'ffmpeg -i $source -y -acodec flac $dest', + u'command': u'ffmpeg -i $source -y -acodec flac -vn $dest', u'extension': u'flac', }, u'mp3': { diff --git a/docs/changelog.rst b/docs/changelog.rst index 1a1e1e546..00aae89cf 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -21,6 +21,8 @@ Fixes: non-ASCII characters. * The ``%if{}`` template function now appropriately interprets the condition as false when it contains the string "false". Thanks to Ayberk Yilmaz. +* :doc:`/plugins/convert`: Disable a potential video stream in flac files + conversion with ffmpeg 1.3.5 (April 15, 2014) From 7b0ce4f28ecf53868fe38753b9fe57260dbe5113 Mon Sep 17 00:00:00 2001 From: Bruno Cauet Date: Mon, 21 Apr 2014 19:59:18 +0200 Subject: [PATCH 2/2] Disable the video stream in all ffmpeg conversions Propagate the previous commit's change to all ffmpeg command lines. --- beetsplug/convert.py | 14 +++++++------- docs/changelog.rst | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/beetsplug/convert.py b/beetsplug/convert.py index 702857cc7..6e3f91a03 100644 --- a/beetsplug/convert.py +++ b/beetsplug/convert.py @@ -255,34 +255,34 @@ class ConvertPlugin(BeetsPlugin): u'format': u'mp3', u'formats': { u'aac': { - u'command': u'ffmpeg -i $source -y -acodec libfaac ' + u'command': u'ffmpeg -i $source -y -vn -acodec libfaac ' u'-aq 100 $dest', u'extension': u'm4a', }, u'alac': { - u'command': u'ffmpeg -i $source -y -acodec alac $dest', + u'command': u'ffmpeg -i $source -y -vn -acodec alac $dest', u'extension': u'm4a', }, u'flac': { - u'command': u'ffmpeg -i $source -y -acodec flac -vn $dest', + u'command': u'ffmpeg -i $source -y -vn -acodec flac $dest', u'extension': u'flac', }, u'mp3': { - u'command': u'ffmpeg -i $source -y -aq 2 $dest', + u'command': u'ffmpeg -i $source -y -vn -aq 2 $dest', u'extension': u'mp3', }, u'opus': { - u'command': u'ffmpeg -i $source -y -acodec libopus -vn ' + u'command': u'ffmpeg -i $source -y -vn -acodec libopus ' u'-ab 96k $dest', u'extension': u'opus', }, u'ogg': { - u'command': u'ffmpeg -i $source -y -acodec libvorbis -vn ' + u'command': u'ffmpeg -i $source -y -vn -acodec libvorbis ' u'-aq 2 $dest', u'extension': u'ogg', }, u'windows media': { - u'command': u'ffmpeg -i $source -y -acodec wmav2 ' + u'command': u'ffmpeg -i $source -y -vn -acodec wmav2 ' u'-vn $dest', u'extension': u'wma', }, diff --git a/docs/changelog.rst b/docs/changelog.rst index 00aae89cf..29cc41662 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -21,8 +21,8 @@ Fixes: non-ASCII characters. * The ``%if{}`` template function now appropriately interprets the condition as false when it contains the string "false". Thanks to Ayberk Yilmaz. -* :doc:`/plugins/convert`: Disable a potential video stream in flac files - conversion with ffmpeg +* :doc:`/plugins/convert`: Fix conversion for files that include a video + stream by ignoring it. 1.3.5 (April 15, 2014)