bugGNU Octave - Bugs: bug #53801, [octave forge] (video) fails to...

 
 

bug #53801: [octave forge] (video) fails to build against ffmpeg 4.0

Submitter:  Marius Schamschula <mschamschula>
Submitted:  Tue 01 May 2018 10:45:48 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  Marius Schamschula Open/Closed:  * Closed
Release:  * other Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 11 Mar 2020 02:45:55 PM UTC, comment #5: 

Thank you John. I think this can be closed

Andreas Weber <andy1978>
Group Member
Wed 11 Mar 2020 02:32:12 PM UTC, comment #4: 

With the new release of video, this can be closed cant it?

John Donoghue <lostbard>
Group Member
Sat 05 Oct 2019 07:55:47 AM UTC, comment #3: 

The different defines for ffmpeg and libav are a real pain...

If you have a look at the OpenCV class to wrap ffmpeg and libav (https://sourceforge.net/p/octave/video/ci/devel/tree/src/cap_ffmpeg_impl.hpp)

you'll notive 60% of the code dealing with ffmpeg vs. libav and the many API changes of the last year. This was the reason to start a new implementation:

https://sourceforge.net/p/octave/video/ci/devel/tree/

using the OpenCV code and build a wrapper for GNU Octave around it. And to support the new VideoReader and VideoWriter classdef

Andreas Weber <andy1978>
Group Member
Mon 07 Jan 2019 08:10:15 PM UTC, comment #2: 

Confirmed with ffmpeg 4.1, where even more macro names have changed. The attached patch file allows me to build with ffmpeg 4.1 on Debian.

I don't have access to older versions of ffmpeg, so I'm not sure how stable these names are, if you need to add conditional logic to support older versions with the same release.

(file #45891)

Mike Miller <mtmiller>
Group Member
Thu 03 May 2018 12:04:13 AM UTC, comment #1: 

This can be fixed with a simple patch:


--- src/AVHandler.cc.orig        2018-04-23 15:45:39.000000000 -0700
+++ src/AVHandler.cc        2018-04-23 15:47:42.000000000 -0700
@@ -243,8 +243,8 @@
   codec_name = codec->name;

   // We can handle truncated bitstreams
-  if (codec->capabilities & CODEC_CAP_TRUNCATED)
-    vstream->codec->flags |= CODEC_FLAG_TRUNCATED;
+  if (codec->capabilities & AV_CODEC_CAP_TRUNCATED)
+    vstream->codec->flags |= AV_CODEC_FLAG_TRUNCATED;

   if (avcodec_open2(vstream->codec, codec, NULL) < 0)
     {


Marius Schamschula <mschamschula>
Tue 01 May 2018 10:45:48 AM UTC, original submission:  

While (re-)building octave video against ffmpeg 4.0, I get the following error:


/usr/bin/arch -arch x86_64 /opt/local/bin/mkoctfile-4.2.2 --verbose -Wall -v -Wno-deprecated-declarations -c -DHAVE_CONFIG_H AVHandler.cc -o AVHandler.o -I/opt/local/include
/usr/bin/clang++ -c -I/opt/local/include -fPIC -I/opt/local/include/octave-4.2.2/octave/.. -I/opt/local/include/octave-4.2.2/octave -I/opt/local/include  -D_THREAD_SAFE -pthread -pipe -Os -std=c++11 -stdlib=libc++ -arch x86_64  -Wall -Wno-deprecated-declarations  -I/opt/local/include  -DHAVE_CONFIG_H AVHandler.cc -o AVHandler.o
AVHandler.cc:248:29: error: use of undeclared identifier 'CODEC_CAP_TRUNCATED'
  if (codec->capabilities & CODEC_CAP_TRUNCATED)
                            ^
AVHandler.cc:249:30: error: use of undeclared identifier 'CODEC_FLAG_TRUNCATED'
    vstream->codec->flags |= CODEC_FLAG_TRUNCATED;
                             ^
AVHandler.cc:366:40: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
  if (((target_timestamp - start_time) < 0) ||
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
1 warning and 2 errors generated.
make: *** [AVHandler.o] Error 1


Marius Schamschula <mschamschula>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #45891:  video.diff added by mtmiller (1KiB - text/x-patch)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by andy1978 (Posted a comment)
  • -email is unavailable- added by lostbard (Adding package maintainer)
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by mschamschula (Submitted the item)
  • -email is unavailable- added by mschamschula
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-03-11 andy1978 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2019-03-01 mtmiller Dependencies- bugs #55803 is dependent
    2019-01-07 mtmiller Attached File- Added video.diff, #45891
        StatusNone Patch Submitted
    2019-01-04 lostbard Carbon-Copy- Added andy1978
    2018-05-01 mtmiller Release4.2.2 other
        Summaryoctave video fails to build against ffmpeg 4.0 [octave forge] (video) fails to build against ffmpeg 4.0
    2018-05-01 mschamschula Carbon-Copy- Added mschamschula

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code