maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Multimedia (https://talk.maemo.org/forumdisplay.php?f=32)
-   -   Best video quality supported by N800 and N810 via mplayer (https://talk.maemo.org/showthread.php?t=27496)

Jaffa 2009-03-16 16:27

Re: Best video quality supported by N800 and N810 via mpalyer
 
Quote:

Originally Posted by spock (Post 271876)
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.

attila77 2009-03-16 16:41

Re: Best video quality supported by N800 and N810 via mpalyer
 
Quote:

Originally Posted by Serge (Post 271776)
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).

spock 2009-03-22 08:41

Re: Best video quality supported by N800 and N810 via mpalyer
 
Quote:

Originally Posted by Jaffa (Post 272042)
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.

Jaffa 2009-03-22 11:23

Re: Best video quality supported by N800 and N810 via mpalyer
 
Quote:

Originally Posted by spock (Post 273677)
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

Lord Raiden 2009-03-22 12:43

Re: Best video quality supported by N800 and N810 via mpalyer
 
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.

spock 2009-03-22 19:13

Re: Best video quality supported by N800 and N810 via mpalyer
 
Quote:

Originally Posted by Jaffa (Post 273684)
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 :D

wax4213 2009-03-22 19:38

Re: Best video quality supported by N800 and N810 via mpalyer
 
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 2009-03-22 20:02

Re: Best video quality supported by N800 and N810 via mpalyer
 
Quote:

Originally Posted by spock (Post 273746)
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

spock 2009-03-22 21:47

Re: Best video quality supported by N800 and N810 via mpalyer
 
Quote:

Originally Posted by Jaffa (Post 273753)
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

dchao 2009-03-23 23:24

Re: Best video quality supported by N800 and N810 via mpalyer
 
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


All times are GMT. The time now is 14:26.

vBulletin® Version 3.8.8