[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "package video is empty"
From: |
Andreas Weber |
Subject: |
Re: "package video is empty" |
Date: |
Mon, 05 Aug 2013 11:06:23 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130704 Icedove/17.0.7 |
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