Giter Club home page Giter Club logo

sminterpolate's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sminterpolate's Issues

"Abort trap: 6" while attempting to encode file with opencl

Please note this was crashing the old version as well. I updated to 0.2.1 before posting this issue.

When attempting to re-encode the attached file ( inside the zip file ), python appears to crash due to openCL.

I can still encode other files fine, and this file also appears to work when forcing software rendering. I don't know why this one crashes butterflow in opencl mode.

$ butterflow -v -r 40 -sm -s full,fps=40 see-the-circle.recode.mp4 -o see-the-circle.butter.mp4
[butterflow:cli.py:main.INFO]: will render:
sequence: t=0:00:38.100000, f=381
  00 sub: t=0:00:00-0:00:38.100000 f=0-380 tgt=?,?,40.0
rendering: 0%[butterflow:render.py:render.INFO]: sub 00:
Abort trap: 6

It seems like it might be trying to use the wrong graphics device ( the iris instead of the nvidia gt 750 discrete card ) and then something specific to this file is just causing it to crash.

$ butterflow -d
OpenCL devices:
  Platform              : Apple
  Platform Vendor       : Apple
  Platform Version      : OpenCL 1.2 (Apr 26 2016 00:05:53)
    Device          : Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
      Version       : OpenCL 1.2 
      Version       : 1.1
    Device          : Iris Pro
      Version       : OpenCL 1.2 
      Version       : 1.2(Apr 26 2016 00:33:17)
    Device          : GeForce GT 750M
      Version       : OpenCL 1.2 
      Version       : 10.10.10 310.42.25f01
Process:               Python [15508]
Path:                  /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier:            Python
Version:               2.7.10 (2.7.10)
Code Type:             X86-64 (Native)
Parent Process:        bash [45501]
Responsible:           Terminal [45486]
User ID:               502

PlugIn Path:             /usr/local/Cellar/opencv/2.4.13_3/lib/libopencv_ocl.2.4.dylib
PlugIn Identifier:       libopencv_ocl.2.4.dylib
PlugIn Version:          ??? (0)

Date/Time:             2016-09-20 17:27:25.538 -0700
OS Version:            Mac OS X 10.11.5 (15F34)
Report Version:        11
Anonymous UUID:        2E68098D-E860-0DB5-17F4-23680F281B0A

Sleep/Wake UUID:       AA333C7B-CE2F-4B2B-91FB-D6EA25724C98

Time Awake Since Boot: 8700000 seconds
Time Since Wake:       3800000 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: opencl_runtime

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Application Specific Information:
abort() called

Application Specific Signatures:
Graphics hardware encountered an error and was reset: 0x00000813


Thread 0 Crashed:: Dispatch queue: opencl_runtime
0   libsystem_kernel.dylib          0x00007fff854cef06 __pthread_kill + 10
1   libsystem_pthread.dylib         0x00007fff9674a4ec pthread_kill + 90
2   libsystem_c.dylib               0x00007fff8678c6e7 abort + 129
3   libGPUSupportMercury.dylib      0x00007fff854ade5c gpusGenerateCrashLog + 158
4   com.apple.driver.AppleIntelHD5000GraphicsGLDriver   0x000000010f0a7d4b gpusKillClientExt + 9
5   libGPUSupportMercury.dylib      0x00007fff854ae818 gpusQueueSubmitDataBuffers + 162
6   com.apple.driver.AppleIntelHD5000GraphicsGLDriver   0x000000010f0fa537 IntelCLCommandBuffer::getNew(GLDQueueRec*) + 33
7   com.apple.driver.AppleIntelHD5000GraphicsGLDriver   0x000000010f0fa49c intelSubmitCLCommands(GLDQueueRec*, unsigned int) + 65
8   com.apple.driver.AppleIntelHD5000GraphicsGLDriver   0x000000010f1001c9 CHAL_INTEL::ChalContext::ChalFlush() + 83
9   com.apple.driver.AppleIntelHD5000GraphicsGLDriver   0x000000010f0fa7bc gldFinishQueue + 43
10  com.apple.opencl                0x00007fff9045bb86 0x7fff9045a000 + 7046
11  com.apple.opencl                0x00007fff9045c8ed 0x7fff9045a000 + 10477
12  com.apple.opencl                0x00007fff9047a43f 0x7fff9045a000 + 132159
13  com.apple.opencl                0x00007fff9047d9c2 0x7fff9045a000 + 145858
14  libdispatch.dylib               0x00007fff8228940b _dispatch_client_callout + 8
15  libdispatch.dylib               0x00007fff8228a9f2 _dispatch_barrier_sync_f_invoke + 74
16  com.apple.opencl                0x00007fff9047d834 0x7fff9045a000 + 145460
17  com.apple.opencl                0x00007fff9047963c 0x7fff9045a000 + 128572
18  com.apple.opencl                0x00007fff9046f681 clEnqueueWriteBufferRect + 945
19  libopencv_ocl.2.4.dylib         0x000000010a37e7eb cv::ocl::openCLMemcpy2D(cv::ocl::Context*, void*, unsigned long, void const*, unsigned long, unsigned long, unsigned long, cv::ocl::openCLMemcpyKind, int) + 259
20  libopencv_ocl.2.4.dylib         0x000000010a3dbffc cv::ocl::oclMat::upload(cv::Mat const&) + 1078
21  motion.so                       0x000000010d964342 ocl_farneback_optical_flow(_object*, _object*) + 521
22  org.python.python               0x00000001097a0a0b PyEval_EvalFrameEx + 13400
23  org.python.python               0x000000010979d3c1 PyEval_EvalCodeEx + 1583
24  org.python.python               0x00000001097a34ae 0x10971a000 + 562350
25  org.python.python               0x00000001097a030c PyEval_EvalFrameEx + 11609
26  org.python.python               0x00000001097a3541 0x10971a000 + 562497
27  org.python.python               0x00000001097a030c PyEval_EvalFrameEx + 11609
28  org.python.python               0x00000001097a3541 0x10971a000 + 562497
29  org.python.python               0x00000001097a030c PyEval_EvalFrameEx + 11609
30  org.python.python               0x000000010979d3c1 PyEval_EvalCodeEx + 1583
31  org.python.python               0x00000001097a34ae 0x10971a000 + 562350
32  org.python.python               0x00000001097a030c PyEval_EvalFrameEx + 11609
33  org.python.python               0x000000010979d3c1 PyEval_EvalCodeEx + 1583
34  org.python.python               0x00000001097a34ae 0x10971a000 + 562350
35  org.python.python               0x00000001097a030c PyEval_EvalFrameEx + 11609
36  org.python.python               0x000000010979d3c1 PyEval_EvalCodeEx + 1583
37  org.python.python               0x00000001097a34ae 0x10971a000 + 562350
38  org.python.python               0x00000001097a030c PyEval_EvalFrameEx + 11609
39  org.python.python               0x000000010979d3c1 PyEval_EvalCodeEx + 1583
40  org.python.python               0x00000001097a34ae 0x10971a000 + 562350
41  org.python.python               0x00000001097a030c PyEval_EvalFrameEx + 11609
42  org.python.python               0x000000010979d3c1 PyEval_EvalCodeEx + 1583
43  org.python.python               0x000000010979cd8c PyEval_EvalCode + 54
44  org.python.python               0x00000001097bca42 0x10971a000 + 666178
45  org.python.python               0x00000001097bcae5 PyRun_FileExFlags + 133
46  org.python.python               0x00000001097bc634 PyRun_SimpleFileExFlags + 698
47  org.python.python               0x00000001097ce011 Py_Main + 3137
48  libdyld.dylib                   0x00007fff90b275ad start + 1

see-the-circle.recode.mp4.zip

Segfault at end of execution when intel cpu is set as the opencl device

butterflow segfaults at the end of every call when the default device is an Intel CPU. I've seen this happen on Arch Linux and Debian.

OpenCL devices:
  Platform            : Intel(R) OpenCL
  Platform Vendor     : Intel(R) Corporation
  Platform Version    : OpenCL 1.2 LINUX
    Device            : Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz
      Version         : OpenCL 1.2 (Build 8)
      Version         : 1.2.0.8
(gdb) bt
#0  0x00007ffff74cb2a8 in malloc_consolidate () from /usr/lib/libc.so.6
#1  0x00007ffff74cbf30 in _int_free () from /usr/lib/libc.so.6
#2  0x00007ffff74cc489 in free_check () from /usr/lib/libc.so.6
#3  0x00007ffff7ded0c7 in _dl_deallocate_tls () from /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff77fc5d6 in __free_stacks () from /usr/lib/libpthread.so.0
#5  0x00007ffff77fc72a in __deallocate_stack () from /usr/lib/libpthread.so.0
#6  0x00007ffff77fe58c in pthread_join () from /usr/lib/libpthread.so.0
#7  0x00007fffe6826a6d in ?? () from /usr/lib/libusb-1.0.so.0
#8  0x00007fffe68241dc in ?? () from /usr/lib/libusb-1.0.so.0
#9  0x00007fffe681d5c2 in libusb_exit () from /usr/lib/libusb-1.0.so.0
#10 0x00007fffed0abed1 in ?? () from /usr/lib/libdc1394.so.22
#11 0x00007fffed09a406 in dc1394_free () from /usr/lib/libdc1394.so.22
#12 0x00007ffff7489e78 in __run_exit_handlers () from /usr/lib/libc.so.6
#13 0x00007ffff7489ec5 in exit () from /usr/lib/libc.so.6
#14 0x00007ffff7474797 in __libc_start_main () from /usr/lib/libc.so.6
#15 0x000000000040073e in _start ()
(gdb) thread apply all bt

Thread 4 (Thread 0x7fffd35de700 (LWP 3511)):
#0  0x00007ffff7537939 in syscall () from /usr/lib/libc.so.6
#1  0x00007ffff36f61a2 in ?? () from /usr/lib/libtbb.so.2
#2  0x00007ffff36f61c9 in ?? () from /usr/lib/libtbb.so.2
#3  0x00007ffff77fd354 in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007ffff753bbfd in clone () from /usr/lib/libc.so.6

Thread 3 (Thread 0x7fffd2ddc700 (LWP 3513)):
#0  0x00007ffff7537939 in syscall () from /usr/lib/libc.so.6
#1  0x00007ffff36f61a2 in ?? () from /usr/lib/libtbb.so.2
#2  0x00007ffff36f61c9 in ?? () from /usr/lib/libtbb.so.2
#3  0x00007ffff77fd354 in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007ffff753bbfd in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7fffd31dd700 (LWP 3512)):
#0  0x00007ffff7537939 in syscall () from /usr/lib/libc.so.6
#1  0x00007ffff36f61a2 in ?? () from /usr/lib/libtbb.so.2
#2  0x00007ffff36f61c9 in ?? () from /usr/lib/libtbb.so.2
#3  0x00007ffff77fd354 in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007ffff753bbfd in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7ffff7fb7700 (LWP 3499)):
#0  0x00007ffff74cb2a8 in malloc_consolidate () from /usr/lib/libc.so.6
#1  0x00007ffff74cbf30 in _int_free () from /usr/lib/libc.so.6
#2  0x00007ffff74cc489 in free_check () from /usr/lib/libc.so.6
#3  0x00007ffff7ded0c7 in _dl_deallocate_tls () from /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff77fc5d6 in __free_stacks () from /usr/lib/libpthread.so.0
#5  0x00007ffff77fc72a in __deallocate_stack () from /usr/lib/libpthread.so.0
#6  0x00007ffff77fe58c in pthread_join () from /usr/lib/libpthread.so.0
#7  0x00007fffe6826a6d in ?? () from /usr/lib/libusb-1.0.so.0
#8  0x00007fffe68241dc in ?? () from /usr/lib/libusb-1.0.so.0
#9  0x00007fffe681d5c2 in libusb_exit () from /usr/lib/libusb-1.0.so.0
#10 0x00007fffed0abed1 in ?? () from /usr/lib/libdc1394.so.22
#11 0x00007fffed09a406 in dc1394_free () from /usr/lib/libdc1394.so.22
#12 0x00007ffff7489e78 in __run_exit_handlers () from /usr/lib/libc.so.6
#13 0x00007ffff7489ec5 in exit () from /usr/lib/libc.so.6
#14 0x00007ffff7474797 in __libc_start_main () from /usr/lib/libc.so.6
#15 0x000000000040073e in _start ()

OSX Muxing fails due to unsafe paths with ffmpeg contact

When I create a file using the mux option ( I haven't tested without ) it doesn't create the muxed output and fails instead with the following:

DEBUG  : muxing ...
[concat @ 0x7fbb6b010600] Unsafe file name '/var/folders/vf/h0wx188x4ml4h69prd5h1m5c0000gp/T/butterflow-0.2.0/~1.7-14-2016.0.m4a'
/var/folders/vf/h0wx188x4ml4h69prd5h1m5c0000gp/T/butterflow-0.2.0/list.txt: Operation not permitted

List.txt looks like:

file '/var/folders/vf/h0wx188x4ml4h69prd5h1m5c0000gp/T/butterflow-0.2.0/~1.7-14-2016.0.m4a'

I'm not really sure why it's using the absolute path with the home symbol stuck in front of the filename.

My command line:

butterflow -np -v -sm -l -mux -r 40 -o ./1.7-14-2016.butterflow.twitter.mp4 1.7-14-2016.mp4

Version 0.2.0, OSX, installed from homebrew.

The video, audio, and concat list files are all still in /var/folders/vf/h0wx188x4ml4h69prd5h1m5c0000gp/T/butterflow-0.2.0/ after this failure as well, there is no cleanup.

OSX muxing fails due to `TypeError: a float is required`

$ butterflow --version
0.2.1

Rendering without mux works fine:

$ butterflow -v -r 40 -s full,fps=40 alex-4th-wall.mp4 -o alex-4th-wall.butter.mp4
[butterflow:cli.py:main.INFO]: will render:
sequence: t=0:00:04.299000, f=256
  00 sub: t=0:00:00-0:00:04.299000 f=0-255 tgt=?,?,40.0
rendering: 0%[butterflow:render.py:render.INFO]: sub 00:
rendering: 100%
[butterflow:cli.py:main.INFO]: made: alex-4th-wall.butter.mp4
[butterflow:cli.py:main.INFO]: write ratio: 171/171, (100.00%) 0.40 MB
frames: 171 real, +0 interpolated, +0 dupe, -84 drop
[butterflow:cli.py:main.INFO]: butterflow took 1.49 mins, done.

Rendering with -mux fails in spectacular fashion after the rendering work is already done:

$ butterflow -v -r 40 -mux -s full,fps=40 alex-4th-wall.mp4 -o alex-4th-wall.butter.mp4
[butterflow:cli.py:main.INFO]: will render:
sequence: t=0:00:04.299000, f=256
  00 sub: t=0:00:00-0:00:04.299000 f=0-255 tgt=?,?,40.0
rendering: 0%[butterflow:render.py:render.INFO]: sub 00:
rendering: 100%
Traceback (most recent call last):
  File "/usr/local/Cellar/butterflow/0.2.1/libexec/bin/butterflow", line 9, in <module>
    load_entry_point('butterflow==0.2.1', 'console_scripts', 'butterflow')()
  File "/usr/local/Cellar/butterflow/0.2.1/libexec/lib/python2.7/site-packages/butterflow/cli.py", line 277, in main
    number=1)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/timeit.py", line 236, in timeit
    return Timer(stmt, setup, timer).timeit(number)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/timeit.py", line 201, in timeit
    timing = self.inner(it, self.timer)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/timeit.py", line 100, in inner
    _func()
  File "/usr/local/Cellar/butterflow/0.2.1/libexec/lib/python2.7/site-packages/butterflow/render.py", line 340, in render
    self.mux_orig_audio_with_rendered_video(tempfile1)
  File "/usr/local/Cellar/butterflow/0.2.1/libexec/lib/python2.7/site-packages/butterflow/render.py", line 382, in mux_orig_audio_with_rendered_video
    speed=sub.target_spd)
  File "/usr/local/Cellar/butterflow/0.2.1/libexec/lib/python2.7/site-packages/butterflow/mux.py", line 95, in extract_audio
    for x in mk_atempo_chain(speed):
  File "/usr/local/Cellar/butterflow/0.2.1/libexec/lib/python2.7/site-packages/butterflow/mux.py", line 91, in mk_atempo_chain
    return solve(speed, 0.5)
  File "/usr/local/Cellar/butterflow/0.2.1/libexec/lib/python2.7/site-packages/butterflow/mux.py", line 84, in solve
    x = int(math.log(speed) / math.log(limit))
TypeError: a float is required

source mp4: alex-4th-wall.mp4.zip

Color shift due to 4:2:0 color subsampling

Version: 0.2.3

Butterflow encodes in 4:2:0, even if -lossless option is enabled.
Strangely it does set the profile to high 4:4:4.
This causes a noticeable color shift, eg. white becomes rgb(251/253/250).

This quick hack improves color accuracy:

--- render.py	2017-04-10 23:32:31.000000000 +0200
+++ render_new.py	2017-04-18 18:46:55.000000000 +0200
@@ -54,7 +54,7 @@

     def mk_render_pipe(self, dest):
         vf = []
-        vf.append('format=yuv420p')
+        vf.append('format=yuv444p')
         call = [
             settings['avutil'],
             '-loglevel', settings['av_loglevel'],

I hacked it further to encode in qtrle (rgb24), same as the source format and similar colorspace as butterflow seems to operate in internally (bgr24).
There was still a slight color shift going on, but only noticeable on a color chart.

Is it possible to change the color subsampling to 4:4:4 in lossless mode?

How do i use gpu?

Im running nvidia on a windows 10 computer i just want to know if there is a gpu command

Homebrew butterflow 0.1.9 package import error

Looks like a problem with PYTHONPATH not including $(brew --prefix)/lib/python2.7/site-packages.

~ > brew install butterflow
==> Installing butterflow from homebrew/homebrew-science
==> Downloading https://homebrew.bintray.com/bottles-science/butterflow-0.1.9.yo
Already downloaded: /Library/Caches/Homebrew/butterflow-0.1.9.yosemite.bottle.tar.gz
==> Pouring butterflow-0.1.9.yosemite.bottle.tar.gz
🍺  /usr/local/Cellar/butterflow/0.1.9: 21 files, 192K
~ > butterflow -h
Traceback (most recent call last):
  File "/usr/local/Cellar/butterflow/0.1.9/libexec/bin/butterflow", line 9, in <module>
    load_entry_point('butterflow==0.1.9', 'console_scripts', 'butterflow')()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 357, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2394, in load_entry_point
    return ep.load()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2108, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/local/Cellar/butterflow/0.1.9/libexec/lib/python2.7/site-packages/butterflow/cli.py", line 6, in <module>
    from cv2 import calcOpticalFlowFarneback as sw_farneback_optical_flow
ImportError: No module named cv2
~ > locate cv2.so
/usr/local/Cellar/opencv/2.4.11/lib/python2.7/site-packages/cv2.so
/usr/local/lib/python2.7/site-packages/cv2.so
~ > cat `brew --prefix`/Cellar/butterflow/0.1.9/bin/butterflow
#!/bin/bash
PYTHONPATH="/usr/local/Cellar/butterflow/0.1.9/libexec/lib/python2.7/site-packages" exec "/usr/local/Cellar/butterflow/0.1.9/libexec/bin/butterflow" "$@"

Runtime error raised

I have been using your Butterflow recently.

Thank you so much for creating this.

This is a great package and is working fine for most of the videos I am processing with.

However, when I was processing one video yesterday, the terminal raised one runtime error.

I have tried to figure out why myself but failed.

The script I have been using is:

butterflow -r 24 --fast-pyr test1.avi -o output.mp4

I have attached the raised information below:

rendering: 88%

Traceback (most recent call last):

File "/usr/local/Cellar/butterflow/0.2.1/libexec/bin/butterflow", line 9, in <module>

  load_entry_point('butterflow==0.2.1', 'console_scripts', 'butterflow')()

File "/usr/local/Cellar/butterflow/0.2.1/libexec/lib/python2.7/site-packages/butterflow/cli.py", line 277, in main

  number=1)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/timeit.py", line 236, in timeit

  return Timer(stmt, setup, timer).timeit(number)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/timeit.py", line 201, in timeit

  timing = self.inner(it, self.timer)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/timeit.py", line 100, in inner

  _func()

File "/usr/local/Cellar/butterflow/0.2.1/libexec/lib/python2.7/site-packages/butterflow/render.py", line 331, in render

  self.render_subregion(sub)

File "/usr/local/Cellar/butterflow/0.2.1/libexec/lib/python2.7/site-packages/butterflow/render.py", line 191, in render_subregion

  fr_2 = self.fr_source.read()

File "/usr/local/Cellar/butterflow/0.2.1/libexec/lib/python2.7/site-packages/butterflow/source.py", line 39, in read

  raise RuntimeError

RuntimeError

May I know what does this mean?

build fails with "file not found" errors despite deps being installed

build fails with errors along the lines of:

/usr/home/tyson/Git/butterflow/butterflow/avinfo.c:5:10: fatal error: 'libavcodec/avcodec.h' file not found

despite the correct dependencies being installed.

I'm not particularly familiar with python, is there something I can change in the setup script to manually point the virtualenv to the correct include locations?

Build fails at "ld: cannot find -lopencv_ca3d"

Trying to build this from source. All dependencies installed. Failing at:

$ python setup.py init
error: invalid command 'init'
$ python setup.py install
...
c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/butterflow/motion/conversion.o build/temp.linux-x86_64-2.7/butterflow/motion/ocl_interpolate.o build/temp.linux-x86_64-2.7/butterflow/motion/ocl_optical_flow.o build/temp.linux-x86_64-2.7/butterflow/motion/py_motion.o -L/usr/local/lib -lopencv_ca3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_ocl -lopencv_photo -lopencv_stitching -lopencv_superres -lopencv_ts.a -lopencv_video -lopencv_videostab -lrt -lpthread -lm -ldl -lpython2.7 -lOpenCL -o build/lib.linux-x86_64-2.7/butterflow/motion/py_motion.so -shared -Wl,--export-dynamic
/usr/bin/ld: cannot find -lopencv_ca3d
collect2: error: ld returned 1 exit status
error: command 'c++' failed with exit status 1

OpenCV was build with command:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_opencv_python=ON -D WITH_OPENCL=ON -D WITH_FFMPEG=ON ..

Interpolate MKV files

I'm curious if this is a feature which is possible to implement? Most of my media is in MKV format, pulled from MakeMKV. It would be fantastic if I didn't have to compress my media further in order to take advantage of this awesome program.

Error when interpolating large videos on Ubuntu

Got another one for you - I am trying to run Butterflow on a very large video which is 4096x2048 pixels. When I run it on Ubuntu using current master, I get the following error:

butterflow -v -s full,spd=1 -r 60 -o interpolated.mp4 orig-4fps.mp4
Traceback (most recent call last):
  File "/home/dan/Documents/repos/butterflow/bin/butterflow", line 9, in <module>
    load_entry_point('butterflow==0.2.0.dev0', 'console_scripts', 'butterflow')()
  File "/home/dan/Documents/repos/butterflow/butterflow/cli.py", line 218, in main
    vid_info['rate_d'])
ZeroDivisionError: float division by zero

If I downscale the video by 50% (to 2048x1024) it works fine. And the full-sized video works (eventually) on my Mac. Here are some test images if you need them (click download with browser). Thanks for taking a look!

Crash on some kind of input video

Here it is. Maybe an old issue.
I have prepared some small video sample, to demonstrate and provide debug info.

demonstration

video sample is not corrupted (id try to show it in terminal session, eyah!): show_me!

asciinema recordings, video sample, tar-gziped raw frames, if you need , you can download HERE

screenshot from 2017-02-02 01-48-03
screenshot from 2017-02-02 01-50-36
screenshot from 2017-02-02 01-51-40 - 1

Broken on OS X?

Hi there, tried mkv, avi, wmv, mp4 with no avail (multiple test files from different sources neither work).

This is the following output:

BUILD LOG: merge_mat: -D DOUBLE_SUPPORT
Error getting function data from server
OpenCV Error: Gpu API call (CL_BUILD_PROGRAM_FAILURE) in getOrBuildProgram, file /tmp/opencv20160201-24683-1mh5c76/opencv-2.4.12/modules/ocl/src/cl_programcache.cpp, line 445
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /tmp/opencv20160201-24683-1mh5c76/opencv-2.4.12/modules/ocl/src/cl_programcache.cpp:445: error: (-217) CL_BUILD_PROGRAM_FAILURE in function getOrBuildProgram

[1]    33626 abort      butterflow

Tried with: bufferflow -sm <file>, bufferflow <file>, bufferflow -sm -r 60 <file>, bufferflow -sm -r 2x <file>.

Linux: Gpu API call (CL_OUT_OF_RESOURCES) in openCLMemcpy2D

Test is failing with butterflow 0.1.8, ffmpeg 2.6.2, opencv 2.4.10, nvidia 352.09:

test_interpolate_frames_ocl_count (tests.test_interpolate.InterpolateTestCase) ... OpenCV Error: Gpu API call (CL_OUT_OF_RESOURCES) in openCLMemcpy2D, file /build/opencv/src/opencv-2.4.10/modules/ocl/src/cl_operations.cpp, line 214
terminate called after throwing an instance of 'cv::Exception'
  what():  /build/opencv/src/opencv-2.4.10/modules/ocl/src/cl_operations.cpp:214: error: (-217) CL_OUT_OF_RESOURCES in function openCLMemcpy2D

Ability to choose cache folder

Hi!

I'm using butterflow to work with some videos and i have a dedicated HDD for my work but butterflow use default Windows cache folder that is located on my system SSD. That's not good for SSD life cycle so i'm asking to add an ability to choose cache folder under Windows environment.

Kind regards, FourtyTwo.

i386 build fails on Ubuntu

Build log here

Relevant error:

In file included from butterflow/motion/py_motion.cpp:11:0:
/usr/include/CL/cl.hpp: In function 'void cl::detail::fence()':
/usr/include/CL/cl.hpp:1041:38: error: '_mm_mfence' was not declared in this scope
     inline void fence() { _mm_mfence(); }

Cannot compile butterflow

Hello there, I'm on Arch 64-bit, and I'm having trouble compiling butterflow, getting the same error message both through the instructions given on this page, and also when just installing it through the AUR.

Here are the last few lines.

(butterflow) [frictioncow@TA75M butterflow]$ python setup.py develop running develop running egg_info creating butterflow.egg-info writing butterflow.egg-info/PKG-INFO writing top-level names to butterflow.egg-info/top_level.txt writing dependency_links to butterflow.egg-info/dependency_links.txt writing entry points to butterflow.egg-info/entry_points.txt writing manifest file 'butterflow.egg-info/SOURCES.txt' reading manifest file 'butterflow.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*' found under directory 'vendor' writing manifest file 'butterflow.egg-info/SOURCES.txt' running build_ext building 'butterflow.avinfo' extension creating build creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/home creating build/temp.linux-x86_64-2.7/home/frictioncow creating build/temp.linux-x86_64-2.7/home/frictioncow/butterflow creating build/temp.linux-x86_64-2.7/home/frictioncow/butterflow/butterflow gcc -pthread -fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fPIC -I/usr/include/python2.7 -c /home/frictioncow/butterflow/butterflow/avinfo.c -o build/temp.linux-x86_64-2.7/home/frictioncow/butterflow/butterflow/avinfo.o -std=c11 -Wno-unused-variable -Wno-unused-function -Wno-cpp creating build/lib.linux-x86_64-2.7 creating build/lib.linux-x86_64-2.7/butterflow gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro build/temp.linux-x86_64-2.7/home/frictioncow/butterflow/butterflow/avinfo.o -L/usr/lib -lavcodec -lavformat -lavutil -lpython2.7 -o build/lib.linux-x86_64-2.7/butterflow/avinfo.so -shared -Wl,--export-dynamic building 'butterflow.ocl' extension gcc -pthread -fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fPIC -I/usr/include/python2.7 -c /home/frictioncow/butterflow/butterflow/ocl.c -o build/temp.linux-x86_64-2.7/home/frictioncow/butterflow/butterflow/ocl.o -std=c11 -Wno-unused-variable -Wno-unused-function -Wno-cpp gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro build/temp.linux-x86_64-2.7/home/frictioncow/butterflow/butterflow/ocl.o -L/usr/lib -lOpenCL -lpython2.7 -o build/lib.linux-x86_64-2.7/butterflow/ocl.so -shared -Wl,--export-dynamic building 'butterflow.motion' extension creating build/temp.linux-x86_64-2.7/home/frictioncow/butterflow/vendor creating build/temp.linux-x86_64-2.7/home/frictioncow/butterflow/vendor/opencv-ndarray-conversion creating build/temp.linux-x86_64-2.7/home/frictioncow/butterflow/vendor/opencv-ndarray-conversion/src gcc -pthread -fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fPIC -I/home/frictioncow/butterflow/vendor/opencv-ndarray-conversion/include -I/usr/include/python2.7 -c /home/frictioncow/butterflow/butterflow/motion.cpp -o build/temp.linux-x86_64-2.7/home/frictioncow/butterflow/butterflow/motion.o -Wno-unused-variable -Wno-unused-function -Wno-cpp /home/frictioncow/butterflow/butterflow/motion.cpp:6:31: fatal error: opencv2/ocl/ocl.hpp: No such file or directory #include <opencv2/ocl/ocl.hpp> ^ compilation terminated. error: command 'gcc' failed with exit status 1

Any help with this? Thanks for the time.

OSX 10.10.4 failing with error: Python quit unexpectedly while using the libopencv_core.2.4.dylib plug-in.

I've tried installing this on two different macs and getting the same error on both systems (both 10.10.4).

Install seems clean through homebrew but hitting errors here when I try to run an example:

Skip unsupported version of OpenCL device: GeForce 9400(Apple)
OpenCV Error: Assertion failed (localThreads[1] <= ctx->getDeviceInfo().maxWorkItemSizes[1]) in openCLVerifyKernel, file /tmp/opencv20150814-93244-t3dr3h/opencv-2.4.12/modules/ocl/src/cl_operations.cpp, line 347
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /tmp/opencv20150814-93244-t3dr3h/opencv-2.4.12/modules/ocl/src/cl_operations.cpp:347: error: (-215) localThreads[1] <= ctx->getDeviceInfo().maxWorkItemSizes[1] in function openCLVerifyKernel

then Python seems to crash and a box containing the error:

"Python quit unexpectedly while using the libopencv_core.2.4.dylib plug-in."

comes up and terminal just seems to hang at this:
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Only just getting to grips with terminal and not experienced in Python so any help much appreciated.

This is what I'm trying to run:
butterflow -r 120 quarter_speed.mov

Full output:

ffmpeg version 2.7.2 Copyright (c) 2000-2015 the FFmpeg developers
built with Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.7.2_1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libvorbis --enable-libass --enable-vda
libavutil 54. 27.100 / 54. 27.100
libavcodec 56. 41.100 / 56. 41.100
libavformat 56. 36.100 / 56. 36.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 16.101 / 5. 16.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.100 / 1. 2.100
libpostproc 53. 3.100 / 53. 3.100
Skip unsupported version of OpenCL device: GeForce 9400(Apple)
OpenCV Error: Assertion failed (localThreads[1] <= ctx->getDeviceInfo().maxWorkItemSizes[1]) in openCLVerifyKernel, file /tmp/opencv20150814-93244-t3dr3h/opencv-2.4.12/modules/ocl/src/cl_operations.cpp, line 347
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /tmp/opencv20150814-93244-t3dr3h/opencv-2.4.12/modules/ocl/src/cl_operations.cpp:347: error: (-215) localThreads[1] <= ctx->getDeviceInfo().maxWorkItemSizes[1] in function openCLVerifyKernel

Abort trap: 6
bernards-iMac:coco_50 bernard$ Input #0, rawvideo, from 'pipe:':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: rawvideo (BGR[24] / 0x18524742), bgr24, 2400x1560, -2102181 kb/s, 120 tbr, 120 tbn, 120 tbc
[libx264 @ 0x7f99d1813400] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
[libx264 @ 0x7f99d1813400] profile High, level 5.2
[libx264 @ 0x7f99d1813400] 264 - core 146 r2555 0c21480 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=6 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=30 rc=crf mbtree=1 crf=18.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/var/folders/n3/q1fsbqj97ls8k07h94dl78840000gn/T/butterflow-0.1.9/quarter_speed.mov.1439491471.0.1.0.x.x.x.libx264.rnd.mp4':
Metadata:
encoder : Lavf56.36.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 2400x1560, q=-1--1, 120 fps, 15360 tbn, 120 tbc
Metadata:
encoder : Lavc56.41.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Running Extremely Slow on OS X?

It took me 8 hours to render a 5 minute video from 24 fps to 60fps. I'm not sure if that's normal but it's a hell of a long time. Is there anything I can do to speed it up? I'm using a early 2013 rMBP.

It also doesn't show much cpu or gpu usage when rendering. Occasional spikes up to 15% or so but never any solid extreme usage like ffmpeg does when converting.

If you want a quick -d of my specs:
OpenCL devices:
Platform : Apple
Platform Vendor : Apple
Platform Version : OpenCL 1.2 (Oct 14 2016 20:24:13)
Device : Intel(R) Core(TM) i7-3635QM CPU @ 2.40GHz
Version : OpenCL 1.2
Version : 1.1
Work Size : 1024, 1024x1x1
Compatible : No
Device : HD Graphics 4000
Version : OpenCL 1.2
Version : 1.2(Oct 19 2016 00:25:17)
Work Size : 512, 512x512x512
Compatible : Yes
Device : GeForce GT 650M
Version : OpenCL 1.2
Version : 10.12.68 355.10.05.05b16
Work Size : 1024, 1024x1024x64
Compatible : Yes

Help with installing Butterflow on Ubuntu and Debian

I'm trying the install on ubuntu.

Now got stuck with

/usr/bin/ld: /usr/local/lib/libavformat.a(allformats.o): relocation R_X86_64_32 against `ff_a64_muxer' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavformat.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

So now I'm trying to reinstall ffmpeg from source.

Thanks

Linux: Gpu API call (CL_INVALID_VALUE) in ContextImpl

With butterflow 0.1.8, ffmpeg 2.6.2, opencv 2.4.10:

OpenCV Error: Gpu API call (CL_INVALID_VALUE) in ContextImpl, file /build/opencv/src/opencv-2.4.10/modules/ocl/src/cl_context.cpp, line 578
ERROR: Can't select OpenCL device: GeForce GTX 760(NVIDIA CUDA)
ERROR: Required OpenCL device not found, check configuration: 
Platform: any
Device types: GPU CPU 
Device name: any
OpenCV Error: Unknown error code -221 (Can't select OpenCL device) in getContext, file /build/opencv/src/opencv-2.4.10/modules/ocl/src/cl_context.cpp, line 684
terminate called after throwing an instance of 'cv::Exception'
what(): /build/opencv/src/opencv-2.4.10/modules/ocl/src/cl_context.cpp:684: error: (-221) Can't select OpenCL device in function getContext

Can't run: py_motion.so: undefined symbol: clReleaseDevice

Trying to run this on Mint Linux 17, built from source version c82e5be:

$ butterflow -h
Traceback (most recent call last):
  File "/usr/local/bin/butterflow", line 9, in <module>
    load_entry_point('butterflow==0.1.4a1', 'console_scripts', 'butterflow')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 351, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2363, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2088, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/local/lib/python2.7/dist-packages/butterflow-0.1.4a1-py2.7-linux-x86_64.egg/butterflow/butterflow.py", line 2, in <module>
    from motion.flow import Flow
  File "/usr/local/lib/python2.7/dist-packages/butterflow-0.1.4a1-py2.7-linux-x86_64.egg/butterflow/motion/flow.py", line 3, in <module>
    import py_motion
ImportError: /usr/local/lib/python2.7/dist-packages/butterflow-0.1.4a1-py2.7-linux-x86_64.egg/butterflow/motion/py_motion.so: undefined symbol: clReleaseDevice

Also running tests fails:

$ sudo python setup.py test
running test
running egg_info
writing butterflow.egg-info/PKG-INFO
writing top-level names to butterflow.egg-info/top_level.txt
writing dependency_links to butterflow.egg-info/dependency_links.txt
writing entry points to butterflow.egg-info/entry_points.txt
reading manifest file 'butterflow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'repos'
warning: no previously-included files found matching '*.clb'
warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching '.gitmodules'
writing manifest file 'butterflow.egg-info/SOURCES.txt'
running build_ext
copying build/lib.linux-x86_64-2.7/butterflow/media/py_libav_info.so -> butterflow/media
copying build/lib.linux-x86_64-2.7/butterflow/motion/py_motion.so -> butterflow/motion
Traceback (most recent call last):
  File "setup.py", line 360, in <module>
    test_suite='tests'
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/test.py", line 135, in run
    self.with_project_on_sys_path(self.run_tests)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/test.py", line 116, in with_project_on_sys_path
    func()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/test.py", line 160, in run_tests
    testLoader = cks
  File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)
  File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs
    self.createTests()
  File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests
    self.module)
  File "/usr/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python2.7/unittest/loader.py", line 103, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/test.py", line 36, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/usr/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
    parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'test_project'

Crash on Windows 8

I am trying to run the Windows Portable butterflow-0.2.2 version on my PC, but the whole system freezes when I try working on any video. Basic commands like "help" work fine though.

I am running Windows 8 on a Asus rog gl551JW.

Any idea what the problem might be?

Document example animation settings

The examples you have in your README are awesome. Can you share what settings those animations were created? I'm having a heck of a time getting my animation that good looking.

Thanks!

Build fails at "ld: framework not found CoreImage"

Hello everyone,
I'm completely new to all of this so please forgive me if I'm asking some obvious things.

By the way I tried to install BF directly from homebrew with the command "brew install homebrew/science/butterflow". The installation after a while (after the command "cmake .. -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG
==> make" 17%)
fails and says:
ld: framework not found CoreImage
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libopencv_highgui.2.4.13.dylib] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2
(before that there are several lines
The installation suggests me to look at opencv: Fix "ld: framework not found CoreImage" on old OSs https://github.com/Homebrew/homebrew-science/pull/4747 but I really can't understand what I'm supposed to do with that

I tried to to unistall and reinstall everything many times with no luck.

Is it possible to have some help?

I'm on a rMBP mid 2015, Yosemite.

Thanks a lot,

SL

Lots of blending and wondering pixels.

I have a video 30fps ( http://www.vassfamily.net/tmp/t.avi ) trying to push it to 60fps, but there are way too many artifacts (as in wondering pixels and blendings) in the resulting video. Especially when there is motion both from left-right and right-left. I even colored the lines slightly differently trying to aid in the process, with no avail.
I tried :

$ butterflow -l -v -r 8x -s a=0:0:1,b=0:0:15,spd=0.1 --iters 32 --winsize 180 --levels 32 -ff gaussian --poly-s=1000.0 t.avi -o trial.mp4

after this didn't produce the right stream :
$ butterflow -l -v -r 2x -s a=0:0:1,b=0:0:15,spd=1 --iters 32 --winsize 180 --levels 32 -ff gaussian --poly-s=500.0 t.avi -o trialo.mp4

Feedback or advice is welcome, I tried pretty much everything...

Build on windows

I need help please I do not know step "Go into the source directory and make a build folder inside it."
which program I have use for build opencv source code,
thanks for help

Running tests fails at test_ocl_interpolate_flow_hires

After a '$ python setup.py test' with nvidia-352 drivers on ubuntu, i have this error:

test_ocl_interpolate_flow_form (tests.test_motion.InterpolateFlowTestCase) ... ok
test_ocl_interpolate_flow_hires (tests.test_motion.InterpolateFlowTestCase) ... OpenCV Error: Gpu API call (CL_MEM_OBJECT_ALLOCATION_FAILURE) in openCLExecuteKernel, file /build/buildd/opencv-2.4.9/modules/ocl/src/cl_operations.cpp, line 413
terminate called after throwing an instance of 'cv::Exception'
  what():  /build/buildd/opencv-2.4.9/modules/ocl/src/cl_operations.cpp:413: error: (-217) CL_MEM_OBJECT_ALLOCATION_FAILURE in function openCLExecuteKernel

Whats's wrong ? Is it a bug ?

Thanx

Fails when parallel processing files with same name

Hello,

I have detected that when butterflow processes two different files with the same filename (but in different folders) at the same time, it fails at the last step.

The reason seems to be that it creates a temporary mp4 file for each process with the input file name. When the process is complete, it moves the temporary file to the final destination and deletes it. The second process will fail at the last step, as the temporary file no longer exists.

I could not check if both processes are actually trying to write to the same temporary file.

Traceback (most recent call last):
  File "/usr/local/Cellar/butterflow/0.2.1/libexec/bin/butterflow", line 9, in <module>
    load_entry_point('butterflow==0.2.1', 'console_scripts', 'butterflow')()
  File "/usr/local/Cellar/butterflow/0.2.1/libexec/lib/python2.7/site-packages/butterflow/cli.py", line 277, in main
    number=1)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/timeit.py", line 236, in timeit
    return Timer(stmt, setup, timer).timeit(number)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/timeit.py", line 201, in timeit
    timing = self.inner(it, self.timer)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/timeit.py", line 100, in inner
    _func()
  File "/usr/local/Cellar/butterflow/0.2.1/libexec/lib/python2.7/site-packages/butterflow/render.py", line 343, in render
    shutil.move(tempfile1, self.dest)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
    copy2(src, real_dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 130, in copy2
    copyfile(src, dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/var/folders/d2/fsvb3lvn54s4vljh3cx0zxc40000gn/T/butterflow-0.2.1/total_2.mp4'

"Unable to read frame" error + video with time skip when Butterflowing lossily

I'm using the master branch version and found that some videos that I create end up being created with a break or time skip in the middle, and butterflow exits with

Could not read frame:
Traceback (most recent call last):
  File "/Users/danieldelany/Documents/repos/butterflow/butterflow/render.py", line 400, in render_subregion
    fr_2 = framesrc.read()
  File "/Users/danieldelany/Documents/repos/butterflow/butterflow/source.py", line 48, in read
    'unable to read a frame at idx {}'.format(self.index))
RuntimeError: unable to read a frame at idx 88.0

Full verbose output here. The frame index is always the last or nearly last frame. But, for whatever reason, I've found that this error never occurs if I run butterflow in lossless mode [edit: on my Mac], so I simply do that and then compress with ffmpeg after.

Here are the images I'm using, and here's the video it creates - note the skip at 16 seconds. The commands I'm running are:

ffmpeg -y -framerate 2 -pattern_type glob -i './*.jpg' -c:v libx264 -preset ultrafast -qp 0 -r 2 -pix_fmt yuv420p original-2fps.mp4
butterflow -v -r 60 -o interpolated-2-60fps-1x.mp4 -s a=0,b=8,spd=1:a=8,b=8.5,spd=0.3333333333333333:a=8.5,b=16,spd=1:a=16,b=16.5,spd=0.5:a=16.5,b=end,spd=1 original-2fps.mp4

And this yields the error. But if I run the same butterflow command with the -l flag included [on my Mac], the lossless video seems to be fine and doesn't get the error. Thanks for your help!

Butterflow adds duplicate frames between video segments

Hi dthpham,

First off, thanks for making Butterflow - it's pretty awesome. I've been using it on satellite photos from Himawari 8 with great results. The only other open source tool I've found that is similar is slowMoVideo, and your Farneback algorithm seems to perform a lot better than their Kanade-Lucas algorithm, at least for my purposes - here's a test I did to compare them.

Anyway, I've run into a bit of a problem - As you can see a few times in that example, there are a few missing images which cause some distracting time shifts. Normally the satellite takes images once every 10 minutes, but it misses a few observations every day in order to do 'housekeeping' - ie. checking itself out, reporting diagnostic data to Earth, making sure it is in the right orbit, etc. Here's another example in gif form, the original images at 2fps:

original images at 2 FPS

It's not super obvious here, but there are 4 missing frames in this sequence - a set of 2 near the beginning, then 1, then another near the end. Here's the result when I Butterflow interpolate it to 30fps. Everything looks great, but the missing frames become more apparent, since the now-smooth video appears to speed up during these segments:

butterflow interpolation of original, not adjusted for missing frames

OK, no problem, I thought. Butterflow has an option to have different segments interpolated at different speeds, so I wrote a little script that parses through the image timestamps and searches for gaps, then generates a butterflow command to interpolate them at the right speeds. So if we are normally interpolating to 0.05x speed but there is one image missing, that segment would get interpolated at 0.025x instead, or at (0.05/n)x when n images are missing. Cool, it works, and gives me something like the following:

butterflow -l -r 30 -o time-adjusted.mp4 -s \
a=0,b=0.36666666666666664,spd=0.05:\
a=0.36666666666666664,b=0.4,spd=0.016666666666666666:\
a=0.4,b=0.5,spd=0.05:\
a=0.5,b=0.5333333333333333,spd=0.025:\
a=0.5333333333333333,b=0.8666666666666667,spd=0.05:\
a=0.8666666666666667,b=0.9,spd=0.025:\
a=0.9,b=end,spd=0.05 \

However, here's the problem - when I actually run this command, Butterflow seems to create some duplicate frames between the segments which cause the video to pause and be even less smooth than before. Here's the result:

butterflow interpolation with time adjustment, butterflow added duplicate frames

I've tried it a few different ways but I always seem to get these pauses, which seems to be a bug. However, I watched the preview window closely during the video creation and it does seem to correctly apply the time shifts at the right parts, they are just broken up by the pauses. This allowed me to find a workaround which seems to work for now to remove the duplicate frames:

  • Create the above video with Butterflow in lossless (-l) mode.
  • Extract the frames to PNG files using ffmpeg
  • Run fdupes -d on the frames to delete duplicate frames
  • ffmpeg the frames back into a video

If I do all of that, I get a nice beautiful result which nearly matches what I'd expect (although the shifts are still seen a little bit):

butterflow interpolation with time adjustment and duplicate frames removed

However, it would be nice not to have to do this in my pipeline if Butterflow handled it better.

I've just noticed something else which may be the root cause of this bug - Butterflow seems to add extra frames at the end of all videos to satisfy the "speed" parameter, which I think is incorrect. For example, lets say I have a 1 second video which I want to butterflow to 0.1x speed - I would naively expect the result to be 10 seconds long, and indeed, that's what Butterflow gives me. But let's say I have a video only 3 frames long. Butterflow returns 30 frames - but the last 9 frames are just duplicates of the last real frame. I think the correct result is actually to return a video with 22 frames - 1 real, 9 interpolated, 1 real, 9 interpolated, 1 real - even though 22 is not truly 3/0.1.

Anyway, apologies for the giant ticket, and thanks again :) Hope it's helpful.

-d

Upgrade to OpenCV 3

Can you upgrade this project to OpenCV 3? OpenCV 2 is deprecated on Arch Linux and I need OpenCV 3 for my study and other programs that depend on it. I also can't install both version 2 and 3 alongside each other, so it would be pretty nice if you could upgrade to version 3.

Performance issue on Ubuntu 15.04

I have been seeing degraded performance lately on the master branch on my Ubuntu machine, as compared to my Macbook. I have been trying to bisect the issue, and I think I finally have: It appears to be caused by 61daeca. When I compile from 61daeca and run Butterflow on a 400x400x20sec video, it takes 4 minutes to run, but when I compile from c1003ed (the previous commit) and run it on the same video, it takes 0.26 minutes.

Although the commit is aptly named ("Use veryslow preset when encoding"), I never would have suspected it, for two reasons:

  1. I have been running ffmpeg veryslow encoding on Butterflow output for awhile now and it is relatively performant, and more strangely:
  2. I get the same bad performance even when running Butterflow in lossless mode!

So to sum up, on Ubuntu only, with or without the lossless flag:

butterflow -l -v -r 60 -o interpolated.mp4 -s full,spd=0.75 original.mp4
# takes 0.26 minutes compiled from c1003ed
# takes 3.97 minutes compiled from 61daeca
ffmpeg -y -i interpolated.mp4 -preset veryslow compressed.mp4
# takes 0.11 minutes

Thanks for the help!

butterflow fails to write output when output rate is not 30fps

By sheer luck, I tried 30fps for my first run of butterflow, and it worked great. This was my incantation:

butterflow -e -m -v -r30 in.mp4 -o interp.mp4

(in.mp4 is a 24000/1001 1920x1040 video)
It also succeeds with 30000 / 1001, 48000 / 1001, and 96000 / 1001
But when I tried it with 59.95, and 60, it fails

[aaron@aka Wall Street REMASTERED (1987) [1080p]]$ butterflow -e -m -v -r60 in.mp4 -o interp.mp4
[butterflow:INFO]: Version 0.2.3
[butterflow:INFO]: Cache directory:	/tmp/butterflow-0.2.3
[butterflow:INFO]: At least one compatible OpenCL device was detected
[butterflow:INFO]: Using device: Ellesmere (autoselected)
[butterflow:INFO]: Hardware acceleration is enabled
[butterflow:INFO]: Rendering:
[butterflow:INFO]: Sequence: Duration=0:00:10.110000 (10.11s), Frames=242, Rate=23.9760246277
[butterflow:INFO]: Subregion (0): Time=0:00:00-0:00:10.110000 Frames=0-241 Speed=1.0,Duration=?,Fps=?
[butterflow:INFO]: Rendering to:	in.24805.mp4
[butterflow:INFO]: Final destination:	interp.mp4
[butterflow:INFO]: [Subprocess] Opening a pipe to the video writer
[butterflow:INFO]: Rendering progress:	0.00%
[butterflow:INFO]: Start working on Subregion (0): Time=0:00:00-0:00:10.110000 Frames=0-241 Speed=1.0,Duration=?,Fps=?
[butterflow:INFO]: Frames in region:	0-241
[butterflow:INFO]: Region length:	242
[butterflow:INFO]: Region duration:	10.110000s
[butterflow:INFO]: Number of frame pairs:	241
[butterflow:INFO]: Interpolation rate:	2
[butterflow:INFO]: Time stepping:	0.333,0.667
[butterflow:INFO]: Frames to write:	606
[butterflow:INFO]: Will interpolate:	723
[butterflow:INFO]: Extra frames (to discard):	117
[butterflow:INFO]: Drop every:	6
[butterflow:INFO]: Dupe every:	0
[butterflow:INFO]: Ready to run:	242 times
[butterflow:INFO]: Showing a sample of the first and last 15 runs:
[butterflow:INFO]: To write: S0	I1,1	0.33%
[butterflow:INFO]: To write: S1	I2,0	0.83%
[butterflow:INFO]: To write: S2	I1,1	1.16%
[butterflow:INFO]: To write: S3	I1,1	1.49%
[butterflow:INFO]: To write: S4	I2,0	1.98%
[butterflow:INFO]: To write: S5	I1,1	2.31%
[butterflow:INFO]: To write: S6	I2,0	2.81%
[butterflow:INFO]: To write: S7	I1,1	3.14%
[butterflow:INFO]: To write: S8	I1,1	3.47%
[butterflow:INFO]: To write: S9	I2,0	3.96%
[butterflow:INFO]: To write: S10	I1,1	4.29%
[butterflow:INFO]: To write: S11	I2,0	4.79%
[butterflow:INFO]: To write: S12	I1,1	5.12%
[butterflow:INFO]: To write: S13	I1,1	5.45%
[butterflow:INFO]: To write: S14	I2,0	5.94%
[butterflow:INFO]: To write: S15	I1,1	6.27%
[butterflow:INFO]: <Snipping 212 runs from the console, but will update progress periodically every 21 frames rendered>
[butterflow:INFO]: <Rendering progress: 8.25%>
[butterflow:INFO]: <Rendering progress: 16.67%>
[butterflow:INFO]: <Rendering progress: 25.25%>
[butterflow:INFO]: <Rendering progress: 33.50%>
[butterflow:INFO]: <Rendering progress: 41.91%>
[butterflow:INFO]: <Rendering progress: 50.33%>
[butterflow:INFO]: <Rendering progress: 58.91%>
[butterflow:INFO]: <Rendering progress: 67.33%>
[butterflow:INFO]: <Rendering progress: 75.74%>
[butterflow:INFO]: <Rendering progress: 83.99%>
[butterflow:WARNING]: B is None
[butterflow:INFO]: To write: S216
[butterflow:WARNING]: Dropping S216
[butterflow:INFO]: Run 217 (this is the final run):
[butterflow:ERROR]: A is None
[butterflow:INFO]: To write: S217
Traceback (most recent call last):
  File "/usr/bin/butterflow", line 11, in <module>
    load_entry_point('butterflow==0.2.3', 'console_scripts', 'butterflow')()
  File "/usr/lib/python2.7/site-packages/butterflow/cli.py", line 441, in main
    number=1)
  File "/usr/lib/python2.7/timeit.py", line 237, in timeit
    return Timer(stmt, setup, timer).timeit(number)
  File "/usr/lib/python2.7/timeit.py", line 202, in timeit
    timing = self.inner(it, self.timer)
  File "/usr/lib/python2.7/timeit.py", line 100, in inner
    _func()
  File "/usr/lib/python2.7/site-packages/butterflow/render.py", line 467, in render
    self.render_subregion(sub)
  File "/usr/lib/python2.7/site-packages/butterflow/render.py", line 414, in render_subregion
    draw.draw_marker(fr, fill=fr_type == 'INTERPOLATED')
  File "/usr/lib/python2.7/site-packages/butterflow/draw.py", line 15, in wrapper
    scale = min(float(fr.shape[1]) / float(w_fits),
AttributeError: 'NoneType' object has no attribute 'shape'
[butterflow:INFO]: [Subprocess] Closing pipe to the video writer

It seems to be failing somewhere in the middle of the video output.

Can't Run on Windows

Hi, I've tried to build it on win7 without virtaulenv, using command:
"python setup.py build",
then "python setup.py install".
The process seems to be good without any error.
However, when running butterflow, it failed to load dll.
The messages as follows:

Traceback (most recent call last):
File "C:\Python27\Scripts\butterflow-script.py", line 9, in
load_entry_point('butterflow==0.2.1.dev0', 'console_scripts', 'butterflow')()
File "C:\Python27\lib\site-packages\pkg_resources__init__.py", line 552, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "C:\Python27\lib\site-packages\pkg_resources__init__.py", line 2672, inload_entry_point
return ep.load()
File "C:\Python27\lib\site-packages\pkg_resources__init__.py", line 2345, inload
return self.resolve()
File "C:\Python27\lib\site-packages\pkg_resources__init__.py", line 2351, inresolve
module = import(self.module_name, fromlist=['name'], level=0)
File "build\bdist.win32\egg\butterflow\cli.py", line 9, in < module >
from butterflow.settings import default as settings
File "build\bdist.win32\egg\butterflow\settings.py", line 13, in < module >
import butterflow.motion
File "build\bdist.win32\egg\butterflow\motion.py", line 7, in < module >
File "build\bdist.win32\egg\butterflow\motion.py", line 6, in __ bootstrap __
ImportError: DLL load failed: The specified module could not be found。

Thankx!

Lots of artifacts and blending in spite of settings otherwise

I have a video 30fps ( http://www.vassfamily.net/tmp/t.avi ) trying to push it to 60fps, but there are way too many artifacts (as in wondering pixels and blendings) in the resulting video. Especially when there is motion both from left-right and right-left. I even colored the lines slightly differently trying to aid in the process, with no avail.
I tried :

$ butterflow -l -v -r 8x -s a=0:0:1,b=0:0:15,spd=0.1 --iters 32 --winsize 180 --levels 32 -ff gaussian --poly-s=1000.0 t.avi -o trial.mp4

after this didn't produce the right stream :
$ butterflow -l -v -r 2x -s a=0:0:1,b=0:0:15,spd=1 --iters 32 --winsize 180 --levels 32 -ff gaussian --poly-s=500.0 t.avi -o trialo.mp4

Feedback or advice is welcome, I tried pretty much everything...

unrecognized arguments

Hi while i was trying to use butterflow it gave me this error, im not sure what i did wrong.
My imput:
Desktop\butterflow-0.2.2\butterflow.exe -audio -v -r 60 -ff gaussian (and then the video adress)
The error;
butterflow.exe: error: unrecognized arguments: --multiprocessing-fork
usage: butterflow [options] [video]

Assertion desc failed at libswscale/swscale_internal.h

OS:arch
butterflow from git
ffmpeg 3.1.4

I just installed butterflow but can't get any file to be converted, always got this:

% butterflow -r 3x VIDE0024.AVI :(
rendering: 0%Assertion desc failed at libswscale/swscale_internal.h:674
[rawvideo demuxer @ 0x5622aaf354e0] Unable to parse option value "0x0" as image size
[rawvideo demuxer @ 0x5622aaf354e0] Error setting option video_size to value 0x0.
pipe:: Invalid argument
[1] 29526 abort (core dumped) butterflow -r 3x VIDE0024.AVI

or

% butterflow -r 3x VIDE0024.AVI
rendering: 0%Traceback (most recent call last):
File "/usr/bin/butterflow", line 9, in
load_entry_point('butterflow==0.2.2.dev0', 'console_scripts', 'butterflow')()
File "build/bdist.linux-x86_64/egg/butterflow/cli.py", line 277, in main
File "/usr/lib/python2.7/timeit.py", line 237, in timeit
return Timer(stmt, setup, timer).timeit(number)
File "/usr/lib/python2.7/timeit.py", line 202, in timeit
timing = self.inner(it, self.timer)
File "/usr/lib/python2.7/timeit.py", line 100, in inner
_func()
File "build/bdist.linux-x86_64/egg/butterflow/render.py", line 331, in render
File "build/bdist.linux-x86_64/egg/butterflow/render.py", line 164, in render_subregion
File "build/bdist.linux-x86_64/egg/butterflow/source.py", line 39, in read
RuntimeError
[rawvideo demuxer @ 0x56073eaee4e0] Unable to parse option value "0x0" as image size
[rawvideo demuxer @ 0x56073eaee4e0] Error setting option video_size to value 0x0.
pipe:: Invalid argument

no matter the video.

Do I miss something ?

OSX: Force BF to use discrete GPU

BF is using integrated GPU which is quite less powerful. Discrete GPU would be little faster I guess.

butterflow -d
OpenCL devices:
Platform : Apple
Platform Vendor : Apple
Platform Version : OpenCL 1.2 (Dec 9 2016 21:36:44)
Device : Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Version : OpenCL 1.2
Version : 1.1
Device : Iris Pro
Version : OpenCL 1.2
Version : 1.2(Dec 9 2016 21:49:33)
Device : AMD Radeon R9 M370X Compute Engine
Version : OpenCL 1.2
Version : 1.2 (Dec 9 2016 21:43:55)

Or is it possible to thread to both GPU to increase the overall speed?

Artifact when interpolating

Hi There,
I've noticed many artifacts when converting 30fps to 50fps video using this command line:

butterflow.exe -r 50 file.mp4

thank you

Can't Run on Windows

Hi, I've tried to build it on win7 without virtaulenv, using command:
"python setup.py build",
then "python setup.py install".
The process seems to be good without any error.
However, when running butterflow, it failed to load dll.
The messages as follows:

Traceback (most recent call last):
File "C:\Python27\Scripts\butterflow-script.py", line 9, in
load_entry_point('butterflow==0.2.1.dev0', 'console_scripts', 'butterflow')()
File "C:\Python27\lib\site-packages\pkg_resources__init__.py", line 552, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "C:\Python27\lib\site-packages\pkg_resources__init__.py", line 2672, inload_entry_point
return ep.load()
File "C:\Python27\lib\site-packages\pkg_resources__init__.py", line 2345, inload
return self.resolve()
File "C:\Python27\lib\site-packages\pkg_resources__init__.py", line 2351, inresolve
module = import(self.module_name, fromlist=['name'], level=0)
File "build\bdist.win32\egg\butterflow\cli.py", line 9, in
from butterflow.settings import default as settings
File "build\bdist.win32\egg\butterflow\settings.py", line 13, in
import butterflow.motion
File "build\bdist.win32\egg\butterflow\motion.py", line 7, in
File "build\bdist.win32\egg\butterflow\motion.py", line 6, in bootstrap
ImportError: DLL load failed: The specified module could not be found。

Thanks!

Does not install with homebrew

brew install homebrew/science/butterflow
==> Tapping homebrew/science
Cloning into '/usr/local/Library/Taps/homebrew/homebrew-science'...
remote: Counting objects: 694, done.
remote: Compressing objects: 100% (687/687), done.
remote: Total 694 (delta 0), reused 52 (delta 0), pack-reused 0
Receiving objects: 100% (694/694), 635.30 KiB | 0 bytes/s, done.
Checking connectivity... done.
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/ann.rb
undefined method `rebuild' for #<BottleSpecification:0x10492d858>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/aragorn.rb
undefined method `rebuild' for #<BottleSpecification:0x10490e070>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/bayestraits.rb
compile error
/usr/local/Library/Taps/homebrew/homebrew-science/bayestraits.rb:35: syntax error, unexpected tSTRING_BEG, expecting tAMPER
	system ENV.cc, *args, "-o", "bayestraits"
						   ^
/usr/local/Library/Taps/homebrew/homebrew-science/bayestraits.rb:35: syntax error, unexpected ',', expecting kEND
	system ENV.cc, *args, "-o", "bayestraits"
							   ^
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/beagle.rb
undefined method `rebuild' for #<BottleSpecification:0x1047ca6c8>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/biopp.rb
undefined method `rebuild' for #<BottleSpecification:0x1045854d0>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/clustal-w.rb
undefined method `rebuild' for #<BottleSpecification:0x1049c4aa0>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/colpack.rb
undefined method `rebuild' for #<BottleSpecification:0x1049961f0>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/cufflinks.rb
undefined method `rebuild' for #<BottleSpecification:0x1049195d8>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/einspline.rb
undefined method `rebuild' for #<BottleSpecification:0x1053c60d0>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/exonerate.rb
undefined method `rebuild' for #<BottleSpecification:0x10537f6a8>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/fasttree.rb
undefined method `rebuild' for #<BottleSpecification:0x10535aba0>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/flint.rb
undefined method `rebuild' for #<BottleSpecification:0x105314f60>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/geneid.rb
undefined method `rebuild' for #<BottleSpecification:0x10527dae8>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/grabix.rb
undefined method `rebuild' for #<BottleSpecification:0x1051e0860>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/harry.rb
undefined method `rebuild' for #<BottleSpecification:0x105195018>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/[email protected]
No available formula with the name "[email protected]" 
In formula file: /usr/local/Library/Taps/homebrew/homebrew-science/[email protected]
Expected to find class Hdf5@18, but only found: Hdf5AT18.
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/hlaminer.rb
undefined method `rebuild' for #<BottleSpecification:0x1051550a8>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/hmmer2.rb
undefined method `rebuild' for #<BottleSpecification:0x10514ad88>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/hyphy.rb
compile error
/usr/local/Library/Taps/homebrew/homebrew-science/hyphy.rb:20: syntax error, unexpected ':', expecting kEND
  depends_on mpi: :optional
				 ^
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/iva.rb
undefined method `rebuild' for #<BottleSpecification:0x10509b590>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/jellyfish-1.1.rb
undefined method `rebuild' for #<BottleSpecification:0x1050942e0>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/kmc.rb
"cxx14" is not a recognized standard
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/links-scaffolder.rb
compile error
/usr/local/Library/Taps/homebrew/homebrew-science/links-scaffolder.rb:34: syntax error, unexpected tSTRING_BEG, expecting tAMPER
...  system ENV.cxx, *cxxflags, "-c", "-fPIC", "-I#{perl}", "Bl...
							  ^
/usr/local/Library/Taps/homebrew/homebrew-science/links-scaffolder.rb:34: syntax error, unexpected ',', expecting kEND
...stem ENV.cxx, *cxxflags, "-c", "-fPIC", "-I#{perl}", "BloomF...
							  ^
/usr/local/Library/Taps/homebrew/homebrew-science/links-scaffolder.rb:34: syntax error, unexpected ',', expecting kEND
...cxx, *cxxflags, "-c", "-fPIC", "-I#{perl}", "BloomFilter_wra...
							  ^
/usr/local/Library/Taps/homebrew/homebrew-science/links-scaffolder.rb:34: syntax error, unexpected ',', expecting kEND
...s, "-c", "-fPIC", "-I#{perl}", "BloomFilter_wrap.cxx"
							  ^
/usr/local/Library/Taps/homebrew/homebrew-science/links-scaffolder.rb:35: syntax error, unexpected tSTRING_BEG, expecting tAMPER
...  system ENV.cxx, *cxxflags, "-shared", "-o", "BloomFilter.#...
							  ^
/usr/local/Library/Taps/homebrew/homebrew-science/links-scaffolder.rb:35: syntax error, unexpected ',', expecting kEND
...ENV.cxx, *cxxflags, "-shared", "-o", "BloomFilter.#{so}", "B...
							  ^
/usr/local/Library/Taps/homebrew/homebrew-science/links-scaffolder.rb:35: syntax error, unexpected ',', expecting kEND
...x, *cxxflags, "-shared", "-o", "BloomFilter.#{so}", "BloomFi...
							  ^
/usr/local/Library/Taps/homebrew/homebrew-science/links-scaffolder.rb:35: syntax error, unexpected ',', expecting kEND
...d", "-o", "BloomFilter.#{so}", "BloomFilter_wrap.o", "-L#{pe...
							  ^
/usr/local/Library/Taps/homebrew/homebrew-science/links-scaffolder.rb:35: syntax error, unexpected ',', expecting kEND
....#{so}", "BloomFilter_wrap.o", "-L#{perl}", "-lperl"
							  ^
/usr/local/Library/Taps/homebrew/homebrew-science/links-scaffolder.rb:35: syntax error, unexpected ',', expecting kEND
...omFilter_wrap.o", "-L#{perl}", "-lperl"
							  ^
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/mcl.rb
undefined method `rebuild' for #<BottleSpecification:0x1051a1340>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/metaphlan.rb
undefined method `rebuild' for #<BottleSpecification:0x105167e38>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/metis.rb
undefined method `rebuild' for #<BottleSpecification:0x105156f48>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/multi-worm-tracker.rb
undefined method `rebuild' for #<BottleSpecification:0x10505d0d8>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/ncl.rb
undefined method `rebuild' for #<BottleSpecification:0x104fe6fa0>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/neuron.rb
undefined method `rebuild' for #<BottleSpecification:0x104fa8db8>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/nfft.rb
undefined method `rebuild' for #<BottleSpecification:0x104f8a890>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/oases.rb
undefined method `rebuild' for #<BottleSpecification:0x104f393a0>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/opencv.rb
undefined method `rebuild' for #<BottleSpecification:0x104e5a650>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/openni2.rb
undefined method `version_scheme' for #<Class:0x105318598>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/pcb.rb
undefined method `version_scheme' for Formulary::FormulaNamespacec5091eb1842699f6ce3d04293a715f7d::Pcb:Class
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/phlawd.rb
undefined method `rebuild' for #<BottleSpecification:0x1050c6da8>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/plink.rb
undefined method `rebuild' for #<BottleSpecification:0x104fe89b8>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/populations.rb
compile error
/usr/local/Library/Taps/homebrew/homebrew-science/populations.rb:30: syntax error, unexpected tSTRING_BEG, expecting tAMPER
...make", ".", *std_cmake_args, "-DCMAKE_PREFIX_PATH=#{Formula[...
							  ^
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/r-gui.rb
compile error
/usr/local/Library/Taps/homebrew/homebrew-science/r-gui.rb:3: syntax error, unexpected ':', expecting ')'
  satisfy(build_env: false) { OS.mac? }
					^
/usr/local/Library/Taps/homebrew/homebrew-science/r-gui.rb:3: syntax error, unexpected '}', expecting kEND
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/repeatscout.rb
undefined method `rebuild' for #<BottleSpecification:0x104ddd1f0>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/rnammer.rb
undefined method `rebuild' for #<BottleSpecification:0x104dc95d8>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/rstudio-server.rb
compile error
/usr/local/Library/Taps/homebrew/homebrew-science/rstudio-server.rb:216: syntax error, unexpected ')'
/usr/local/Library/Taps/homebrew/homebrew-science/rstudio-server.rb:265: syntax error, unexpected $end, expecting kEND
__END__
 ^
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/[email protected]
No available formula with the name "[email protected]" 
In formula file: /usr/local/Library/Taps/homebrew/homebrew-science/[email protected]
Expected to find class Samtools@01, but only found: SamtoolsAT01.
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/scram.rb
"cxx14" is not a recognized standard
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/sdsl-lite.rb
compile error
/usr/local/Library/Taps/homebrew/homebrew-science/sdsl-lite.rb:40: syntax error, unexpected tSTRING_BEG, expecting tAMPER
	system *ENV.cxx.split, "-o", exe,
							^
/usr/local/Library/Taps/homebrew/homebrew-science/sdsl-lite.rb:40: syntax error, unexpected ',', expecting kEND
	system *ENV.cxx.split, "-o", exe,
								^
/usr/local/Library/Taps/homebrew/homebrew-science/sdsl-lite.rb:41: syntax error, unexpected ',', expecting tCOLON2 or '[' or '.'
	  "-I#{opt_include}", pkgshare/"examples/fm-index.cpp",
						 ^
/usr/local/Library/Taps/homebrew/homebrew-science/sdsl-lite.rb:41: syntax error, unexpected ',', expecting kEND
/usr/local/Library/Taps/homebrew/homebrew-science/sdsl-lite.rb:42: syntax error, unexpected ',', expecting kEND
	  "-L#{opt_lib}", "-lsdsl", "-ldivsufsort", "-ldivsufsort64"
					 ^
/usr/local/Library/Taps/homebrew/homebrew-science/sdsl-lite.rb:42: syntax error, unexpected ',', expecting kEND
	  "-L#{opt_lib}", "-lsdsl", "-ldivsufsort", "-ldivsufsort64"
							   ^
/usr/local/Library/Taps/homebrew/homebrew-science/sdsl-lite.rb:42: syntax error, unexpected ',', expecting kEND
	  "-L#{opt_lib}", "-lsdsl", "-ldivsufsort", "-ldivsufsort64"
											   ^
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/sfscode.rb
undefined method `rebuild' for #<BottleSpecification:0x104cf6d18>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/simpleitk.rb
undefined method `version_scheme' for #<Class:0x1053d0210>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/siril.rb
undefined method `rebuild' for #<BottleSpecification:0x1053aaad8>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/snap.rb
undefined method `rebuild' for #<BottleSpecification:0x1052cae10>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/tamarin-prover.rb
compile error
/usr/local/Library/Taps/homebrew/homebrew-science/tamarin-prover.rb:34: syntax error, unexpected tSTRING_BEG, expecting tAMPER
..."stack", "-j#{jobs}", *args, "install", "--flag", "tamarin-p...
							  ^
/usr/local/Library/Taps/homebrew/homebrew-science/tamarin-prover.rb:34: syntax error, unexpected ',', expecting kEND
..."-j#{jobs}", *args, "install", "--flag", "tamarin-prover:thr...
							  ^
/usr/local/Library/Taps/homebrew/homebrew-science/tamarin-prover.rb:34: syntax error, unexpected ',', expecting kEND
...", *args, "install", "--flag", "tamarin-prover:threaded"
							  ^
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/trimal.rb
undefined method `rebuild' for #<BottleSpecification:0x104d49590>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/veclibfort.rb
compile error
/usr/local/Library/Taps/homebrew/homebrew-science/veclibfort.rb:3: syntax error, unexpected ':', expecting ')'
  satisfy(build_env: false) { OS.mac? }
					^
/usr/local/Library/Taps/homebrew/homebrew-science/veclibfort.rb:3: syntax error, unexpected '}', expecting kEND
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/velvet.rb
undefined method `rebuild' for #<BottleSpecification:0x104ca85f0>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/weblogo.rb
undefined method `rebuild' for #<BottleSpecification:0x104a59790>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/wfdb.rb
undefined method `rebuild' for #<BottleSpecification:0x104a49930>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/wiggletools.rb
undefined method `rebuild' for #<BottleSpecification:0x104a408f8>
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-science/xraylib.rb
undefined method `rebuild' for #<BottleSpecification:0x1049cc020>
Error: Cannot tap homebrew/science: invalid syntax in tap!

ArchLinux: patched PKGBUILD for opencv2-opt AUR package

Hi. I'm providing this files for those who (heavily) depend on opencv3 and can not just replace it with the older v2. I experimented a lot and finally got your app working with the /opt libraries from the opencv2-opt AUR package 😃

PKGBUILD

pkgname=butterflow
pkgver=0.2.3
pkgrel=1
pkgdesc="Make slow motion and motion interpolated videos from the command line"
arch=('x86_64')
url="https://github.com/dthpham/butterflow"
license=('custom')
makedepends=('python2-setuptools' 'opencl-headers')
depends=('python2-numpy' 'ffmpeg' 'opencv2-opt' 'ocl-icd')
optdepends=('intel-opencl-runtime: Intel processor device support'
            'opencl-nvidia: NVIDIA device support'
            'amdapp-sdk: AMD device suppport')
provides=('butterflow')
conflicts=('butterflow')
install=butterflow.install
source=("http://srv.dthpham.me/butterflow/releases/${pkgname}-${pkgver}.tar.gz"
        "opencv2-opt.patch" "butterflow-opt.sh")
sha256sums=('83e3ce52eef57ae2e4f4b3dc98d97ab354621e4a095d9734751bd876c34b755e'
            'SKIP' 'SKIP')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  # apply opencv2-opt patch to use the opencv2 inside /opt
  # for those who need/depend on opencv3 and can not just replace it with the older version
  patch -p1 < "../opencv2-opt.patch"
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  python2 setup.py install --root="${pkgdir}/" --optimize=1
  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

  # install wrapper script to set LD_LIBRARY_PATH and PYTHONPATH before launching butterflow
  # note: the python script must be named exactly 'butterflow' or weird import errors occur :/
  mkdir -p "${pkgdir}/usr/lib/butterflow"
  mv "${pkgdir}/usr/bin/butterflow" "${pkgdir}/usr/lib/butterflow/butterflow"
  install -m755 ../butterflow-opt.sh "${pkgdir}/usr/bin/butterflow"
}

opencv2-opt.patch

--- butterflow-0.2.3/setup.cfg.orig	2017-04-10 23:34:55.000000000 +0200
+++ butterflow-0.2.3/setup.cfg	2017-06-27 10:37:44.281444271 +0200
@@ -3,3 +3,7 @@
 tag_date = 0
 tag_svn_revision = 0
 
+[build_ext]
+include-dirs=/opt/opencv2/include
+library-dirs=/opt/opencv2/lib
+rpath=True

butterflow-opt.sh

#!/bin/bash

export LD_LIBRARY_PATH="/opt/opencv2/lib:$LD_LIBRARY_PATH"
export PYTHONPATH="/opt/opencv2/lib/python2.7/site-packages:$PYTHONPATH"
exec /usr/lib/butterflow/butterflow "$@"

I hope this helps some people. It took me way too long to figure this out.

Duration does not change after -r 2x

Do I understand correctly that after running butterflow -r 2x in.mp4 the output video doubles in duration? If it was 10s it becomes 20s?

I'm running into an issue when the command executes without errors, but I get Drop every: 3 and the video retains the initial duration.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.