[R-pkg-team] Bug#963153: ffmpeg breaks r-cran-av autopkgtest: error in 'avcodec_open2 (audio)': Invalid argument

Sebastian Ramacher sramacher at debian.org
Tue Jun 23 09:50:50 BST 2020


Control: notfound -1 ffmpeg/7:4.3-2
Control: tags -1 + patch

Hi Andreas

On 2020-06-19 19:44:03 +0200, Paul Gevers wrote:
> Source: ffmpeg, r-cran-av
> Control: found -1 ffmpeg/7:4.3-2
> Control: found -1 r-cran-av/0.5.0+dfsg-3
> Severity: serious
> Tags: sid bullseye
> X-Debbugs-CC: debian-ci at lists.debian.org
> User: debian-ci at lists.debian.org
> Usertags: breaks needs-update
> 
> Dear maintainer(s),
> 
> With a recent upload of ffmpeg the autopkgtest of r-cran-av fails in
> testing when that autopkgtest is run with the binary packages of ffmpeg
> from unstable. It passes when run with only packages from testing. In
> tabular form:
> 
>                        pass            fail
> ffmpeg                 from testing    7:4.3-2
> r-cran-av              from testing    0.5.0+dfsg-3
> all others             from testing    from testing
> 
> I copied some of the output at the bottom of this report.
> 
> Currently this regression is blocking the migration of ffmpeg to testing
> [1]. Due to the nature of this issue, I filed this bug report against
> both packages. Can you please investigate the situation and reassign the
> bug to the right package?
> 
> More information about this bug and the reason for filing it can be found on
> https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation
> 
> Paul
> 
> [1] https://qa.debian.org/excuses.php?package=ffmpeg
> 
> https://ci.debian.net/data/autopkgtest/testing/amd64/r/r-cran-av/5951260/log.gz
> 
> autopkgtest [13:08:56]: test run-unit-test: [-----------------------
> BEGIN TEST testthat.R
> 
> R version 4.0.1 (2020-06-06) -- "See Things Now"
> Copyright (C) 2020 The R Foundation for Statistical Computing
> Platform: x86_64-pc-linux-gnu (64-bit)
> 
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
> 
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
> 
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
> 
> > library(testthat)
> > library(av)
> >
> > if (ps::ps_is_supported()) {
> +   reporter <-
> ps::CleanupReporter(testthat::CheckReporter)$new(proc_cleanup =  FALSE,
> proc_fail = FALSE)
> +   test_check("av", reporter = reporter)
> + } else {
> +   test_check("av")
> + }
> Estimating duration from bitrate, this may be inaccurate
> Specified sample rate 8000 is not supported

ffmpeg got stricter in what it accepts. The tests convert a mp3 with a
sampling rate of 8000 Hz to a AC3 without resampling (as far as I can
tell). AC3 however, does not support any sampling rates other than 32
KHz, 44.1 KHz and 48KHz, and thus the tests fail.

The attached patch fixes this issue by generting an empty mp3 with the
default sampling rate of 44.1 KHz during package build instead of
copying the file from libmp3-tag-perl. If you want, I can upload it as
NMU.

Cheers
-- 
Sebastian Ramacher
-------------- next part --------------
diff -Nru r-cran-av-0.5.0+dfsg/debian/changelog r-cran-av-0.5.0+dfsg/debian/changelog
--- r-cran-av-0.5.0+dfsg/debian/changelog	2020-05-20 09:34:42.000000000 +0200
+++ r-cran-av-0.5.0+dfsg/debian/changelog	2020-06-23 10:26:54.000000000 +0200
@@ -1,3 +1,10 @@
+r-cran-av (0.5.0+dfsg-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * debian/rules: Fix generation of empty MP3 file (Closes: #965153)
+
+ -- Sebastian Ramacher <sramacher at debian.org>  Tue, 23 Jun 2020 10:26:54 +0200
+
 r-cran-av (0.5.0+dfsg-3) unstable; urgency=medium
 
   * Provide mp3 example properly
diff -Nru r-cran-av-0.5.0+dfsg/debian/control r-cran-av-0.5.0+dfsg/debian/control
--- r-cran-av-0.5.0+dfsg/debian/control	2020-05-20 09:34:42.000000000 +0200
+++ r-cran-av-0.5.0+dfsg/debian/control	2020-06-23 10:26:49.000000000 +0200
@@ -8,7 +8,7 @@
                dh-r,
                r-base-dev,
                libavfilter-dev,
-               libmp3-tag-perl
+               ffmpeg
 Standards-Version: 4.5.0
 Vcs-Browser: https://salsa.debian.org/r-pkg-team/r-cran-av
 Vcs-Git: https://salsa.debian.org/r-pkg-team/r-cran-av.git
diff -Nru r-cran-av-0.5.0+dfsg/debian/rules r-cran-av-0.5.0+dfsg/debian/rules
--- r-cran-av-0.5.0+dfsg/debian/rules	2020-05-20 09:34:42.000000000 +0200
+++ r-cran-av-0.5.0+dfsg/debian/rules	2020-06-23 10:26:38.000000000 +0200
@@ -7,4 +7,4 @@
 
 override_dh_install:
 	dh_install
-	cp -a /usr/share/doc/libmp3-tag-perl/examples/empty_10sec.mp3 $(debRlib)/$(cranNameOrig)/samples/Synapsis-Wonderland.mp3
+	ffmpeg -f lavfi -i anullsrc=r=44100:cl=mono -t 10 -acodec libmp3lame $(debRlib)/$(cranNameOrig)/samples/Synapsis-Wonderland.mp3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/r-pkg-team/attachments/20200623/074b178b/attachment.sig>


More information about the R-pkg-team mailing list