From ab9fa2c4d1fc0855b3d13cf4163da6a525dbbe62 Mon Sep 17 00:00:00 2001 From: Taha Jahangir Date: Mon, 16 Mar 2015 10:12:52 +0330 Subject: [PATCH 1/2] Build with two ffmpeg versions --- .travis.yml | 6 +++++- test/install-ffmpeg.sh | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2a21303..f97acb8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,12 @@ python: - "3.2" - "3.3" +env: + - FFMPEG_STATIC=http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.2014-07-16.tar.gz + - FFMPEG_STATIC=http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz + before_install: - - sudo sh ./test/install-ffmpeg.sh + - sudo sh -x ./test/install-ffmpeg.sh $FFMPEG_STATIC script: - python setup.py test diff --git a/test/install-ffmpeg.sh b/test/install-ffmpeg.sh index b2db6fb..432cca6 100755 --- a/test/install-ffmpeg.sh +++ b/test/install-ffmpeg.sh @@ -4,6 +4,8 @@ # add-apt-repository -y ppa:jon-severinsson/ffmpeg # apt-get -y -qq update # apt-get -y -qq install ffmpeg -# list directory of ffmpeg binary file there is in http://ffmpeg.gusari.org/static/64bit/ -wget -P /tmp http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.latest.tar.gz -tar -xvf /tmp/ffmpeg.static.64bit.latest.tar.gz -C /usr/local/bin \ No newline at end of file +# list directory of ffmpeg binary file there is in http://johnvansickle.com/ffmpeg/ +wget -O /tmp/ffmpeg-static $1 +mkdir /tmp/ffmpeg-bin/ +tar -xvf /tmp/ffmpeg-static -C /tmp/ffmpeg-bin/ +cp `find /tmp/ffmpeg-bin/ -name 'ff*' -executable -type f` /usr/local/bin From 8e81cf9c60d958e3eae18717aee5e3861776dce0 Mon Sep 17 00:00:00 2001 From: Taha Jahangir Date: Mon, 16 Mar 2015 12:15:17 +0330 Subject: [PATCH 2/2] Fix with ffmpeg 2.6 --- converter/ffmpeg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/converter/ffmpeg.py b/converter/ffmpeg.py index 6b14133..8e6be6e 100644 --- a/converter/ffmpeg.py +++ b/converter/ffmpeg.py @@ -453,8 +453,8 @@ def on_sigalrm(*_): ret = ret.decode(console_encoding) total_output += ret buf += ret - if '\r' in buf: - line, buf = buf.split('\r', 1) + if '\n' in buf: + line, buf = buf.split('\n', 1) tmp = pat.findall(line) if len(tmp) == 1: