Octave Video Package

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Octave Video Package

Насыров Ренат
Hello!

I've tried to install package "video" on my Octave 4.0/Win 7 and got this:
 
>> pkg install -forge video
Package libavformat was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavformat.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavformat' found
Package libavcodec was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavcodec.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavcodec' found
Package libavutil was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavutil.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavutil' found
Package libswscale was not found in the pkg-config search path.
Perhaps you should add the directory containing `libswscale.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libswscale' found
configure: error: need libavformat from FFMpeg
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for mkoctfile... C:/Octave/Octave-4.0.0/bin/mkoctfile-4.0.0.exe
retrieving compile and link flags from C:/Octave/Octave-4.0.0/bin/mkoctfile-4.0.0.exe
checking for F77_FUNC... yes
checking for SLList.h... no
checking for lo_ieee_nan_value... yes
checking for octave_idx_type... no
checking for quit.h... no
checking for octave... C:/Octave/Octave-4.0.0/bin/octave-4.0.0.exe
checking for OCTAVE_VERSION in Octave... 4.0.0
checking for octave_config_info('canonical_host_type') in Octave... i686-w64-mingw32
checking for octave_config_info('SHLEXT') in Octave... dll
checking whether ln -s works... no, using cp -p
checking for ranlib... ranlib
checking for strip... strip
checking for pkg-config... pkg-config
checking for av_write_frame in -lavformat... no
pkg: error running the configure script for video.
error: called from 'configure_make' in file C:\Octave\Octave-4.0.0\share\octave\4.0.0\m\pkg\priv
ate\configure_make.m near line 79, column 9

It seems to me that the package was not supposed to be installed on a Windows machine. Am I right?
I've also noticed that the package "video" has no maintainer. I have no idea how to make it work, but I would be grateful if you give me some kind of instruction how to install the package on Windows. Maybe I even could fix the package in order to make it Windows-compatible for all Octave users. Don't sure I can maintain the whole thing, but if I find out how to do this, I can make a try.

Best regards,
Renat Nasyrov.
Reply | Threaded
Open this post in threaded view
|

Re: Octave Video Package

PrasannaKumar Muralidharan
Hi Renat,

> I've tried to install package "video" on my Octave 4.0/Win 7 and got this:
>
>>> pkg install -forge video
> Package libavformat was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libavformat.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libavformat' found
> Package libavcodec was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libavcodec.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libavcodec' found
> Package libavutil was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libavutil.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libavutil' found
> Package libswscale was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libswscale.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libswscale' found
> configure: error: need libavformat from FFMpeg

The libraries libavcodec, libavformat, libavutil and libswscale are
part of FFMpeg / libav. Video package uses them for decoding/encoding
video data. The installation has failed as those libraries were not
found in your system.

> It seems to me that the package was not supposed to be installed on a
> Windows machine. Am I right?

FFMpeg works in windows (example VLC player uses libavcodec) so the
video package should work too.

Regards,
PrasannaKumar

Reply | Threaded
Open this post in threaded view
|

Re: Octave Video Package

PhilipNienhuis
PrasannaKumar Muralidharan wrote
Hi Renat,

> I've tried to install package "video" on my Octave 4.0/Win 7 and got this:
>
>>> pkg install -forge video
> Package libavformat was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libavformat.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libavformat' found
> Package libavcodec was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libavcodec.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libavcodec' found
> Package libavutil was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libavutil.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libavutil' found
> Package libswscale was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libswscale.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libswscale' found
> configure: error: need libavformat from FFMpeg

The libraries libavcodec, libavformat, libavutil and libswscale are
part of FFMpeg / libav. Video package uses them for decoding/encoding
video data. The installation has failed as those libraries were not
found in your system.

> It seems to me that the package was not supposed to be installed on a
> Windows machine. Am I right?
In a way, yes.  Read on...

FFMpeg works in windows (example VLC player uses libavcodec) so the
video package should work too.
.... be it that ffmpeg isn't included with the current Octave for Windows installer.

Moreover, the video package has been unmaintained for several years now.
So unless someone jumps up to bring it up-to-date, there's little hope that the video package will work anytime soon.
I think that once it works on Linux, it'll probably work in Windows as well if ffmpeg is included in the installer.

Philip
Reply | Threaded
Open this post in threaded view
|

Re: Octave Video Package

PrasannaKumar Muralidharan
In reply to this post by PrasannaKumar Muralidharan
Hi Renat,

Somehow missed to copy octave mailing list, adding it.


On 11 September 2015 at 19:07, Насыров Ренат <[hidden email]> wrote:

> Hi PrasannaKumar,
>
> Really good idea! Nevertheless, inside that shell binary I should use
> "/usr/bin/grep.exe" instead of plain "grep", so when I run ./configure, I
> get the following:
>
> configure: line 419: which: command not found
> configure: line 2895: uname: command not found
> configure: line 476: tr: command not found
> configure: line 2903: uname: command not found
> configure: line 3001: sed: command not found
> ...
> And so on. How can I make bash.exe to execute utils from its bin directory?

Adding the folder to PATH enivronment variable will do.

I did try that out. Compiled and installed ffmpeg but still the
configure script could not locate ffmpeg. Please give it a try and see
what happens. Don't have any idea whether it will work for you.

Regards,
PrasannaKumar

>
>
>
> 11.09.2015, 15:25, "PrasannaKumar Muralidharan"
> <[hidden email]>:
>
> Hi Renat,
>
>  I see that package "video" needs FFMpeg for Windows, so I have downloaded
>  the package for Windows from ffmpeg.org . Anyway, Octave still cannot find
>  it on my system. As you can see in pkg log I sent before, pkg tries to find
>  *.pc files which are surely cannot be found in Windows – all I have is a
>  bunch of FFMped DLLs. The question is: how can I make the package "video"
>  use these DLLs? Maybe you know where to find a tutorial about porting
> Octave
>  packages under Windows?
>
>
> Compile FFMpeg from source. Inside Octave installation folder there is
> bash shell binary (bash.exe). In that shell navigate to FFMpeg source
> code, run ./configure, make and make install. Once that is complete
> install the video package. In Ubuntu 14.04 video package did not
> compile. So please use a older version of FFMpeg (no idea which
> version of FFMpeg is required by the video package).
>
> Regards,
> PrasannaKumar
>
>
>
> --
> С уважением,
> Ренат Насыров
>

Reply | Threaded
Open this post in threaded view
|

Re: Octave Video Package

PhilipNienhuis
PrasannaKumar Muralidharan wrote
Hi Renat,

Somehow missed to copy octave mailing list, adding it.


On 11 September 2015 at 19:07, Насыров Ренат <[hidden email]> wrote:
> Hi PrasannaKumar,
>
> Really good idea! Nevertheless, inside that shell binary I should use
> "/usr/bin/grep.exe" instead of plain "grep", so when I run ./configure, I
> get the following:
>
> configure: line 419: which: command not found
> configure: line 2895: uname: command not found
> configure: line 476: tr: command not found
> configure: line 2903: uname: command not found
> configure: line 3001: sed: command not found
> ...
> And so on. How can I make bash.exe to execute utils from its bin directory?

Adding the folder to PATH enivronment variable will do.

I did try that out. Compiled and installed ffmpeg but still the
configure script could not locate ffmpeg. Please give it a try and see
what happens. Don't have any idea whether it will work for you.

Regards,
PrasannaKumar

>
>
>
> 11.09.2015, 15:25, "PrasannaKumar Muralidharan"
> <[hidden email]>:
>
> Hi Renat,
>
>  I see that package "video" needs FFMpeg for Windows, so I have downloaded
>  the package for Windows from ffmpeg.org . Anyway, Octave still cannot find
>  it on my system. As you can see in pkg log I sent before, pkg tries to find
>  *.pc files which are surely cannot be found in Windows – all I have is a
>  bunch of FFMped DLLs. The question is: how can I make the package "video"
>  use these DLLs? Maybe you know where to find a tutorial about porting
> Octave
>  packages under Windows?
>
>
> Compile FFMpeg from source. Inside Octave installation folder there is
> bash shell binary (bash.exe). In that shell navigate to FFMpeg source
> code, run ./configure, make and make install. Once that is complete
Inside the Octave installation I think this will only be useful if the Octave binary installer for Windows was built with the --enable-dev-tools option.
Even then, I doubt your suggestion will work as autotools and m4 etc are lacking. AFAIU the bash shell is merely meant to be able to run Octave in gdb on the Windows side.
It could be that it is fairly easy to augment the bash shell with the required development tools; on the mingw site compiled build tools are available.

> install the video package. In Ubuntu 14.04 video package did not
> compile. So please use a older version of FFMpeg (no idea which
> version of FFMpeg is required by the video package).
Although libavformat.dll, libavcodec.dd, etc aren't present in my OCTAVE_HOME/bin folder, it seems that ffmpeg *IS* (or rather: should be) included in the mxe-octave build:
- http://hg.octave.org/mxe-octave/file/c8c394328c54/src
- http://hg.octave.org/mxe-octave/rev/28fa86d2cf21
- http://hg.octave.org/mxe-octave/log/c8c394328c54/src/ffmpeg.mk

Maybe it is related to having Octave for 64-bit windows running, I don't know.  
As I'm also interested in the video package I'll have a look one of these days, but not now as I have several other priorities.

Philip
Reply | Threaded
Open this post in threaded view
|

Re: Octave Video Package

John Donoghue-3
In reply to this post by Насыров Ренат
> Message: 2
> Date: Mon, 14 Sep 2015 05:25:11 -0700 (PDT)
> From: PhilipNienhuis <[hidden email]>
> To: [hidden email]
> Subject: Re: Octave Video Package
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=UTF-8
>
> PrasannaKumar Muralidharan wrote
> > Hi Renat,
> >
> > Somehow missed to copy octave mailing list, adding it.
> >
> >
> > On 11 September 2015 at 19:07, ??????? ????? &lt;
>
> > renat-nasyrov@
>
> > &gt; wrote:
> >> Hi PrasannaKumar,
> >>
> >> Really good idea! Nevertheless, inside that shell binary I should use
> >> "/usr/bin/grep.exe" instead of plain "grep", so when I run
> >> ./configure, I get the following:
> >>
> >> configure: line 419: which: command not found
> >> configure: line 2895: uname: command not found
> >> configure: line 476: tr: command not found
> >> configure: line 2903: uname: command not found
> >> configure: line 3001: sed: command not found ...
> >> And so on. How can I make bash.exe to execute utils from its bin
> >> directory?
> >
> > Adding the folder to PATH enivronment variable will do.
> >
> > I did try that out. Compiled and installed ffmpeg but still the
> > configure script could not locate ffmpeg. Please give it a try and see
> > what happens. Don't have any idea whether it will work for you.
> >
> > Regards,
> > PrasannaKumar
> >
> >>
> >>
> >>
> >> 11.09.2015, 15:25, "PrasannaKumar Muralidharan"
> >> &lt;
>
> > prasannatsmkumar@
>
> > &gt;:
> >>
> >> Hi Renat,
> >>
> >>  I see that package "video" needs FFMpeg for Windows, so I have
> >> downloaded  the package for Windows from ffmpeg.org . Anyway, Octave
> >> still cannot find  it on my system. As you can see in pkg log I sent
> >> before, pkg tries to find  *.pc files which are surely cannot be
> >> found in Windows ? all I have is a  bunch of FFMped DLLs. The
> >> question is: how can I make the package "video"
> >>  use these DLLs? Maybe you know where to find a tutorial about
> >> porting Octave  packages under Windows?
> >>
> >>
> >> Compile FFMpeg from source. Inside Octave installation folder there
> >> is bash shell binary (bash.exe). In that shell navigate to FFMpeg
> >> source code, run ./configure, make and make install. Once that is
> >> complete
>
> Inside the Octave installation I think this will only be useful if the
Octave binary
> installer for Windows was built with the --enable-dev-tools option.
> Even then, I doubt your suggestion will work as autotools and m4 etc are
> lacking. AFAIU the bash shell is merely meant to be able to run Octave in
gdb on
> the Windows side.
> It could be that it is fairly easy to augment the bash shell with the
required

> development tools; on the mingw site compiled build tools are available.
>
>
> >> install the video package. In Ubuntu 14.04 video package did not
> >> compile. So please use a older version of FFMpeg (no idea which
> >> version of FFMpeg is required by the video package).
>
> Although libavformat.dll, libavcodec.dd, etc aren't present in my
> OCTAVE_HOME/bin folder, it seems that ffmpeg *IS* (or rather: should be)
> included in the mxe-octave build:
> - http://hg.octave.org/mxe-octave/file/c8c394328c54/src
> - http://hg.octave.org/mxe-octave/rev/28fa86d2cf21
> - http://hg.octave.org/mxe-octave/log/c8c394328c54/src/ffmpeg.mk
>
> Maybe it is related to having Octave for 64-bit windows running, I don't
know.
> As I'm also interested in the video package I'll have a look one of these
days, but
> not now as I have several other priorities.
>
> Philip
>

Ffmpeg is in the mxe sources, but doesn't get built or installed at the
moment.

I pushed some changes up on the weekend to allow it to compile in windows
and linux - it still  doesn't get built by default though, only by doing a
"make ffmpeg" prior to building the nsis installer.

I also took a quick look also at the video package, and it doesn't work for
octave 4.0.0 or for changes in ffmpeg.
I have made some changes to it that compile under linux and _should_ work in
windows as well assuming ffmpeg and devel files are installed, but havent
tried it yet.

If it does work, for a few other packages, what I have done is make the
depending libs dependancies of forge package when adding it to the list of
packages in mxe. That will then tie it all together and ffmpeg will get
built automatically.

JD





Reply | Threaded
Open this post in threaded view
|

Re: Octave Video Package

PrasannaKumar Muralidharan
In reply to this post by PhilipNienhuis
> Inside the Octave installation I think this will only be useful if the
> Octave binary installer for Windows was built with the --enable-dev-tools
> option.
> Even then, I doubt your suggestion will work as autotools and m4 etc are
> lacking. AFAIU the bash shell is merely meant to be able to run Octave in
> gdb on the Windows side.
> It could be that it is fairly easy to augment the bash shell with the
> required development tools; on the mingw site compiled build tools are
> available.

I was able to compile ffmpeg with the installed tools. make and gcc
are present and the video package had configure script.

> Although libavformat.dll, libavcodec.dd, etc aren't present in my
> OCTAVE_HOME/bin folder, it seems that ffmpeg *IS* (or rather: should be)
> included in the mxe-octave build:
> - http://hg.octave.org/mxe-octave/file/c8c394328c54/src
> - http://hg.octave.org/mxe-octave/rev/28fa86d2cf21
> - http://hg.octave.org/mxe-octave/log/c8c394328c54/src/ffmpeg.mk
>
> Maybe it is related to having Octave for 64-bit windows running, I don't
> know.
> As I'm also interested in the video package I'll have a look one of these
> days, but not now as I have several other priorities.

Please tell your observation in this.

Regards,
PrasannaKumar

Reply | Threaded
Open this post in threaded view
|

Re: Octave Video Package

PhilipNienhuis
PrasannaKumar Muralidharan wrote:

>> Inside the Octave installation I think this will only be useful if the
>> Octave binary installer for Windows was built with the --enable-dev-tools
>> option.
>> Even then, I doubt your suggestion will work as autotools and m4 etc are
>> lacking. AFAIU the bash shell is merely meant to be able to run Octave in
>> gdb on the Windows side.
>> It could be that it is fairly easy to augment the bash shell with the
>> required development tools; on the mingw site compiled build tools are
>> available.
>
> I was able to compile ffmpeg with the installed tools. make and gcc
> are present and the video package had configure script.

Yes I ignored that Octave should be able to install packages and needs
some basic tools for that.  Nice to know that some dependencies (that
are usually built outside Octave) can be built as well.

>> Although libavformat.dll, libavcodec.dd, etc aren't present in my
>> OCTAVE_HOME/bin folder, it seems that ffmpeg *IS* (or rather: should be)
>> included in the mxe-octave build:
>> - http://hg.octave.org/mxe-octave/file/c8c394328c54/src
>> - http://hg.octave.org/mxe-octave/rev/28fa86d2cf21
>> - http://hg.octave.org/mxe-octave/log/c8c394328c54/src/ffmpeg.mk
>>
>> Maybe it is related to having Octave for 64-bit windows running, I don't
>> know.
>> As I'm also interested in the video package I'll have a look one of these
>> days, but not now as I have several other priorities.
>
> Please tell your observation in this.

In the mean time JohnD already enlightened us here (see his post).

Philip


Reply | Threaded
Open this post in threaded view
|

Re: Octave Video Package

PrasannaKumar Muralidharan
Hi,

Patch attached with this email was required to make the video package
compile with latest ffmpeg 2.8 in Ubuntu 14.04. I have just compiled
the code, did not load / test.

Regards,
PrasannaKumar

On 15 September 2015 at 12:18, Philip Nienhuis <[hidden email]> wrote:

> PrasannaKumar Muralidharan wrote:
>>>
>>> Inside the Octave installation I think this will only be useful if the
>>> Octave binary installer for Windows was built with the --enable-dev-tools
>>> option.
>>> Even then, I doubt your suggestion will work as autotools and m4 etc are
>>> lacking. AFAIU the bash shell is merely meant to be able to run Octave in
>>> gdb on the Windows side.
>>> It could be that it is fairly easy to augment the bash shell with the
>>> required development tools; on the mingw site compiled build tools are
>>> available.
>>
>>
>> I was able to compile ffmpeg with the installed tools. make and gcc
>> are present and the video package had configure script.
>
>
> Yes I ignored that Octave should be able to install packages and needs some
> basic tools for that.  Nice to know that some dependencies (that are usually
> built outside Octave) can be built as well.
>
>>> Although libavformat.dll, libavcodec.dd, etc aren't present in my
>>> OCTAVE_HOME/bin folder, it seems that ffmpeg *IS* (or rather: should be)
>>> included in the mxe-octave build:
>>> - http://hg.octave.org/mxe-octave/file/c8c394328c54/src
>>> - http://hg.octave.org/mxe-octave/rev/28fa86d2cf21
>>> - http://hg.octave.org/mxe-octave/log/c8c394328c54/src/ffmpeg.mk
>>>
>>> Maybe it is related to having Octave for 64-bit windows running, I don't
>>> know.
>>> As I'm also interested in the video package I'll have a look one of these
>>> days, but not now as I have several other priorities.
>>
>>
>> Please tell your observation in this.
>
>
> In the mean time JohnD already enlightened us here (see his post).
>
> Philip
>

octave_video_ubuntu14.04.diff (2K) Download Attachment