"package video is empty"

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

"package video is empty"

acoustic77
Hello all,
 
I am needing to use octave to create a .avi file, but it doesn't have the avifile command.  I downloaded the video package from Octave Forge (which has the command).  When i navigate to it and type "pkg install video-1.0.2.tar.gz" the prompt returns:
 
warning: package video is empty
 
If I unzip the file though, I can look and see that it is not empty.  How do I install this package?  Thanks for the help!
 
-Cameron

_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: "package video is empty"

Andreas Weber-3
Am 02.08.2013 21:13, schrieb Cameron MacArthur:
> I am needing to use octave to create a .avi file, but it doesn't have
> the avifile command.  I downloaded the video package from Octave Forge
> (which has the command).  When i navigate to it and type "pkg install
> video-1.0.2.tar.gz" the prompt returns:
>  
> warning: package video is empty

Dear Cameron,
the 1.0.2 package was released 2009 and I doubt it will compile on any
recent distribution. You may try the hg repo:

http://sourceforge.net/p/octave/video/ci/default/tree/

I tried it today on debian stable with
ffmpeg and libavformat-dev 8:1.0.7-dmo2

Basically you have to install ffmpeg, libavformat-dev, libswscale-dev,
liboctave-dev (for mkoctfile) and then

hg clone http://hg.code.sf.net/p/octave/video octave-video
cd  octave-video/src
./bootstrap
./configure
apply my patch for ffmpeg>0.8:

diff -r 02f3aacc2f71 src/AVHandler.cc
--- a/src/AVHandler.cc Mon Jun 17 23:26:31 2013 +0100
+++ b/src/AVHandler.cc Mon Aug 05 10:54:39 2013 +0200
@@ -120,19 +120,12 @@
         if (add_video_stream() != 0) return -1;
     }

-    /* av_set_parameters is mandatory */
-    // FIXME: deprecated, but there's no replacement yet
-    if (av_set_parameters(av_output, NULL) < 0) {
-        (*out) << "AVHandler: Error setting output format parameters"
<< std::endl;
-        return -1;
-    }
-
     snprintf(av_output->filename, sizeof(av_output->filename), "%s",
filename.c_str());
 // FIXME:    snprintf(av_output->title, sizeof(av_output->title), "%s",
title.c_str());
 // FIXME:    snprintf(av_output->author, sizeof(av_output->author),
"%s", author.c_str());
 // FIXME:    snprintf(av_output->comment, sizeof(av_output->comment),
"%s", comment.c_str());

-    if (avio_open(&av_output->pb, filename.c_str(), URL_WRONLY) < 0) {
+    if (avio_open(&av_output->pb, filename.c_str(), AVIO_FLAG_WRITE) < 0) {
         (*out) << "AVHandler: Could not open \"" << filename << "\" for
output" << std::endl;
         return -1;
     }
@@ -383,7 +376,7 @@
     AVCodec *codec;
     for (codec = av_codec_next(0); codec != NULL; codec =
av_codec_next(codec)) {
         if ((codec->type == AVMEDIA_TYPE_VIDEO) &&
-            (codec->encode)) {
+            (av_codec_is_encoder (codec))) {
             (*out) << codec->name << " ";
         }
     }

and then make. You may the run the tests in octave

octave:1> test avifile.cc
PASSES 1 out of 1 tests
octave:2> test aviread.cc
AVHandler: Error reading packet after timestamp 0
  ***** xtest
 fn = tmpnam;
 x = avifile(fn);
 I = ones(256,256);
 addframe(x, I);
 clear x
 #FIXME: This fails if there is only 1 frame
 I = aviread(fn, 1);
!!!!! known failure
aviread: cannot read frame 1
PASSES 2 out of 2 tests (1 expected failures)
octave:3> test addframe.cc
PASSES 1 out of 1 tests

HTH, Andy

_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: "package video is empty"

Andreas Weber-3
Dear Cameron, please keep the mailing list in CC,

>Am 05.08.2013 11:06, schrieb Andreas Weber:
>> Am 02.08.2013 21:13, schrieb Cameron MacArthur:
>>> I am needing to use octave to create a .avi file, but it doesn't have
>>> the avifile command.  I downloaded the video package from Octave Forge
>>> (which has the command).  When i navigate to it and type "pkg install
>>> video-1.0.2.tar.gz" the prompt returns:
>>>  
>>> warning: package video is empty
>>
>> Dear Cameron,
>> the 1.0.2 package was released 2009 and I doubt it will compile on any
>> recent distribution. You may try the hg repo:
>>
>> http://sourceforge.net/p/octave/video/ci/default/tree/
>>
>> I tried it today on debian stable with ffmpeg and libavformat-dev 8:1.0.7-dmo2
>> ...

Am 06.08.2013 20:14, schrieb Cameron MacArthur:
> Thanks again for all of this help, you're a life saver.  I was
wondering if you could explain a little bit more though.  Sorry, I'm
very much an octave and Matlab newbie, so my knowledge of this stuff is
scarce.  When you say to "try the hg repo" what do you mean?  I went to
that link and it has a bunch of different files.  I went into the src
folder and there are a bunch of files there too.  I'm not sure what I
need to download from there.  Would you mind explaining a bit more?  Do
I need anything from that link? or do I just install ffmpeg,
libavformat-dev, libswscale-dev, liboctave-dev (for mkoctfile) and then
run your patch there?
> I'm running Windows7, and I believe I'm running Octave 3.6.1 (should
be the newest or close to it because I downloaded it in the last month).

I never build octave or an octave-forge package for windows so I won't
be a help here. Btw, for windows there is AFAIK a MinGW build, a MSVC
build, a cygwin and a experimental MXE build.

But as I can see from the octave wiki
http://wiki.octave.org/Octave_for_Windows#Octave-3.6.4-mingw_.2B_octaveforge_pkgs
there should be a working video package with Octave-3.6.4-mingw and
octaveforge pkgs.

So my suggestion for you is:
Try to install
http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.4%20for%20Windows%20MinGW%20installer/
read the Octave3.6.4_gcc4.6.2_sourceforge_readme.txt thoughtfully and
install the forge packages. You should then have also a working video
package.

Hope that helps, Andy


_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: "package video is empty"

acoustic77
In reply to this post by acoustic77
Oh sorry!  I'll try downloading those octave and forge packages that you said and let you know how it goes.  Thank you!

 

----- Original Message -----

From: Andreas Weber

Sent: 08/06/13 05:30 PM

To: Cameron MacArthur

Subject: Re: "package video is empty"

 
Dear Cameron, please keep the mailing list in CC, 

>Am 05.08.2013 11:06, schrieb Andreas Weber: 
>> Am 02.08.2013 21:13, schrieb Cameron MacArthur: 
>>> I am needing to use octave to create a .avi file, but it doesn't have 
>>> the avifile command.  I downloaded the video package from Octave Forge 
>>> (which has the command).  When i navigate to it and type "pkg install 
>>> video-1.0.2.tar.gz" the prompt returns: 
>>>  
>>> warning: package video is empty 
>> 
>> Dear Cameron, 
>> the 1.0.2 package was released 2009 and I doubt it will compile on any 
>> recent distribution. You may try the hg repo: 
>> 
>> http://sourceforge.net/p/octave/video/ci/default/tree/ 
>> 
>> I tried it today on debian stable with ffmpeg and libavformat-dev 8:1.0.7-dmo2 
>> ... 

Am 06.08.2013 20:14, schrieb Cameron MacArthur: 
> Thanks again for all of this help, you're a life saver.  I was 
wondering if you could explain a little bit more though.  Sorry, I'm 
very much an octave and Matlab newbie, so my knowledge of this stuff is 
scarce.  When you say to "try the hg repo" what do you mean?  I went to 
that link and it has a bunch of different files.  I went into the src 
folder and there are a bunch of files there too.  I'm not sure what I 
need to download from there.  Would you mind explaining a bit more?  Do 
I need anything from that link? or do I just install ffmpeg, 
libavformat-dev, libswscale-dev, liboctave-dev (for mkoctfile) and then 
run your patch there? 
> I'm running Windows7, and I believe I'm running Octave 3.6.1 (should 
be the newest or close to it because I downloaded it in the last month). 

I never build octave or an octave-forge package for windows so I won't 
be a help here. Btw, for windows there is AFAIK a MinGW build, a MSVC 
build, a cygwin and a experimental MXE build. 

But as I can see from the octave wiki 
http://wiki.octave.org/Octave_for_Windows#Octave-3.6.4-mingw_.2B_octaveforge_pkgs 
there should be a working video package with Octave-3.6.4-mingw and 
octaveforge pkgs. 

So my suggestion for you is: 
Try to install 
http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.4%20for%20Windows%20MinGW%20installer/ 
read the Octave3.6.4_gcc4.6.2_sourceforge_readme.txt thoughtfully and 
install the forge packages. You should then have also a working video 
package. 

Hope that helps, Andy

 


_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: "package video is empty"

acoustic77
In reply to this post by acoustic77
Andy,
 
I followed the readme to the t and it all seems to have installed correctly.  Also, as you said, one of the packages listed is a video package, so it should be in there.  That being said, when I run the script I have that contains the avifile command I get:
 
error: 'avifile'undefined near line 35 column 7
 
Did I install the packages incorrectly? Is there a way to check?  Or maybe is avifile just not included in this video package?
If avifile isn't included, is there some other video-making command that I can use?  I don't absolutely need an .avi video, I just need to make a video.
 
Thanks for all your help and patience with this.
 
-Cam

 

----- Original Message -----

From: Andreas Weber

Sent: 08/06/13 05:30 PM

To: Cameron MacArthur

Subject: Re: "package video is empty"

 
Dear Cameron, please keep the mailing list in CC, 

>Am 05.08.2013 11:06, schrieb Andreas Weber: 
>> Am 02.08.2013 21:13, schrieb Cameron MacArthur: 
>>> I am needing to use octave to create a .avi file, but it doesn't have 
>>> the avifile command.  I downloaded the video package from Octave Forge 
>>> (which has the command).  When i navigate to it and type "pkg install 
>>> video-1.0.2.tar.gz" the prompt returns: 
>>>  
>>> warning: package video is empty 
>> 
>> Dear Cameron, 
>> the 1.0.2 package was released 2009 and I doubt it will compile on any 
>> recent distribution. You may try the hg repo: 
>> 
>> http://sourceforge.net/p/octave/video/ci/default/tree/ 
>> 
>> I tried it today on debian stable with ffmpeg and libavformat-dev 8:1.0.7-dmo2 
>> ... 

Am 06.08.2013 20:14, schrieb Cameron MacArthur: 
> Thanks again for all of this help, you're a life saver.  I was 
wondering if you could explain a little bit more though.  Sorry, I'm 
very much an octave and Matlab newbie, so my knowledge of this stuff is 
scarce.  When you say to "try the hg repo" what do you mean?  I went to 
that link and it has a bunch of different files.  I went into the src 
folder and there are a bunch of files there too.  I'm not sure what I 
need to download from there.  Would you mind explaining a bit more?  Do 
I need anything from that link? or do I just install ffmpeg, 
libavformat-dev, libswscale-dev, liboctave-dev (for mkoctfile) and then 
run your patch there? 
> I'm running Windows7, and I believe I'm running Octave 3.6.1 (should 
be the newest or close to it because I downloaded it in the last month). 

I never build octave or an octave-forge package for windows so I won't 
be a help here. Btw, for windows there is AFAIK a MinGW build, a MSVC 
build, a cygwin and a experimental MXE build. 

But as I can see from the octave wiki 
http://wiki.octave.org/Octave_for_Windows#Octave-3.6.4-mingw_.2B_octaveforge_pkgs 
there should be a working video package with Octave-3.6.4-mingw and 
octaveforge pkgs. 

So my suggestion for you is: 
Try to install 
http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.4%20for%20Windows%20MinGW%20installer/ 
read the Octave3.6.4_gcc4.6.2_sourceforge_readme.txt thoughtfully and 
install the forge packages. You should then have also a working video 
package. 

Hope that helps, Andy

 


_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: "package video is empty"

Andreas Weber-3




Cameron MacArthur <[hidden email]> schrieb:

>Andy,
>
>I followed the readme to the t and it all seems to have installed
>correctly. Also, as you said, one of the packages listed is a video
>package, so it should be in there. That being said, when I run the
>script I have that contains the avifile command I get:
>
> *error: 'avifile'undefined near line 35 column 7*
>
>Did I install the packages incorrectly? Is there a way to check? Or
>maybe is avifile just not included in this video package?
>If avifile isn't included, is there some other video-making command
>that I can use? I don't absolutely need an .avi video, I just need to
>make a video.
>
>Thanks for all your help and patience with this.
>
>-Cam

Hi Cam, try
pkg list
And
pkg load video

First list all installed and loaded packages (*). This is a FAQ See in wiki.octave.org. Regards, Andy
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: "package video is empty"

acoustic77
In reply to this post by acoustic77
At the first command, the list of all the packages shows up (video included).  The second command just returns a new line.  i.e.:

 

octave:2> pkg load video

octave:3>

 

Also, for what it's worth, a lot of error messages come up at start-up now. (This didn't happen right after I installed the packages)  But, I've been messing around trying to install cygwin, so that could have caused some problems.  Maybe I should just try re-installing octave now that cygwin is up and running?

 

Here's my Octave start-up:

 

GNU Octave, version 3.6.4

Copyright (C) 2013 John W. Eaton and others.

This is free software; see the source code for copying conditions.

There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or

FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

 

Octave was configured for "i686-pc-mingw32".

 

Additional information about Octave is available at http://www.octave.org.

 

Please contribute if you find this software useful.

For more information, visit http://www.octave.org/get-involved.html

 

Read http://www.octave.org/bugs.html to learn how to submit bug reports.

 

For information about changes from previous versions, type `news'.

 

warning: dispatch is obsolete and will be removed from a future version of Octave; please use classes instead

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\center.m shadows a core library functio

n

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\cor.m shadows a core library function

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\corrcoef.m shadows a core library funct

ion

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\cov.m shadows a core library function

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\detrend.m shadows a core library functi

on

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\iqr.m shadows a core library function

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\kurtosis.m shadows a core library funct

ion

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\mean.m shadows a core library function

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\meansq.m shadows a core library functio

n

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\median.m shadows a core library functio

n

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\moment.m shadows a core library functio

n

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\normcdf.m shadows a core library functi

on

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\norminv.m shadows a core library functi

on

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\normpdf.m shadows a core library functi

on

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\prctile.m shadows a core library functi

on

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\quantile.m shadows a core library funct

ion

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\range.m shadows a core library function

 

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\ranks.m shadows a core library function

 

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\skewness.m shadows a core library funct

ion

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\spearman.m shadows a core library funct

ion

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\std.m shadows a core library function

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\sumsq.m shadows a built-in function

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\tcdf.m shadows a core library function

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\tinv.m shadows a core library function

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\tpdf.m shadows a core library function

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\var.m shadows a core library function

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\nan-2.5.5\zscore.m shadows a core library functio

n

warning: gmsh does not seem to be present some functionalities will be disabled

warning: dx does not seem to be present some functionalities will be disabled

warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\statistics-1.2.0\fstat.m shadows a core library f

unction

 

 

-Cam

----- Original Message -----

From: Andreas Weber

Sent: 08/09/13 07:44 AM

To: Cameron MacArthur

Subject: Re: "package video is empty"

 
Cameron MacArthur <[hidden email]> schrieb: 
>Andy, 
> 
>I followed the readme to the t and it all seems to have installed 
>correctly. Also, as you said, one of the packages listed is a video 
>package, so it should be in there. That being said, when I run the 
>script I have that contains the avifile command I get: 
> 
> *error: 'avifile'undefined near line 35 column 7* 
> 
>Did I install the packages incorrectly? Is there a way to check? Or 
>maybe is avifile just not included in this video package? 
>If avifile isn't included, is there some other video-making command 
>that I can use? I don't absolutely need an .avi video, I just need to 
>make a video. 
> 
>Thanks for all your help and patience with this. 
> 
>-Cam 

Hi Cam, try 
pkg list 
And 
pkg load video 

First list all installed and loaded packages (*). This is a FAQ See in wiki.octave.org. Regards, Andy

 


_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: "package video is empty"

acoustic77
In reply to this post by acoustic77
Andy,
 
I re-installed and got rid of the errors, but the error for avifile still comes up.  I navigated to the packages and I think I may have found the problem.  All off the package folders contain a bunch of .m files (all of their functions) but the video package and a few others are empty except for a "packinfo" folder.
 
-Cam

 

----- Original Message -----

From: Andreas Weber

Sent: 08/09/13 07:44 AM

To: Cameron MacArthur

Subject: Re: "package video is empty"

 
Cameron MacArthur <[hidden email]> schrieb: 
>Andy, 
> 
>I followed the readme to the t and it all seems to have installed 
>correctly. Also, as you said, one of the packages listed is a video 
>package, so it should be in there. That being said, when I run the 
>script I have that contains the avifile command I get: 
> 
> *error: 'avifile'undefined near line 35 column 7* 
> 
>Did I install the packages incorrectly? Is there a way to check? Or 
>maybe is avifile just not included in this video package? 
>If avifile isn't included, is there some other video-making command 
>that I can use? I don't absolutely need an .avi video, I just need to 
>make a video. 
> 
>Thanks for all your help and patience with this. 
> 
>-Cam 

Hi Cam, try 
pkg list 
And 
pkg load video 

First list all installed and loaded packages (*). This is a FAQ See in wiki.octave.org. Regards, Andy

 


_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: "package video is empty"

PhilipNienhuis
First of all, please stop top-posting. Answer below the email.

Then:

Cameron MacArthur wrote
Andy,

I re-installed and got rid of the errors, but the error for avifile still comes up. I navigated to the packages and I think I may have found the problem. All off the package folders contain a bunch of .m files (all of their functions) but the video package and a few others are empty except for a "packinfo" folder.
That is not a problem at all; it only means the package has no m-files but only binary (= compiled) procedures. Indeed, that is the case for the video package.
The (binar) functions live in <OCTAVE_HOME>/lib/octave/packages/video/<some_arch_specific_folder>/, rather than in <OCTAVE_HOME>/share/octave/packages/video/
You could see that by trying:
which avifile
and it will show you the path to the avifile command - IF the package was loaded, see 2.  below.

So it appears to me that the problem you have is twofold:

1. The video package hasn't been maintained for a long time and suffers bitrot. IOW, it may not work as well as you hope it does.
The last working version that actually worked to some extent for me was the one bundled with octave-3.4.3_gcc4.5.2 for windows. The video packages supplied with later Octave binaries for windows (MSVC or MinGW) didn't work so well for me anymore.

2. (As Andy suggested) The video package probably hasn't been loaded after you built/installed it. Did you try:
pkg load video
?

If the video package was loaded, and you still have no avifile command, I think you're out of luck.

Something I don't understand is why you installed the video package at all.
After all, it has been bundled/included with the Octave-3.6.4_gcc4.6.2 binary. After installing that all you had to do was simply type:
pkg load video
and it would (should) work:

octave:1> help avifile
'avifile' is a function from the file X:\Octave\Octave3.6.4_gcc4.6.2\lib\octave\packages\video-1.0.2\i686-pc-mingw32-api-v48+\avifile.oct

Philip