View Single Post
Posts: 74 | Thanked: 19 times | Joined on Oct 2008
#26
Originally Posted by Jaffa View Post
It's probably in the "let's be clever and not do any transcoding if we don't need to" code. I'll have a look now and try and fix it, there are a couple of other bugs outstanding so a 2.21 release sounds like it's in order.

Thanks for pointing it out. I'm not sure I've got any 48kHz videos, so may ask you to do some testing of the new version, if that's OK.

Cheers,

Andrew
Of course -- just let me know when it's ready. FWIW, here is the hack I put in to make it work:

Code:
--- usr/local/bin/tablet-encode     de8aa78951ee9326ad297a1947b35c202b97bd92
+++ usr/local/bin/tablet-encode     b33e39d0a98b14cb3aa12020b2a4ebf5c1827400
@@ -189,12 +189,12 @@ sub convert {

   # -- Audio/video encoding...
   #
-  if ($options{'copy-audio'} or (($info->{aformat} || '') eq '85') && (($info->{abitrate} || 0) <= $preset->{abitrate})) {
+  if ($options{'copy-audio'} or (($info->{aformat} || '') eq '85') && (($info->{abitrate} || 0) <= $preset->{abitrate}) && 0) {
     push @params, '-oac', 'copy';
     $af = '';

   } elsif (&mencoderSupports('oac')->{'mp3lame'}) {
-    push @params, '-oac', 'mp3lame',
+    push @params, '-oac', 'mp3lame', '-af', 'resample=44100', '-srate', '44100',
                   '-lameopts', 'vbr=0:br='.$preset->{abitrate}.
                   ($preset->{abitrate} < 64 ? ':mode=3' : '');
   } else {
You can see that it's only comparing audio bitrate, ignoring sample rate for the decision of whether or not to copy the audio stream. I'm not sure if I had to add the "-af resample=44100 -srate 44100" flags to the mencoder command line or not, but hey, it works now