Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue]: FFMPEG V6.X support #1399

Open
kiritigowda opened this issue Jul 30, 2024 · 2 comments
Open

[Issue]: FFMPEG V6.X support #1399

kiritigowda opened this issue Jul 30, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@kiritigowda
Copy link
Collaborator

Problem Description

Failure to support FFMPEG 6.X

ffmpeg -version
ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
configuration: --enable-gpl --enable-static --disable-optimizations --disable-mmx --disable-stripping --enable-debug --enable-vaapi --enable-gnutls --enable-libass --enable-libfreetype --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
libavutil      58. 29.100 / 58. 29.100
libavcodec     60. 31.102 / 60. 31.102
libavformat    60. 16.100 / 60. 16.100
libavdevice    60.  3.100 / 60.  3.100
libavfilter     9. 12.100 /  9. 12.100
libswscale      7.  5.100 /  7.  5.100
libswresample   4. 12.100 /  4. 12.100
libpostproc    57.  3.100 / 57.  3.100
/home/knagesh/MIVisionX/amd_openvx_extensions/amd_media/decoder.cpp: In member function ‘vx_status CLoomIoMediaDecoder::Initialize()’:
/home/knagesh/MIVisionX/amd_openvx_extensions/amd_media/decoder.cpp:493:78: error: invalid conversion from ‘AVCodec**’ to ‘const AVCodec**’ [-fpermissive]
  493 |         err = av_find_best_stream(formatContext, AVMEDIA_TYPE_VIDEO, -1, -1, &decoder, 0);
      |                                                                              ^~~~~~~~
      |                                                                              |
      |                                                                              AVCodec**
In file included from /home/knagesh/MIVisionX/amd_openvx_extensions/amd_media/kernels.h:33,
                 from /home/knagesh/MIVisionX/amd_openvx_extensions/amd_media/decoder.cpp:24:
/usr/local/include/libavformat/avformat.h:2109:48: note:   initializing argument 5 of ‘int av_find_best_stream(AVFormatContext*, AVMediaType, int, int, const AVCodec**, int)’
 2109 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/home/knagesh/MIVisionX/amd_openvx_extensions/amd_media/decoder.cpp:503:68: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
  503 |                 AVCodecContext * vcc = formatContext->streams[si]->codec;
      |                                                                    ^~~~~
[ 17%] Building CXX object amd_openvx_extensions/amd_nn/CMakeFiles/vx_nn.dir/src/activation_layer.cpp.o
[ 18%] Building CXX object amd_openvx_extensions/amd_migraphx/CMakeFiles/vx_amd_migraphx.dir/src/migraphx_node.cpp.o
make[2]: *** [amd_openvx_extensions/amd_media/CMakeFiles/vx_amd_media.dir/build.make:76: amd_openvx_extensions/amd_media/CMakeFiles/vx_amd_media.dir/decoder.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1194: amd_openvx_extensions/amd_media/CMakeFiles/vx_amd_media.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Operating System

Ubuntu

CPU

ALL

GPU

AMD Instinct MI300

Other

No response

ROCm Version

ROCm 6.0.0

ROCm Component

MIVisionX

Steps to Reproduce

No response

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

@kiritigowda kiritigowda added the bug Something isn't working label Jul 30, 2024
@kiritigowda
Copy link
Collaborator Author

SLES 15 SP5

amd@dell-rack-8-vm2-26062024:~/kiriti/build> sudo zypper install ffmpeg-devel
[sudo] password for root: 
Refreshing service 'Basesystem_Module_15_SP5_x86_64'.
Refreshing service 'Containers_Module_15_SP5_x86_64'.
Refreshing service 'Desktop_Applications_Module_15_SP5_x86_64'.
Refreshing service 'Development_Tools_Module_15_SP5_x86_64'.
Refreshing service 'Python_3_Module_15_SP5_x86_64'.
Refreshing service 'SUSE_Linux_Enterprise_Server_15_SP5_x86_64'.
Refreshing service 'SUSE_Package_Hub_15_SP5_x86_64'.
Refreshing service 'Server_Applications_Module_15_SP5_x86_64'.
Loading repository data...
Reading installed packages...
'ffmpeg-devel' not found in package names. Trying capabilities.
Resolving package dependencies...

The following 15 NEW packages are going to be installed:
  ffmpeg-4-libavcodec-devel ffmpeg-4-libavdevice-devel ffmpeg-4-libavfilter-devel ffmpeg-4-libavformat-devel ffmpeg-4-libavresample-devel ffmpeg-4-libavutil-devel
  ffmpeg-4-libpostproc-devel ffmpeg-4-libswresample-devel ffmpeg-4-libswscale-devel libavdevice58_13 libavfilter7_110 libavresample4_0 libpostproc55_9 libvmaf1
  libzimg2

The following 15 packages are not supported by their vendor:
  ffmpeg-4-libavcodec-devel ffmpeg-4-libavdevice-devel ffmpeg-4-libavfilter-devel ffmpeg-4-libavformat-devel ffmpeg-4-libavresample-devel ffmpeg-4-libavutil-devel
  ffmpeg-4-libpostproc-devel ffmpeg-4-libswresample-devel ffmpeg-4-libswscale-devel libavdevice58_13 libavfilter7_110 libavresample4_0 libpostproc55_9 libvmaf1
  libzimg2

15 new packages to install.
Overall download size: 2.6 MiB. Already cached: 0 B. After the operation, additional 6.1 MiB will be used.

Backend:  classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y): y
Retrieving: libvmaf1-2.2.0-150400.1.8.x86_64 (SLE-Module-Packagehub-Subpackages15-SP5-Pool)                                                  (1/15), 124.6 KiB    
Retrieving: libvmaf1-2.2.0-150400.1.8.x86_64.rpm .............................................................................................[done (124.6 KiB/s)]
Retrieving: libzimg2-3.0.3-150400.1.7.x86_64 (SLE-Module-Packagehub-Subpackages15-SP5-Pool)                                                  (2/15), 195.6 KiB    
Retrieving: libzimg2-3.0.3-150400.1.7.x86_64.rpm ..............................................................................................[done (96.0 KiB/s)]
Retrieving: ffmpeg-4-libavutil-devel-4.4-150400.3.32.1.x86_64 (SLE-Module-Packagehub-Subpackages15-SP5-Updates)                              (3/15), 178.5 KiB    
Retrieving: ffmpeg-4-libavutil-devel-4.4-150400.3.32.1.x86_64.rpm ............................................................................[done (112.0 KiB/s)]
Retrieving: libavresample4_0-4.4-150400.3.32.1.x86_64 (SLE-Module-Packagehub-Subpackages15-SP5-Updates)                                      (4/15), 107.0 KiB    
Retrieving: libavresample4_0-4.4-150400.3.32.1.x86_64.rpm ....................................................................................[done (107.0 KiB/s)]
Retrieving: libpostproc55_9-4.4-150400.3.32.1.x86_64 (SLE-Module-Packagehub-Subpackages15-SP5-Updates)                                       (5/15), 101.7 KiB    
Retrieving: libpostproc55_9-4.4-150400.3.32.1.x86_64.rpm ......................................................................................[done (64.0 KiB/s)]
Retrieving: ffmpeg-4-libswscale-devel-4.4-150400.3.32.1.x86_64 (SLE-Module-Packagehub-Subpackages15-SP5-Updates)                             (6/15),  70.1 KiB    
Retrieving: ffmpeg-4-libswscale-devel-4.4-150400.3.32.1.x86_64.rpm ............................................................................[done (31.7 KiB/s)]
Retrieving: ffmpeg-4-libswresample-devel-4.4-150400.3.32.1.x86_64 (SLE-Module-Packagehub-Subpackages15-SP5-Updates)                          (7/15),  72.7 KiB    
Retrieving: ffmpeg-4-libswresample-devel-4.4-150400.3.32.1.x86_64.rpm .........................................................................[done (72.7 KiB/s)]
Retrieving: ffmpeg-4-libavresample-devel-4.4-150400.3.32.1.x86_64 (SLE-Module-Packagehub-Subpackages15-SP5-Updates)                          (8/15),  68.9 KiB    
Retrieving: ffmpeg-4-libavresample-devel-4.4-150400.3.32.1.x86_64.rpm .........................................................................[done (31.7 KiB/s)]
Retrieving: libavfilter7_110-4.4-150400.3.32.1.x86_64 (SLE-Module-Packagehub-Subpackages15-SP5-Updates)                                      (9/15),   1.2 MiB    
Retrieving: libavfilter7_110-4.4-150400.3.32.1.x86_64.rpm ......................................................................................[done (1.1 MiB/s)]
Retrieving: ffmpeg-4-libpostproc-devel-4.4-150400.3.32.1.x86_64 (SLE-Module-Packagehub-Subpackages15-SP5-Updates)                           (10/15),  65.1 KiB    
Retrieving: ffmpeg-4-libpostproc-devel-4.4-150400.3.32.1.x86_64.rpm ...........................................................................[done (31.7 KiB/s)]
Retrieving: ffmpeg-4-libavcodec-devel-4.4-150400.3.32.1.x86_64 (SLE-Module-Packagehub-Subpackages15-SP5-Updates)                            (11/15), 126.3 KiB    
Retrieving: ffmpeg-4-libavcodec-devel-4.4-150400.3.32.1.x86_64.rpm ...........................................................................[done (112.0 KiB/s)]
Retrieving: libavdevice58_13-4.4-150400.3.32.1.x86_64 (SLE-Module-Packagehub-Subpackages15-SP5-Updates)                                     (12/15), 116.8 KiB    
Retrieving: libavdevice58_13-4.4-150400.3.32.1.x86_64.rpm ....................................................................................[done (112.0 KiB/s)]
Retrieving: ffmpeg-4-libavformat-devel-4.4-150400.3.32.1.x86_64 (SLE-Module-Packagehub-Subpackages15-SP5-Updates)                           (13/15), 100.9 KiB    
Retrieving: ffmpeg-4-libavformat-devel-4.4-150400.3.32.1.x86_64.rpm ..........................................................................[done (100.9 KiB/s)]
Retrieving: ffmpeg-4-libavfilter-devel-4.4-150400.3.32.1.x86_64 (SLE-Module-Packagehub-Subpackages15-SP5-Updates)                           (14/15),  80.5 KiB    
Retrieving: ffmpeg-4-libavfilter-devel-4.4-150400.3.32.1.x86_64.rpm ...........................................................................[done (80.5 KiB/s)]
Retrieving: ffmpeg-4-libavdevice-devel-4.4-150400.3.32.1.x86_64 (SLE-Module-Packagehub-Subpackages15-SP5-Updates)                           (15/15),  71.9 KiB    
Retrieving: ffmpeg-4-libavdevice-devel-4.4-150400.3.32.1.x86_64.rpm ...........................................................................[done (71.9 KiB/s)]

Checking for file conflicts: ...............................................................................................................................[done]
( 1/15) Installing: libvmaf1-2.2.0-150400.1.8.x86_64 .......................................................................................................[done]
( 2/15) Installing: libzimg2-3.0.3-150400.1.7.x86_64 .......................................................................................................[done]
( 3/15) Installing: ffmpeg-4-libavutil-devel-4.4-150400.3.32.1.x86_64 ......................................................................................[done]
( 4/15) Installing: libavresample4_0-4.4-150400.3.32.1.x86_64 ..............................................................................................[done]
( 5/15) Installing: libpostproc55_9-4.4-150400.3.32.1.x86_64 ...............................................................................................[done]
( 6/15) Installing: ffmpeg-4-libswscale-devel-4.4-150400.3.32.1.x86_64 .....................................................................................[done]
( 7/15) Installing: ffmpeg-4-libswresample-devel-4.4-150400.3.32.1.x86_64 ..................................................................................[done]
( 8/15) Installing: ffmpeg-4-libavresample-devel-4.4-150400.3.32.1.x86_64 ..................................................................................[done]
( 9/15) Installing: libavfilter7_110-4.4-150400.3.32.1.x86_64 ..............................................................................................[done]
(10/15) Installing: ffmpeg-4-libpostproc-devel-4.4-150400.3.32.1.x86_64 ....................................................................................[done]
(11/15) Installing: ffmpeg-4-libavcodec-devel-4.4-150400.3.32.1.x86_64 .....................................................................................[done]
(12/15) Installing: libavdevice58_13-4.4-150400.3.32.1.x86_64 ..............................................................................................[done]
(13/15) Installing: ffmpeg-4-libavformat-devel-4.4-150400.3.32.1.x86_64 ....................................................................................[done]
(14/15) Installing: ffmpeg-4-libavfilter-devel-4.4-150400.3.32.1.x86_64 ....................................................................................[done]
(15/15) Installing: ffmpeg-4-libavdevice-devel-4.4-150400.3.32.1.x86_64 ....................................................................................[done]

@lamikr
Copy link

lamikr commented Aug 28, 2024

I think it would make sense for MIvisionX to add support for building on systems that only has newer versions of ffmpeg available (ffmpeg 7 is the latest at the moment used by some distros and latest ubuntu and fedora has by default ffmpeg 6)

Attached is the patch that at least compiles on ffmpeg5 linux environment (mageia 9) but I have not had time to test it yet properly. But it gives at least the ideas for the places needing fixes.

0003-ffmpeg5-6-build-fixes_patch.zip

@kiritigowda kiritigowda added enhancement New feature or request and removed bug Something isn't working labels Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants