From b24676ce888c6b597b7e9ca6bb0fca82d71f2ec5 Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Sat, 14 Jul 2012 19:43:24 +0200 Subject: [PATCH] changed --audio-quality behaviour to support both CBR and VBR --- README.md | 5 +++-- youtube-dl | Bin 40554 -> 40634 bytes youtube_dl/PostProcessor.py | 10 ++++++++-- youtube_dl/__init__.py | 4 ++-- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f04b96128..34f5bf723 100644 --- a/README.md +++ b/README.md @@ -90,8 +90,9 @@ which means you can modify it, redistribute it or use it however you like. ffmpeg or avconv and ffprobe or avprobe) --audio-format FORMAT "best", "aac", "vorbis", "mp3", "m4a", or "wav"; best by default - --audio-quality QUALITY ffmpeg/avconv audio bitrate specification, 128k by - default + --audio-quality QUALITY ffmpeg/avconv audio quality specification, insert a + value between 0 (highest) and 9 (lowest) or a + specific bitrate like 128 (default 5) -k, --keep-video keeps the video file on disk after the post- processing; the video is erased by default diff --git a/youtube-dl b/youtube-dl index b3e0cd4221b302881fc5ad75746dd5fc9ad0c7fd..67f6f0c36088f5bd7ecebdb56a55865689a6709d 100755 GIT binary patch delta 8505 zcmZXa<9FTx`{eJKjn&w;oyNLj+iKjH-`I`W*tXr+w(TZu?Bw@6yD#?a?sd*wuV&^C z_?$WKg6!yqtYiL;^2Ph=+exkuk`@98)J%{h_?-ZtbB0i6`j6Z^kw6g8r%)i!|9Z_j zdT|7;*#4>hFok~UDpe_Fl&C`mkmn`tjWV`Ku}HYexR6`}I&3*#W5WrnLrFh{cK8nU zUG*I2A1tcLX5M{I{>AsaoO_vFoDdiYYaJ=7`?PW$J;~_=Aw_;m=xjOUrsn- z)wD26aq(KBT#QM%l0Z_uQlME=F0b92(`rzKE1`kxal~j<5 zT8W#5tdo5+?80{REVbOL0FM;rjmppCgg8kRr@5qO2=btcMaj;!!747D8|rDvmn!g~ zlbQ9Oi=AM!OZ;-2nCyB%P8_@sI*uVJ(?PvyGlr^9uK-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uoW>bLF&PKt5o1~Yub}bMLH7?bMps00})kYv0l$C$zS|gxmO%v*y5M7 z{s;gWr3J^IYI25`^_pone!g-I^6g>ytfmy5W&Sl_Dfmp^tz7?CmF1}@OxF;18__x z=Ljc5SM-%A49}&d-o@n~eRJ41#>UzP=*|GBzrW;h89PP7BtwWLV-EYFBmwo@Ce!Rx ztfOelONe3Z#D~$ySqm7l1D$B5Dn6BB)TV!w@7wER{WLq?FxgR;`1$XXl-F!!YK$l4 zF#=iQ{Z{55dc8&8EAkAMr2Ed)*rA_GZmE3w_58oz#qmk|?thxOI$kpgJi|4bW#IxP zr64M6<&q7uJ9f~F?S3>^HAElZ|3UX+0PSa>?g+VMX?4PB>o}Os8aCPp4o=m^hKe2E z`OoVW0j^Q*1g1gcEX&K2qBd2XjR#Mqb58T%-Rb&hjihuqoYZda+3m*xD||S`ktL^0 zN#4U7a>tmo0~@KFari7q5l72(sb6%$9!zzIxO(kWg#FMw=t+$s(-20mjVR(8zO;iN zkEeiiXIhMGHTDS#`tX?k)8~gta9C&9l!TnF*AW=1& zZ(1o*14(mS~!dl4uo$gYkcd{srGhCUWMeLZ>DM=Wrt^ JX8q6h{{r}qJMjPj diff --git a/youtube_dl/PostProcessor.py b/youtube_dl/PostProcessor.py index 527dc3a3d..375da1aa3 100644 --- a/youtube_dl/PostProcessor.py +++ b/youtube_dl/PostProcessor.py @@ -142,14 +142,20 @@ class FFmpegExtractAudioPP(PostProcessor): extension = 'mp3' more_opts = [] if self._preferredquality is not None: - more_opts += [self._exes['avconv'] and '-b:a' or '-ab', self._preferredquality] + if int(self._preferredquality) < 10: + more_opts += [self._exes['avconv'] and '-q:a' or '-aq', self._preferredquality] + else: + more_opts += [self._exes['avconv'] and '-b:a' or '-ab', self._preferredquality] else: # We convert the audio (lossy) acodec = {'mp3': 'libmp3lame', 'aac': 'aac', 'm4a': 'aac', 'vorbis': 'libvorbis', 'wav': None}[self._preferredcodec] extension = self._preferredcodec more_opts = [] if self._preferredquality is not None: - more_opts += [self._exes['avconv'] and '-b:a' or '-ab', self._preferredquality] + if int(self._preferredquality) < 10: + more_opts += [self._exes['avconv'] and '-q:a' or '-aq', self._preferredquality] + else: + more_opts += [self._exes['avconv'] and '-b:a' or '-ab', self._preferredquality] if self._preferredcodec == 'aac': more_opts += ['-f', 'adts'] if self._preferredcodec == 'm4a': diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index f10822db1..2bc9a3fa6 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -296,8 +296,8 @@ def parseOpts(): help='convert video files to audio-only files (requires ffmpeg or avconv and ffprobe or avprobe)') postproc.add_option('--audio-format', metavar='FORMAT', dest='audioformat', default='best', help='"best", "aac", "vorbis", "mp3", "m4a", or "wav"; best by default') - postproc.add_option('--audio-quality', metavar='QUALITY', dest='audioquality', default='128K', - help='ffmpeg/avconv audio bitrate specification, 128k by default') + postproc.add_option('--audio-quality', metavar='QUALITY', dest='audioquality', default='5', + help='ffmpeg/avconv audio quality specification, insert a value between 0 (highest) and 9 (lowest) or a specific bitrate like 128 (default 5)') postproc.add_option('-k', '--keep-video', action='store_true', dest='keepvideo', default=False, help='keeps the video file on disk after the post-processing; the video is erased by default')