Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-imageio-ffmpeg for openSUSE:Factory checked in at 2023-03-27 18:16:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-imageio-ffmpeg (Old) and /work/SRC/openSUSE:Factory/.python-imageio-ffmpeg.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-imageio-ffmpeg" Mon Mar 27 18:16:15 2023 rev:4 rq:1074510 version:0.4.8 Changes: -------- --- /work/SRC/openSUSE:Factory/python-imageio-ffmpeg/python-imageio-ffmpeg.changes 2022-09-29 18:14:56.647441500 +0200 +++ /work/SRC/openSUSE:Factory/.python-imageio-ffmpeg.new.31432/python-imageio-ffmpeg.changes 2023-03-27 18:16:20.155124226 +0200 @@ -1,0 +2,9 @@ +Sun Mar 26 19:53:26 UTC 2023 - Dirk Müller <dmuel...@suse.com> + +- update to 0.4.8: + * get_ffmpeg_exe always checks env var + * Fix pix_format parser to capture formats that have commas + within strings + * Avoid warning about invalid escape sequence in regex + +------------------------------------------------------------------- Old: ---- imageio-ffmpeg-0.4.7.tar.gz New: ---- imageio-ffmpeg-0.4.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-imageio-ffmpeg.spec ++++++ --- /var/tmp/diff_new_pack.PPOWio/_old 2023-03-27 18:16:22.707137693 +0200 +++ /var/tmp/diff_new_pack.PPOWio/_new 2023-03-27 18:16:22.711137714 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-imageio-ffmpeg # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-imageio-ffmpeg -Version: 0.4.7 +Version: 0.4.8 Release: 0 Summary: FFMPEG wrapper for Python License: BSD-2-Clause ++++++ imageio-ffmpeg-0.4.7.tar.gz -> imageio-ffmpeg-0.4.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imageio-ffmpeg-0.4.7/PKG-INFO new/imageio-ffmpeg-0.4.8/PKG-INFO --- old/imageio-ffmpeg-0.4.7/PKG-INFO 2022-04-14 16:41:03.655295600 +0200 +++ new/imageio-ffmpeg-0.4.8/PKG-INFO 2023-01-09 21:34:36.757127500 +0100 @@ -1,12 +1,12 @@ Metadata-Version: 2.1 Name: imageio-ffmpeg -Version: 0.4.7 +Version: 0.4.8 Summary: FFMPEG wrapper for Python Home-page: https://github.com/imageio/imageio-ffmpeg +Download-URL: http://pypi.python.org/pypi/imageio-ffmpeg Author: imageio contributors Author-email: almar.kl...@gmail.com License: BSD-2-Clause -Download-URL: http://pypi.python.org/pypi/imageio-ffmpeg Keywords: video ffmpeg Platform: any Classifier: Development Status :: 5 - Production/Stable @@ -38,5 +38,3 @@ For Linux users: the above is not the case when installing via your Linux package manager (if that is possible), because this package would simply depend on ffmpeg in that case. - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imageio-ffmpeg-0.4.7/imageio_ffmpeg/_definitions.py new/imageio-ffmpeg-0.4.8/imageio_ffmpeg/_definitions.py --- old/imageio-ffmpeg-0.4.7/imageio_ffmpeg/_definitions.py 2022-04-14 16:40:27.000000000 +0200 +++ new/imageio-ffmpeg-0.4.8/imageio_ffmpeg/_definitions.py 2023-01-09 21:33:55.000000000 +0100 @@ -1,7 +1,7 @@ import sys import struct -__version__ = "0.4.7" +__version__ = "0.4.8" def get_platform(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imageio-ffmpeg-0.4.7/imageio_ffmpeg/_io.py new/imageio-ffmpeg-0.4.8/imageio_ffmpeg/_io.py --- old/imageio-ffmpeg-0.4.7/imageio_ffmpeg/_io.py 2022-04-14 16:39:55.000000000 +0200 +++ new/imageio-ffmpeg-0.4.8/imageio_ffmpeg/_io.py 2023-01-03 23:52:41.000000000 +0100 @@ -34,7 +34,7 @@ # Use the null streams to validate if we can encode anything # https://trac.ffmpeg.org/wiki/Null cmd = [ - _get_exe(), + get_ffmpeg_exe(), "-hide_banner", "-f", "lavfi", @@ -56,7 +56,7 @@ def get_compiled_h264_encoders(): - cmd = [_get_exe(), "-hide_banner", "-encoders"] + cmd = [get_ffmpeg_exe(), "-hide_banner", "-encoders"] p = subprocess.run( cmd, stdin=subprocess.PIPE, @@ -132,11 +132,6 @@ ) -@lru_cache() -def _get_exe(): - return get_ffmpeg_exe() - - def count_frames_and_secs(path): """ Get the number of frames and number of seconds for the given video @@ -153,7 +148,18 @@ if not isinstance(path, str): raise TypeError("Video path must be a string or pathlib.Path.") - cmd = [_get_exe(), "-i", path, "-map", "0:v:0", "-c", "copy", "-f", "null", "-"] + cmd = [ + get_ffmpeg_exe(), + "-i", + path, + "-map", + "0:v:0", + "-c", + "copy", + "-f", + "null", + "-", + ] try: out = subprocess.check_output(cmd, stderr=subprocess.STDOUT, **_popen_kwargs()) except subprocess.CalledProcessError as err: @@ -254,7 +260,7 @@ pre_output_params = ["-pix_fmt", pix_fmt, "-vcodec", "rawvideo", "-f", "image2pipe"] - cmd = [_get_exe()] + cmd = [get_ffmpeg_exe()] cmd += input_params + ["-i", path] cmd += pre_output_params + output_params + ["-"] @@ -510,7 +516,16 @@ output_params += ["-map", "0:v:0", "-map", "1:a:0"] # Get command - cmd = [_get_exe(), "-y", "-f", "rawvideo", "-vcodec", "rawvideo", "-s", sizestr] + cmd = [ + get_ffmpeg_exe(), + "-y", + "-f", + "rawvideo", + "-vcodec", + "rawvideo", + "-s", + sizestr, + ] cmd += ["-pix_fmt", pix_fmt_in, "-r", "{:.02f}".format(fps)] + input_params cmd += ["-i", "-"] + audio_params cmd += ["-vcodec", codec, "-pix_fmt", pix_fmt_out] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imageio-ffmpeg-0.4.7/imageio_ffmpeg/_parsing.py new/imageio-ffmpeg-0.4.8/imageio_ffmpeg/_parsing.py --- old/imageio-ffmpeg-0.4.7/imageio_ffmpeg/_parsing.py 2022-04-14 16:39:55.000000000 +0200 +++ new/imageio-ffmpeg-0.4.8/imageio_ffmpeg/_parsing.py 2023-01-04 14:05:51.000000000 +0100 @@ -135,7 +135,16 @@ # Codec and pix_fmt hint line = videolines[0] meta["codec"] = line.split("Video: ", 1)[-1].lstrip().split(" ", 1)[0].strip() - meta["pix_fmt"] = line.split("Video: ", 1)[-1].split(",")[1].strip() + meta["pix_fmt"] = re.split( + # use a negative lookahead regexp to ignore commas that are contained + # within a parenthesis + # this helps consider a pix_fmt of the kind + # yuv420p(tv, progressive) + # as what it is, instead of erroneously reporting as + # yuv420p(tv + r",\s*(?![^()]*\))", + line.split("Video: ", 1)[-1], + )[1].strip() # get the output line that speaks about audio audiolines = [ @@ -182,7 +191,7 @@ ) # get the rotate metadata - reo_rotate = re.compile("rotate\s+:\s([0-9]+)") + reo_rotate = re.compile(r"rotate\s+:\s([0-9]+)") match = reo_rotate.search(text) rotate = 0 if match is not None: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imageio-ffmpeg-0.4.7/imageio_ffmpeg/_utils.py new/imageio-ffmpeg-0.4.8/imageio_ffmpeg/_utils.py --- old/imageio-ffmpeg-0.4.7/imageio_ffmpeg/_utils.py 2022-04-14 15:59:01.000000000 +0200 +++ new/imageio-ffmpeg-0.4.8/imageio_ffmpeg/_utils.py 2023-01-03 23:52:41.000000000 +0100 @@ -2,6 +2,7 @@ import sys import logging import subprocess +from functools import lru_cache from pkg_resources import resource_filename from ._definitions import get_platform, FNAME_PER_PLATFORM @@ -23,6 +24,20 @@ if exe: return exe + # Auto-detect + exe = _get_ffmpeg_exe() + if exe: + return exe + + # Nothing was found + raise RuntimeError( + "No ffmpeg exe could be found. Install ffmpeg on your system, " + "or set the IMAGEIO_FFMPEG_EXE environment variable." + ) + + +@lru_cache() +def _get_ffmpeg_exe(): plat = get_platform() # 2. Try from here @@ -45,11 +60,7 @@ if _is_valid_exe(exe): return exe - # Nothing was found - raise RuntimeError( - "No ffmpeg exe could be found. Install ffmpeg on your system, " - "or set the IMAGEIO_FFMPEG_EXE environment variable." - ) + return None def _popen_kwargs(prevent_sigint=False): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imageio-ffmpeg-0.4.7/imageio_ffmpeg/binaries/README.md new/imageio-ffmpeg-0.4.8/imageio_ffmpeg/binaries/README.md --- old/imageio-ffmpeg-0.4.7/imageio_ffmpeg/binaries/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/imageio-ffmpeg-0.4.8/imageio_ffmpeg/binaries/README.md 2022-01-25 11:14:00.000000000 +0100 @@ -0,0 +1 @@ +Exes are dropped here by the release script. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imageio-ffmpeg-0.4.7/imageio_ffmpeg.egg-info/PKG-INFO new/imageio-ffmpeg-0.4.8/imageio_ffmpeg.egg-info/PKG-INFO --- old/imageio-ffmpeg-0.4.7/imageio_ffmpeg.egg-info/PKG-INFO 2022-04-14 16:41:03.000000000 +0200 +++ new/imageio-ffmpeg-0.4.8/imageio_ffmpeg.egg-info/PKG-INFO 2023-01-09 21:34:36.000000000 +0100 @@ -1,12 +1,12 @@ Metadata-Version: 2.1 Name: imageio-ffmpeg -Version: 0.4.7 +Version: 0.4.8 Summary: FFMPEG wrapper for Python Home-page: https://github.com/imageio/imageio-ffmpeg +Download-URL: http://pypi.python.org/pypi/imageio-ffmpeg Author: imageio contributors Author-email: almar.kl...@gmail.com License: BSD-2-Clause -Download-URL: http://pypi.python.org/pypi/imageio-ffmpeg Keywords: video ffmpeg Platform: any Classifier: Development Status :: 5 - Production/Stable @@ -38,5 +38,3 @@ For Linux users: the above is not the case when installing via your Linux package manager (if that is possible), because this package would simply depend on ffmpeg in that case. - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imageio-ffmpeg-0.4.7/imageio_ffmpeg.egg-info/SOURCES.txt new/imageio-ffmpeg-0.4.8/imageio_ffmpeg.egg-info/SOURCES.txt --- old/imageio-ffmpeg-0.4.7/imageio_ffmpeg.egg-info/SOURCES.txt 2022-04-14 16:41:03.000000000 +0200 +++ new/imageio-ffmpeg-0.4.8/imageio_ffmpeg.egg-info/SOURCES.txt 2023-01-09 21:34:36.000000000 +0100 @@ -11,4 +11,5 @@ imageio_ffmpeg.egg-info/SOURCES.txt imageio_ffmpeg.egg-info/dependency_links.txt imageio_ffmpeg.egg-info/not-zip-safe -imageio_ffmpeg.egg-info/top_level.txt \ No newline at end of file +imageio_ffmpeg.egg-info/top_level.txt +imageio_ffmpeg/binaries/README.md \ No newline at end of file