pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/yt-dlp yt-dlp: Use ffmpeg binary from pkgsrc



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b9933654f6ac
branches:  trunk
changeset: 769162:b9933654f6ac
user:      ryoon <ryoon%pkgsrc.org@localhost>
date:      Tue Nov 09 09:53:43 2021 +0000

description:
yt-dlp: Use ffmpeg binary from pkgsrc

Like net/youtube-dl.
Bump PKGREVISION.

diffstat:

 net/yt-dlp/Makefile                                      |   3 +-
 net/yt-dlp/distinfo                                      |   3 +-
 net/yt-dlp/patches/patch-yt__dlp_postprocessor_ffmpeg.py |  50 ++++++++++++++++
 3 files changed, 54 insertions(+), 2 deletions(-)

diffs (77 lines):

diff -r 3dabbc9ac246 -r b9933654f6ac net/yt-dlp/Makefile
--- a/net/yt-dlp/Makefile       Tue Nov 09 09:01:08 2021 +0000
+++ b/net/yt-dlp/Makefile       Tue Nov 09 09:53:43 2021 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.1 2021/11/08 10:28:03 wiz Exp $
+# $NetBSD: Makefile,v 1.2 2021/11/09 09:53:43 ryoon Exp $
 
 DISTNAME=      yt-dlp-2021.10.22
+PKGREVISION=   1
 CATEGORIES=    net
 MASTER_SITES=  ${MASTER_SITE_PYPI:=y/yt-dlp/}
 # \TODO: create symlink, as mpv makes use of youtube-dl?
diff -r 3dabbc9ac246 -r b9933654f6ac net/yt-dlp/distinfo
--- a/net/yt-dlp/distinfo       Tue Nov 09 09:01:08 2021 +0000
+++ b/net/yt-dlp/distinfo       Tue Nov 09 09:53:43 2021 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.1 2021/11/08 10:28:03 wiz Exp $
+$NetBSD: distinfo,v 1.2 2021/11/09 09:53:43 ryoon Exp $
 
 BLAKE2s (yt-dlp-2021.10.22.tar.gz) = 6c09f78af13c1316038edc6c6aff2f3d67b27d955c7fcc88f367b4afa0417165
 SHA512 (yt-dlp-2021.10.22.tar.gz) = 2b590703f8d4f9454b50983019aca8046205234bd98cac4da73a6688eae177a19ef641e486aea92d86197ee7ad6c564c65f9b9496d623c00bdcc349817d5b1f8
 Size (yt-dlp-2021.10.22.tar.gz) = 2010916 bytes
+SHA1 (patch-yt__dlp_postprocessor_ffmpeg.py) = 384a2938b8c2b378a07ec0a5ddd6616fc43e0911
diff -r 3dabbc9ac246 -r b9933654f6ac net/yt-dlp/patches/patch-yt__dlp_postprocessor_ffmpeg.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/yt-dlp/patches/patch-yt__dlp_postprocessor_ffmpeg.py  Tue Nov 09 09:53:43 2021 +0000
@@ -0,0 +1,50 @@
+$NetBSD: patch-yt__dlp_postprocessor_ffmpeg.py,v 1.1 2021/11/09 09:53:43 ryoon Exp $
+
+Also look and use ffmpeg[234]/ffprobe[234] if possible, preferring
+the unversioned one (i.e. selected via alternatives framework)
+or the newest one.
+From: pkgsrc/net/youtube-dl
+
+--- yt_dlp/postprocessor/ffmpeg.py.orig        2021-10-22 20:47:09.000000000 +0000
++++ yt_dlp/postprocessor/ffmpeg.py
+@@ -78,7 +78,7 @@ class FFmpegPostProcessor(PostProcessor)
+         return FFmpegPostProcessor(downloader)._versions
+ 
+     def _determine_executables(self):
+-        programs = ['avprobe', 'avconv', 'ffmpeg', 'ffprobe']
++        programs = ['avprobe', 'avconv', 'ffmpeg', 'ffmpeg4', 'ffmpeg3', 'ffmpeg2', 'ffprobe', 'ffprobe4', 'ffprobe3', 'ffprobe2']
+         prefer_ffmpeg = True
+ 
+         def get_ffmpeg_version(path):
+@@ -116,7 +116,7 @@ class FFmpegPostProcessor(PostProcessor)
+                     basename = os.path.splitext(os.path.basename(location))[0]
+                     basename = next((p for p in programs if basename.startswith(p)), 'ffmpeg')
+                     dirname = os.path.dirname(os.path.abspath(location))
+-                    if basename in ('ffmpeg', 'ffprobe'):
++                    if basename in ('ffmpeg', 'ffmpeg4', 'ffmpeg3', 'ffmpeg2', 'ffprobe', 'ffprobe4', 'ffprobe3', 'ffprobe2'):
+                         prefer_ffmpeg = True
+ 
+                 self._paths = dict(
+@@ -131,18 +131,18 @@ class FFmpegPostProcessor(PostProcessor)
+             self._paths = dict((p, p) for p in programs)
+ 
+         if prefer_ffmpeg is False:
+-            prefs = ('avconv', 'ffmpeg')
++            prefs = ('avconv', 'ffmpeg', 'ffmpeg4', 'ffmpeg3', 'ffmpeg2')
+         else:
+-            prefs = ('ffmpeg', 'avconv')
++            prefs = ('ffmpeg', 'ffmpeg4', 'ffmpeg3', 'ffmpeg2', 'avconv')
+         for p in prefs:
+             if self._versions[p]:
+                 self.basename = p
+                 break
+ 
+         if prefer_ffmpeg is False:
+-            prefs = ('avprobe', 'ffprobe')
++            prefs = ('avprobe', 'ffprobe', 'ffprobe4', 'ffprobe3', 'ffprobe2')
+         else:
+-            prefs = ('ffprobe', 'avprobe')
++            prefs = ('ffprobe', 'ffprobe4', 'ffprobe3', 'ffprobe2', 'avprobe')
+         for p in prefs:
+             if self._versions[p]:
+                 self.probe_basename = p



Home | Main Index | Thread Index | Old Index