hjimbens
Posts: 61
Joined: Fri May 24, 2013 9:05 am

Where can I find sources for ffmpeg 7:4.1.4-1+rpt7~deb10u1

Wed Mar 25, 2020 12:07 pm

I am trying to get ffmpeg (libavcodec58/testing,now 7:4.1.4-1+rpt7~deb10u1, the latest?) to decode an HEVC file into textures for displaying with OpenGL on X11 with fkms on a Pi4.
To understand what is happening I have been looking at https://github.com/RPi-Distro/ffmpeg/tr ... libavcodec and https://github.com/popcornmix/FFmpeg/bl ... libavcodec, but neither seem to be exactly the sources from which 'libavcodec58/testing,now 7:4.1.4-1+rpt7~deb10u1' has been built. On installing sources with 'apt-get source libavcodec58', the resulting source tree seems a lot older than 'libavcodec58/testing,now 7:4.1.4-1+rpt7~deb10u1'. Can someone give me a pointer where to look for the source of 'libavcodec58/testing,now 7:4.1.4-1+rpt7~deb10u1'.

fruitoftheloom
Posts: 21954
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Where can I find sources for ffmpeg 7:4.1.4-1+rpt7~deb10u1

Wed Mar 25, 2020 12:58 pm

hjimbens wrote:
Wed Mar 25, 2020 12:07 pm
I am trying to get ffmpeg (libavcodec58/testing,now 7:4.1.4-1+rpt7~deb10u1, the latest?) to decode an HEVC file into textures for displaying with OpenGL on X11 with fkms on a Pi4.
To understand what is happening I have been looking at https://github.com/RPi-Distro/ffmpeg/tr ... libavcodec and https://github.com/popcornmix/FFmpeg/bl ... libavcodec, but neither seem to be exactly the sources from which 'libavcodec58/testing,now 7:4.1.4-1+rpt7~deb10u1' has been built. On installing sources with 'apt-get source libavcodec58', the resulting source tree seems a lot older than 'libavcodec58/testing,now 7:4.1.4-1+rpt7~deb10u1'. Can someone give me a pointer where to look for the source of 'libavcodec58/testing,now 7:4.1.4-1+rpt7~deb10u1'.


https://packages.debian.org/buster/ffmpeg
Retired disgracefully.....
......to an uncomplicated life !

Rather than negativity think outside the box !

hjimbens
Posts: 61
Joined: Fri May 24, 2013 9:05 am

Re: Where can I find sources for ffmpeg 7:4.1.4-1+rpt7~deb10u1

Wed Mar 25, 2020 1:34 pm

Thank you @fruitoftheloom. The link you gave points to the standard Debian package page libavcodec58. In the sideline there are four links under the header 'Download Source Package'. I have downloaded and unpacked them all, but I cannot find the files libavcodec/rpi_zc.c and libavcodec/rpi_zc.h. When I install libavcodec-dev on raspbian I do get libavcodec/rpi_zc.h so I think I can safely assume that those are not the sources that libavcodec on the latest version of raspbian is built from.
Also the naming is slightly different. The link you provided points to 'libavcodec58 (7:4.1.4-1~deb10u1)' while I think I am looking for '7:4.1.4-1+rpt7~deb10u1'.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8068
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Where can I find sources for ffmpeg 7:4.1.4-1+rpt7~deb10u1

Wed Mar 25, 2020 5:05 pm

https://archive.raspberrypi.org/debian/ ... /f/ffmpeg/
ffmpeg_4.1.4-1+rpt7~deb10u1.debian.tar.xz 2020-01-24 14:09 273K

It's the same as should be downloaded should be downloaded by "apt source ffmpeg".
Having just done that

Code: Select all

[email protected]:~/tmp $ apt source ffmpeg
Reading package lists... Done
NOTICE: 'ffmpeg' packaging is maintained in the 'Git' version control system at:
https://salsa.debian.org/multimedia-team/ffmpeg.git
Please use:
git clone https://salsa.debian.org/multimedia-team/ffmpeg.git
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 9,181 kB of source archives.
Get:1 http://archive.raspberrypi.org/debian buster/main ffmpeg 7:4.1.4-1+rpt7~deb10u1 (dsc) [4,385 B]
Get:2 http://archive.raspberrypi.org/debian buster/main ffmpeg 7:4.1.4-1+rpt7~deb10u1 (tar) [8,896 kB]
Get:3 http://archive.raspberrypi.org/debian buster/main ffmpeg 7:4.1.4-1+rpt7~deb10u1 (asc) [473 B]                                                                              
Get:4 http://archive.raspberrypi.org/debian buster/main ffmpeg 7:4.1.4-1+rpt7~deb10u1 (diff) [280 kB]                                                                            
Fetched 9,181 kB in 20s (465 kB/s)                                                                                                                                               
dpkg-source: info: extracting ffmpeg in ffmpeg-4.1.4
dpkg-source: info: unpacking ffmpeg_4.1.4.orig.tar.xz
dpkg-source: info: unpacking ffmpeg_4.1.4-1+rpt7~deb10u1.debian.tar.xz
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying 0001-avcodec-omx-Fix-handling-of-fragmented-buffers.patch
dpkg-source: info: applying ffmpeg-4.1.4-mmal_5.patch
dpkg-source: info: applying fix_flags.diff
[email protected]:~/tmp $ cd ffmpeg-4.1.4
[email protected]:~/tmp/ffmpeg-4.1.4 $ find -name rpi_zc.h
./.pc/ffmpeg-4.1.4-mmal_5.patch/libavcodec/rpi_zc.h
./libavcodec/rpi_zc.h
So rpi_zc.h is there.
You have allowed apt to apply the patches I assume. That's how Debian packages work when customised for a distro. (rpi_zc.h is in debian/patches/ffmpeg-4.1.4-mmal_5.patch
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

hjimbens
Posts: 61
Joined: Fri May 24, 2013 9:05 am

Re: Where can I find sources for ffmpeg 7:4.1.4-1+rpt7~deb10u1

Wed Mar 25, 2020 8:35 pm

Thank you @6by9. Thats puzzling. I get:

Code: Select all

[email protected]:~/source $ apt source ffmpeg
Reading package lists... Done
NOTICE: 'ffmpeg' packaging is maintained in the 'Git' version control system at:
https://salsa.debian.org/multimedia-team/ffmpeg.git
Please use:
git clone https://salsa.debian.org/multimedia-team/ffmpeg.git
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 8,949 kB of source archives.
Get:1 http://raspbian.mirror.liteserver.nl/raspbian buster/main ffmpeg 7:4.1.4-1~deb10u1 (dsc) [5,211 B]
Get:2 http://raspbian.mirror.liteserver.nl/raspbian buster/main ffmpeg 7:4.1.4-1~deb10u1 (tar) [8,896 kB]
Get:3 http://raspbian.raspberrypi.org/raspbian buster/main ffmpeg 7:4.1.4-1~deb10u1 (asc) [473 B]
Get:4 http://raspbian.mirror.liteserver.nl/raspbian buster/main ffmpeg 7:4.1.4-1~deb10u1 (diff) [47.6 kB]
Fetched 8,949 kB in 2s (4,178 kB/s)
dpkg-source: info: extracting ffmpeg in ffmpeg-4.1.4
dpkg-source: info: unpacking ffmpeg_4.1.4.orig.tar.xz
dpkg-source: info: unpacking ffmpeg_4.1.4-1~deb10u1.debian.tar.xz
My /etc/apt/sources.list looks like:

Code: Select all

deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
But I think I can find what I need in https://archive.raspberrypi.org/debian/ ... ian.tar.xz.

User avatar
rpdom
Posts: 16311
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Where can I find sources for ffmpeg 7:4.1.4-1+rpt7~deb10u1

Thu Mar 26, 2020 8:06 am

What does your /etc/apt/sources.list.d/raspi.list look like? Have you uncommented the deb-src line in there?

Otherwise you will only get the default ffmpeg sources, not the ones patched for the Raspberry Pi. (the "+rpt7" bit).

hjimbens
Posts: 61
Joined: Fri May 24, 2013 9:05 am

Re: Where can I find sources for ffmpeg 7:4.1.4-1+rpt7~deb10u1

Thu Mar 26, 2020 9:18 am

Thank you @rpdom. My /etc/apt/sources.list.d/raspi.list looked like

Code: Select all

deb http://archive.raspberrypi.org/debian/ buster main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ buster main
Uncommenting the last line did the trick.

Now that I have the exact sources of the ffmpeg libraries that are on the image I understand why I get

Code: Select all

undefined reference to `av_rpi_zc_get_buffer2'
What is the most appropriate place to report this and maybe check if this has been fixed already?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8068
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Where can I find sources for ffmpeg 7:4.1.4-1+rpt7~deb10u1

Thu Mar 26, 2020 4:42 pm

https://github.com/RPi-Distro/ffmpeg

What exactly is your issue? I'll agree that it appears to have a prototype, but it's not apparently used anywhere either. The actual implementation appears to be called zc_get_buffer2.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Graphics programming”