From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:43447) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jE8Ch-0007yA-Ae for guix-patches@gnu.org; Tue, 17 Mar 2020 05:08:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jE8Cf-0008Mt-Vi for guix-patches@gnu.org; Tue, 17 Mar 2020 05:08:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60432) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jE8Cf-0008KE-Qq for guix-patches@gnu.org; Tue, 17 Mar 2020 05:08:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jE8Cf-00063A-L0 for guix-patches@gnu.org; Tue, 17 Mar 2020 05:08:01 -0400 Subject: [bug#40060] [PATCH 1/2] gnu: youtube-dl: Use ffmpeg and pycryptodome Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:42523) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jE8Bj-0007i5-PU for guix-patches@gnu.org; Tue, 17 Mar 2020 05:07:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jE8Bi-0006AX-7E for guix-patches@gnu.org; Tue, 17 Mar 2020 05:07:03 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:54415) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jE8Bi-0005bw-0l for guix-patches@gnu.org; Tue, 17 Mar 2020 05:07:02 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Tue, 17 Mar 2020 09:06:57 +0000 From: Brice Waegeneire In-Reply-To: <87y2s2lgxl.fsf@nckx> References: <20200314143418.13963-1-brice@waegenei.re> <20200314144221.17112-1-brice@waegenei.re> <20200314172114.GA23019@jasmine.lan> <87y2s2lgxl.fsf@nckx> Message-ID: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: me@tobias.gr, 40060@debbugs.gnu.org On 2020-03-14 22:17, Tobias Geerinckx-Rice via Guix-patches via wrote: > Brice Waegeneire 写道: >> WARNING: You have requested multiple formats but ffmpeg or avconv are >> not installed. The formats won't be merged. NOTE: This message appear when using a format option like this ='bestvideo[height<=320]+bestaudio'=. > This message is one of the best I've seen. It clearly explains to the > user what's (not) going to happen, and what they can do to change that > *if* they want to. Hence I think adding ffmpeg as a hard dependency > is incorrect. What about this one? #+begin_src sh $ youtue-dl https://www.youtube.com/watch\?v\=dp8PhLsUcFE [youtube] dp8PhLsUcFE: Downloading webpage [youtube] dp8PhLsUcFE: Downloading m3u8 information [youtube] dp8PhLsUcFE: Downloading MPD manifest [download] Destination: Bloomberg Global Financial News-dp8PhLsUcFE.mp4 ERROR: m3u8 download detected but ffmpeg or avconv could not be found. Please install one. #+end_src When downloading a live stream from youtube.com (and proabably others), ~youtube-dl~ needs ffmpeg to download the HLS stream – I tried with just ~pycryptodome~ and it doesn't work. > (I'd also oppose a youtube-dl-full variant, by the way. Packages > aren't the right place for this; profiles are.) > > Does youtube-dl print a similarly clear message when pycryptodome is > needed but missing? If not, that addition LGTM with a > > ("pycryptodome" ,pycryptodome) ; for the hlsnative downloader #+begin_src sh $ youtube-dl http://www.ivi.ru/watch/146500 [ivi] 146500: Downloading video JSON ERROR: pycryptodomex not found. Please install it. #+end_src #+begin_src python self.report_error('pycrypto not found. Please install it.') #+end_src I digged a little deeper about this dependency, ~pycryptodome~ replace the deprecated ~pycrypto~ library with the same name space (=Crypto=) while ~pycryptodomex~ uses it's own name space (=Cryptodome=) to provide similar functionality. #+begin_src python self.report_warning( 'hlsnative has detected features it does not support, ' 'extraction will be delegated to ffmpeg') #+end_src So I'm not sure if adding ~pycryptodome(x)~ is that useful after all. Especially if it can't totally replace ~ffmpeg~ when donating HLS streams. > comment. Cover letters & commit messages age badly. Noted. I think ~ffmpeg~ should be an input of ~youtube-dl~ while ~pycrytodome(x)~ don't need to since most (except the ivi downloader it seems) functionality can be achieved with ~ffmpeg~. WDYT?