ports/107890: [PATCH] www/youtube_dl: [SUMMARIZE CHANGES]
Sergio Lenzi
lenzi at k1.com.br
Sat Jan 13 23:10:25 UTC 2007
>Number: 107890
>Category: ports
>Synopsis: [PATCH] www/youtube_dl: [SUMMARIZE CHANGES]
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Sat Jan 13 23:10:24 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Sergio Lenzi
>Release: FreeBSD 6.1-RELEASE i386
>Organization:
k1 sistemas
>Environment:
System: FreeBSD k1.com.br 6.1-RELEASE FreeBSD 6.1-RELEASE #1: Sat Nov 4 17:26:48 BRST
>Description:
Add an option to recode the movie in avi
using ffmpeg.
option added: --avi
this options works almost the same as --title
it extracts the title of the move and recode resulting
an avi movie (divx + mp3)
[DESCRIBE CHANGES]
Added file(s):
- files/patch-aa
Port maintainer (pankov_p at mail.ru) is cc'd.
Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:
--- youtube_dl-2007.01.01.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/www/youtube_dl/Makefile /fileserver/ports/www/youtube_dl/Makefile
--- /usr/ports/www/youtube_dl/Makefile Tue Jan 2 23:26:40 2007
+++ /fileserver/ports/www/youtube_dl/Makefile Sat Jan 13 17:02:13 2007
@@ -16,6 +16,8 @@
MAINTAINER= pankov_p at mail.ru
COMMENT= A program for downloading videos from YouTube.com
+RUN_DEPENDS= /usr/local/bin/ffmpeg:${PORTSDIR}/multimedia/ffmpeg
+
NO_WRKSUBDIR= yes
NO_BUILD= yes
diff -ruN --exclude=CVS /usr/ports/www/youtube_dl/files/patch-aa /fileserver/ports/www/youtube_dl/files/patch-aa
--- /usr/ports/www/youtube_dl/files/patch-aa Wed Dec 31 21:00:00 1969
+++ /fileserver/ports/www/youtube_dl/files/patch-aa Sat Jan 13 20:31:06 2007
@@ -0,0 +1,46 @@
+--- ./youtube-dl.orig Sat Jan 13 20:09:50 2007
++++ ./youtube-dl Sat Jan 13 20:30:42 2007
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/local/bin/python
+ #
+ # Copyright (c) 2006 Ricardo Garcia Gonzalez
+ #
+@@ -164,6 +164,7 @@
+ cmdl_parser.add_option('-q', '--quiet', action='store_true', dest='quiet', help='activates quiet mode')
+ cmdl_parser.add_option('-s', '--simulate', action='store_true', dest='simulate', help='do not download video')
+ cmdl_parser.add_option('-t', '--title', action='store_true', dest='use_title', help='use title in file name')
++cmdl_parser.add_option('-a', '--avi', action='store_true', dest='use_avi', help='use title in file name')
+ (cmdl_opts, cmdl_args) = cmdl_parser.parse_args()
+
+ # Get video URL
+@@ -231,6 +232,8 @@
+ if cmdl_opts.use_title:
+ video_title = extract_step('Extracting video title', 'unable to extract video title', const_video_title_re, video_webpage)
+
++if cmdl_opts.use_avi:
++ video_title = extract_step('Extracting video title', 'unable to extract video title', const_video_title_re, video_webpage)
+ # Extract needed video URL parameters
+ video_url_params = extract_step('Extracting video URL parameters', 'unable to extract URL parameters', const_video_url_params_re, video_webpage)
+ video_url_real = const_video_url_real_str % video_url_params
+@@ -287,6 +290,20 @@
+
+ except KeyboardInterrupt:
+ sys.exit('\n')
++
++if cmdl_opts.use_avi:
++ try:
++ final_filename = '%s-%s.avi' % (title_string_norm(video_title), video_url_id)
++ os.system("ffmpeg -i \"%s\" \"%s\"" % (video_filename,final_filename))
++ os.unlink(video_filename)
++ cond_print('Video file is %s\n' % final_filename)
++
++ except OSError:
++ sys.stderr.write('Warning: unable to rename file.\n')
++
++ except KeyboardInterrupt:
++ sys.exit('\n')
++
+
+ # Finish
+ sys.exit()
diff -ruN --exclude=CVS /usr/ports/www/youtube_dl/files/patch-youtube-dl /fileserver/ports/www/youtube_dl/files/patch-youtube-dl
--- /usr/ports/www/youtube_dl/files/patch-youtube-dl Wed Aug 16 09:51:40 2006
+++ /fileserver/ports/www/youtube_dl/files/patch-youtube-dl Sat Jan 13 20:41:08 2007
@@ -1,8 +1,46 @@
---- youtube-dl-orig Fri Aug 11 01:00:08 2006
-+++ youtube-dl Sat Aug 12 13:46:38 2006
+--- ./youtube-dl.orig Sat Jan 13 20:09:50 2007
++++ ./youtube-dl Sat Jan 13 20:30:42 2007
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
-+#!%%PYTHON_CMD%%
++#!/usr/local/bin/python
#
# Copyright (c) 2006 Ricardo Garcia Gonzalez
#
+@@ -164,6 +164,7 @@
+ cmdl_parser.add_option('-q', '--quiet', action='store_true', dest='quiet', help='activates quiet mode')
+ cmdl_parser.add_option('-s', '--simulate', action='store_true', dest='simulate', help='do not download video')
+ cmdl_parser.add_option('-t', '--title', action='store_true', dest='use_title', help='use title in file name')
++cmdl_parser.add_option('-a', '--avi', action='store_true', dest='use_avi', help='use title in file name')
+ (cmdl_opts, cmdl_args) = cmdl_parser.parse_args()
+
+ # Get video URL
+@@ -231,6 +232,8 @@
+ if cmdl_opts.use_title:
+ video_title = extract_step('Extracting video title', 'unable to extract video title', const_video_title_re, video_webpage)
+
++if cmdl_opts.use_avi:
++ video_title = extract_step('Extracting video title', 'unable to extract video title', const_video_title_re, video_webpage)
+ # Extract needed video URL parameters
+ video_url_params = extract_step('Extracting video URL parameters', 'unable to extract URL parameters', const_video_url_params_re, video_webpage)
+ video_url_real = const_video_url_real_str % video_url_params
+@@ -287,6 +290,20 @@
+
+ except KeyboardInterrupt:
+ sys.exit('\n')
++
++if cmdl_opts.use_avi:
++ try:
++ final_filename = '%s-%s.avi' % (title_string_norm(video_title), video_url_id)
++ os.system("ffmpeg -i \"%s\" \"%s\"" % (video_filename,final_filename))
++ os.unlink(video_filename)
++ cond_print('Video file is %s\n' % final_filename)
++
++ except OSError:
++ sys.stderr.write('Warning: unable to rename file.\n')
++
++ except KeyboardInterrupt:
++ sys.exit('\n')
++
+
+ # Finish
+ sys.exit()
--- youtube_dl-2007.01.01.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list