Difference between revisions of "Video package"

From Octave
Jump to navigation Jump to search
Line 45: Line 45:
 
* Extract include/* from ffmpeg-20160105-git-68eb208-win32-dev.7z to C:\Octave\Octave-4.0.0\include (You should now, for example, see C:\Octave\Octave-4.0.0\include\libavutil\version.h)
 
* Extract include/* from ffmpeg-20160105-git-68eb208-win32-dev.7z to C:\Octave\Octave-4.0.0\include (You should now, for example, see C:\Octave\Octave-4.0.0\include\libavutil\version.h)
 
* Extract lib/* from ffmpeg-20160105-git-68eb208-win32-dev.7z to C:\Octave\Octave-4.0.0\lib
 
* Extract lib/* from ffmpeg-20160105-git-68eb208-win32-dev.7z to C:\Octave\Octave-4.0.0\lib
 
Download a patched version (no pkg_config check for ffmpeg and PixelFormat -> AVPixelFormat) from [http://www.tech-chat.de/files/video-1.2.1_win_ffmpeg.tar.gz video-1.2.1_win_ffmpeg.tar.gz (sha1sum 3ef5b0dca471175daf769bd813b6de7fa85759df)]
 
or grab the source and apply [http://www.tech-chat.de/files/video-1.2.1_win_ffmpeg.patch this patch]
 
  
 
Compile and install from Octave with
 
Compile and install from Octave with
 
<code>
 
<code>
  pkg -verbose install video-1.2.1_win_ffmpeg.tar.gz
+
  pkg -verbose -forge install video
 
</code>
 
</code>
  
Line 60: Line 57:
  
 
=== mxe-octave ===
 
=== mxe-octave ===
You can also use mxe-octave to include ffmpeg, there is already a target for it.
+
You can also use mxe-octave to include ffmpeg, there is already a target for it. Future versions of MXE-Octave builds will already have video included.
  
 
= Known bugs =
 
= Known bugs =

Revision as of 06:01, 28 January 2016

The video package is part of the Octave Forge project and tries to implement the video functions from matlab. It should compile with ffmpeg and libav.

Installation

on Debian Jessie using "pkg -forge"

sudo apt-get install libavutil-dev libavformat-dev libswscale-dev libavcodec-dev

On the Octave prompt:

>> pkg install -forge video

on CentOS Linux release 7.2.1511 (Core) with GNU Octave Version 3.8.2

yum install octave-devel
yum install libvorbis  yasm freetype zlib bzip2 faac lame speex libvpx libogg  libtheora  x264 XviD openjpeg15 opencore-amr
wget https://libav.org/releases/libav-11.4.tar.gz
tar xzf libav-11.4.tar.gz
cd libav-11.4
./configure --enable-pic
make -j 4

as root:

make install

On the Octave prompt:

>> pkg install -forge video

On Windows

using official mxe-build and ffmpeg binaries

This is at the moment the preferred way for windows users and assumes that you've installed Octave from the official MXE build from https://ftp.gnu.org/gnu/octave/windows/ to the default path.

Download the ffmpeg binaries for windows from https://ffmpeg.zeranoe.com/builds/. You need the "32-bit Dev" and "32-bit Shared" archive. These instructions were tested with

  • ffmpeg-20160105-git-68eb208-win32-shared.7z
  • ffmpeg-20160105-git-68eb208-win32-dev.7z

Now

  • Extract the bin/*.dll from ffmpeg-20160105-git-68eb208-win32-shared.7z to C:\Octave\Octave-4.0.0\bin
  • Extract include/* from ffmpeg-20160105-git-68eb208-win32-dev.7z to C:\Octave\Octave-4.0.0\include (You should now, for example, see C:\Octave\Octave-4.0.0\include\libavutil\version.h)
  • Extract lib/* from ffmpeg-20160105-git-68eb208-win32-dev.7z to C:\Octave\Octave-4.0.0\lib

Compile and install from Octave with

pkg -verbose -forge install video

Load it before any usage:

pkg load video

mxe-octave

You can also use mxe-octave to include ffmpeg, there is already a target for it. Future versions of MXE-Octave builds will already have video included.

Known bugs

  • On MXE-Octave with ffmpeg crosscompiled "clear all" after using "addframe" causes a segmentation fault

Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1956.0xdd4] 0x77d6e3c6 in ntdll!RtlInitUnicodeString () from C:\Windows\SysWOW64\ntdll.dll (gdb) bt

  1. 0 0x77d6e3c6 in ntdll!RtlInitUnicodeString ()
  from C:\Windows\SysWOW64\ntdll.dll
  1. 1 0x19380000 in ?? ()
  2. 2 0x77d6e013 in ntdll!RtlFreeHeap () from C:\Windows\SysWOW64\ntdll.dll
  3. 3 0x778698cd in msvcrt!free () from C:\Windows\syswow64\msvcrt.dll
  4. 4 0x19380000 in ?? ()
  5. 5 0x1dc016c6 in AVHandler::~AVHandler (this=0x1da579a8,
   __in_chrg=<optimized out>) at AVHandler.cc:99
  1. 6 0x1dc0384a in Avifile::~Avifile (this=0x1dac8570,
   __in_chrg=<optimized out>) at oct-avifile.cc:149