Active Topics

 



Notices


Reply
Thread Tools
Jaffa's Avatar
Posts: 2,535 | Thanked: 6,681 times | Joined on Mar 2008 @ UK
#21
Originally Posted by spock View Post
YES!! THANK YOU!! That solved my problem. Now my mediatomb on-the-fly transcoding setup works with Canola flawlessly! All it took was setting the audio to resample to 44100 (was 48k). I knew it had to be something simple.
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.
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org

Last edited by Jaffa; 2009-03-16 at 16:52. Reason: Grammar tweak
 

The Following 3 Users Say Thank You to Jaffa For This Useful Post:
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#22
Originally Posted by Serge View Post
The amount of data may be fixed, but it does not mean that the amount of work to be done will be fixed as well when decoding video. Scenes with lots of motion or panning still take more cpu than mostly static scenes even with the same bitrate.
I stand corrected. One more question for people more familiar with the NIT innards - does it make sense to make anamorphic videos from a performance standpoint ? In the 'old days' it paid off to go anamorphic as you had to multiply only vectors and not full matrices (among other benefits, with the downside of having non-square pixels).
 
Posts: 74 | Thanked: 19 times | Joined on Oct 2008
#23
Originally Posted by Jaffa View Post
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.
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 spock For This Useful Post:
Jaffa's Avatar
Posts: 2,535 | Thanked: 6,681 times | Joined on Mar 2008 @ UK
#24
Originally Posted by spock View Post
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.
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
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
 

The Following User Says Thank You to Jaffa For This Useful Post:
Lord Raiden's Avatar
Posts: 1,562 | Thanked: 349 times | Joined on Jun 2008
#25
Just to throw my 2c into this conversation, even though I'm coming in a bit late (shows what I get for not paying attention. :rolls eyes, but I use 400x240 resolution as recommended to me by another forum member at 24fps at 900kbps with 128kbps mp3 audio, and it's fine. Really, there's no need to go any higher, since you really can't see the difference in quality, or hear it for that matter, much above those settings. Only a real hard core audio or video phile would even notice.
__________________
Popular Sci-Fi author and creator of the Earthfleet Series.
www.realmsofimagination.net
 
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
 
Posts: 15 | Thanked: 11 times | Joined on Jun 2008
#27
For Windows users, I just found this utility which is discussed in this thread. From what I've read, it also uses mencoder and mplayer. I plan on testing it during the next week, but it sounds pretty good.
 
Jaffa's Avatar
Posts: 2,535 | Thanked: 6,681 times | Joined on Mar 2008 @ UK
#28
Originally Posted by spock View Post
Of course -- just let me know when it's ready.
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
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
 

The Following 3 Users Say Thank You to Jaffa For This Useful Post:
Posts: 74 | Thanked: 19 times | Joined on Oct 2008
#29
Originally Posted by Jaffa View Post
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
Hi Andrew,

Yes, it correctly transcodes the 48kHz audio down to 44.1 kHz. Thanks for updating the script!

Jonathan
 

The Following User Says Thank You to spock For This Useful Post:
Posts: 27 | Thanked: 4 times | Joined on Feb 2008
#30
It's somewhat related.

With the built-in player. I have some success in encoding and playing H264 video without stutter or tearing. The result is 300MB for 2 hours of video, extremely compact and efficient. Before you start playing the video, make sure all the background services and networking are turned off. I am also using the fastest MicroSD card I can find (8GB class-6), and a MicroSD adapter. For encoder, I use either FFmpeg from Handbrake or x264 from RipBot264.


Here are my encoder settings:
Video:
Size=400x224, 400x240, 368x240
Ave Frame Rate=256kbps
Max Frame Rate=512kbps
FPS=24
Profile=Base level 3.0
No of R-Frame=1
No of B-Frame=0
CABAC=OFF
Audio:
AAC-LC =96kbps

Last edited by dchao; 2009-03-23 at 23:45.
 
Reply

Tags
codec, encode, encoding, mplayer, video


 
Forum Jump


All times are GMT. The time now is 21:29.