The Following 3 Users Say Thank You to Jaffa For This Useful Post: | ||
|
2009-03-16
, 16:41
|
Posts: 3,319 |
Thanked: 5,610 times |
Joined on Aug 2008
@ Finland
|
#22
|
|
2009-03-22
, 08:41
|
Posts: 74 |
Thanked: 19 times |
Joined on Oct 2008
|
#23
|
Which is why we have tools like tablet-encode et al. The people saying "just use mencoder" are missing the subtleties like this which are encountered. By centralising the workarounds in tools, the expertise can be shared more quickly and not have to be exposed to users.
The Following User Says Thank You to spock For This Useful Post: | ||
|
2009-03-22
, 11:23
|
|
Posts: 2,535 |
Thanked: 6,681 times |
Joined on Mar 2008
@ UK
|
#24
|
Ah yes, but I am (and was) using tablet-encode. For some reason it was copying the 48kHz audio stream directly instead of downsampling to 44100. I suspect there is a bug in the script somewhere. I just patched it to always transcode audio and that fixed it for my purposes but there's probably a better general solution.
The Following User Says Thank You to Jaffa For This Useful Post: | ||
|
2009-03-22
, 12:43
|
|
Posts: 1,562 |
Thanked: 349 times |
Joined on Jun 2008
|
#25
|
|
2009-03-22
, 19:13
|
Posts: 74 |
Thanked: 19 times |
Joined on Oct 2008
|
#26
|
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
--- 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 {
|
2009-03-22
, 20:02
|
|
Posts: 2,535 |
Thanked: 6,681 times |
Joined on Mar 2008
@ UK
|
#28
|
|
2009-03-22
, 21:47
|
Posts: 74 |
Thanked: 19 times |
Joined on Oct 2008
|
#29
|
Right, I've added support to check the sample rate of the video as well as the bitrate; it can be got here:
https://garage.maemo.org/plugins/scm...oot=mediautils
Please let me know if it works. This version also includes subtitle support and, before release, will fix the issue with two-pass encoding.
Thanks,
Andrew
The Following User Says Thank You to spock For This Useful Post: | ||
|
2009-03-23
, 23:24
|
Posts: 27 |
Thanked: 4 times |
Joined on Feb 2008
|
#30
|
Tags |
codec, encode, encoding, mplayer, video |
Thread Tools | |
|
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
Last edited by Jaffa; 2009-03-16 at 16:52. Reason: Grammar tweak