bugGNU Octave - Bugs: bug #57020, [octave-forge] (video): missing...


bug #57020: [octave-forge] (video): missing VideoWriter

Submitted by:  Pantxo Diribarne <pantxo>
Submitted on:  Tue 08 Oct 2019 11:56:39 AM UTC  
Category:  Octave Forge Package Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  In Progress Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


( Jump to the original submission)

Mon 24 Feb 2020 03:43:25 PM UTC, comment #12: 

I've uploaded a release request here: https://sourceforge.net/p/octave/package-releases/404/

Andreas Weber <andy1978>
Project Member
Thu 06 Feb 2020 05:29:35 AM UTC, comment #11: 

What about a new release of Video Package for the upcoming 6.x version?

There is a great advantage in the package (VideoReader, VideoWriter).

Avinoam Kalma <avinoam>
Project Member
Sat 09 Nov 2019 10:30:41 AM UTC, comment #10: 

The current docker tests with ffmpeg and libav are:

PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
FFmpeg_versions = Lavu55.34.101, SwS4.2.100, Lavc57.64.101, Lavf57.56.101
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
FFmpeg_versions = Lavu55.34.101, SwS4.2.100, Lavc57.64.101, Lavf57.56.101
NAME="CentOS Linux"
VERSION="7 (Core)"
FFmpeg_versions = Lavu54.31.100, SwS3.1.101, Lavc56.60.100, Lavf56.40.101
VERSION="31 (Container Image)"
FFmpeg_versions = Lavu56.31.100, SwS5.5.100, Lavc58.54.100, Lavf58.29.100
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
FFmpeg_versions = Lavu55.20.0, SwS4.0.0, Lavc57.25.0, Lavf57.7.2

Andreas Weber <andy1978>
Project Member
Thu 31 Oct 2019 07:42:16 AM UTC, comment #9: 

Does it make sense to support libav 12.3? As far as I see all major distros switched back to FFmpeg

Andreas Weber <andy1978>
Project Member
Wed 30 Oct 2019 10:14:54 PM UTC, comment #8: 

Thanks Avinoam for testing on windows.

I added some tests in docker containers:
- Debian stretch, GNU Octave 4.4.1, FFmpeg
- Debian stretch, GNU Octave 5.1.0, FFmpeg
- CentOS 7, GNU Octave Octave 4.4.1, FFmpeg
- Fedora 31, GNU Octave Octave 5.1.0, FFmpeg

which all run fine

Andreas Weber <andy1978>
Project Member
Thu 24 Oct 2019 08:13:56 PM UTC, comment #7: 

Yes, on Win-10

Avinoam Kalma <avinoam>
Project Member
Thu 24 Oct 2019 08:11:17 PM UTC, comment #6: 

@Avinoam Kalma: thank you for testing. Was this on windows (I ask because /tmp)

With cset http://hg.code.sf.net/p/octave/video/rev/33d648425b06 I populate some important properties for VideoReader

Andreas Weber <andy1978>
Project Member
Wed 23 Oct 2019 04:22:56 AM UTC, comment #5: 

After last additions to Video pakage
things looks much better (Thanks Andy!)

The commands:

 demo VideoWriter


 demo Videoreader

(need a change in VideoReader.m: change the line
fn = "/tmp/sombrero.mp4";
fn = fullfile (tempdir(), "sombrero.mp4");
as in VideoWriter).

My own demos also work:

vid = VideoReader('vid.mp4');
cnt = 0;
while (hasFrame(vid))
  cnt = cnt + 1;
  I = readFrame(vid);
  imwrite (I, sprintf ('%05d.png', cnt));

folder = 'C:\Octave\Video';
vid = VideoWriter('demo.avi');

Images = dir (fullfile (folder, '*.png'));
for i=1:numel(Images)
  file = fullfile (folder, Images(i).name);
  I = imread (file);
  writeVideo(vid, I);


Avinoam Kalma <avinoam>
Project Member
Tue 15 Oct 2019 08:41:53 AM UTC, comment #4: 

Adding Package maintainer

Avinoam Kalma <avinoam>
Project Member
Tue 15 Oct 2019 08:34:28 AM UTC, comment #3: 

As John noted, I also saw the error

package is missing file: COPYING

After inserting this file manually to the tar file, I got the error:

the DESCRIPTION file must have a Categories field, when no INDEX
file is given

Avinoam Kalma <avinoam>
Project Member
Tue 08 Oct 2019 08:44:48 PM UTC, comment #2: 

I had added opencv to mxe-octave to so is possible to build and try in windows (it does require manually building the opencv target and then continuing with the nsis-installer/tarball build)

I had not checked yet whether it will even work (apart from cmpiling ok) - I had tried a quick make dist in the new video dev repo and trying in windows with pkg install, however it gave an error of 'package is missing file: COPYING' and I ran out of spare minutes.

John Donoghue <lostbard>
Project Member
Tue 08 Oct 2019 11:59:05 AM UTC, comment #1: 

This looks very promising. I tested the updated code, for VideoWriter only, and it now works well for non synthetic data.
As for the roadmap, here are in IMHO the missing features that should not be hard to have before a first realase for the VideoWriter:

  • most properties should be read-only (SetAccess = "private"): ColorChannels (codec specific), Duration, FileFormat (codec specific), FileName/Path (fixed at object instantiation), FrameCount, Height/Width (fixed by the first provided frame), VideoBitsPerPixel/VideoCompressionMethod/VideoFormat (codec specific),
  • increment FrameCount and Duration after each successful call to writeVideo,
  • allow passing frames or frame arrays  directly to writeVideo, without having to extract the "cdata" field manually,
  • allow passing arbitrary image data types even if we end up converting them internally to whatever is prefered for the chosen codec, e.g uint8 for RGB 24bits video formats.

As for the available output formats, I am no expert so in this area, I am generally happy with whatever the default is. So we just need to make a sensible choice of 1 or 2 widespread formats that can be read with the default viewer for the main platforms.

Pantxo Diribarne <pantxo>
Project Member
Tue 08 Oct 2019 11:56:39 AM UTC, original submission:  

The maintainer of the video package has annouced a preliminary implementation of the VideoWriter function (and VideoReader) was available in the devel branch of the package. See this discussion:


I open this bug report to eventually define a roadmap for the first release and track the progress of the new function.

Pantxo Diribarne <pantxo>
Project Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by andy1978 (Posted a comment)
  • -email is unavailable- added by avinoam
  • -email is unavailable- added by avinoam (Posted a comment)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by pantxo (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-10-15 avinoam Carbon-Copy- => Added andy1978
    2019-10-09 rik5 Carbon-CopyRemoved 72865 => -
    2019-10-09 rik5 CategoryOctave Function => Octave Forge Package
    2019-10-08 pantxo StatusNone => In Progress

    Back to the top

    Powered by Savane 3.5