![]() |
Parameters: mencoder / N800 / internal player (optimal?)
Ok. I'm working on getting the most out of video playback on the N800. Been looking at existing solutions for N770 (VideoEncoding), so thanks to all who worked on that, got a lot of info there. Just wanted to share where I'm at the moment and maybe get some tips on how to improve it.
My view on the N800 for video playback is that recode to optimal video format will always be best. The goal for me is to get an automatic service on my server to recode tv shows I tape through a video tuner, and put them on a UPnP server that is reachable by N800. For now I'm looking at using the internal player in N800, I have tried mplayer, but for now the internal seems better. It scales/smoothes the playback better, and there is much less shearing. This may change later. But for now the internal works. My first observation was that the demo video (NokiaN93.avi) included in N800 was not working optimal. It does choke at certain points. After looking at it on my PC, I noticed that the video bitstream peaks at these points up to and over 900kbit/s. Seem to have read somewhere that around 800kbit/s peak and 420kbit/s avarage is optimal. After that I looked at several of the sample converters. But since the N800 is more powerful than N770 I am now always looking to convert to 1/2 of the native resolution of N800. Meaning either 400 in width or 240 in height depending on source material. And the internal player in N800 always wants sizes devided by 16. I've been working on several sample videos, but to give an sample of where I am at I took the Apple QuickTime trailer of Open Season in 480p (43MB / actual: 848x448 / 23.976(24000/1001) fps). And recoded it with mencoder as optimal as I know now. The command line(s) I ended up with was this (2-pass):
And for me, this result is absolutely workable. I have tried other TV material. And it seems to work without problems at these settings. Although, haven't tried 30fps yet. Will test that later. The important point seems to be to limit the peak video bitrates. I can't remember seeing this in existing solutions. And I had problems without it. So for now I'm setting the parameters like this:
So feedback on:
EDIT: Changed direct download of .avi sample to ZIP'ed file with .avi. Got some problems when testing it on my N800 after download. The ZIP should ensure correct file (CRC). |
Re: Parameters: mencoder / N800 / internal player (optimal?)
Interesting research.
I'd be happy to apply such a patch to 770-encode, it seems pointless to re-invent the wheel when we already have a tool which handles scale, size, fps, aspect ratio etc. |
Re: Parameters: mencoder / N800 / internal player (optimal?)
@aflegg
Please do. Your 770-encode.pl script kick-started me with info on paremeters. Probably ripped most info from there ;) Agree on not doing the work twice. But I do have one extra requirement I'm not sure is possible through Perl scripting. I need the mencoder.exe process starting going down one step down in priority (CPU). Or else it is too agressive on the CPU, I've got a lot of processes going on my home server (Windows XP). And I do now how to do this with Win32 programming. |
Re: Parameters: mencoder / N800 / internal player (optimal?)
Looks like its doable:
http://techtasks.com/code/viewbookcode/567 Do you know Perl? If so, section looking at $^O (like it already does in one place) to reduce the priority would be welcome too ;-) |
Re: Parameters: mencoder / N800 / internal player (optimal?)
WOW, that turned out very nice. Now if I could get streaming video (live tv from Orb) to look close to that, the N800 would be perfect for me.
|
Re: Parameters: mencoder / N800 / internal player (optimal?)
@aflegg
Good find. I'll take a look at it and see if I can get it to work. Don't use Perl often, but as any programmer, you get into it and make it work. Will post any result, and we'll see if we can make a Nx00-encode.pl. |
Re: Parameters: mencoder / N800 / internal player (optimal?)
Excellent. Let me know if you have any questions :-)
|
Re: Parameters: mencoder / N800 / internal player (optimal?)
Typical. Got too much work. Don't know if I'll get the time to implement all. Well, at least I testet out a new preset for the 770-encode.pl script that matches best what I found out. Please include it if you want aflegg. It's not much, but it includes the few vrc changes.
Only 2 places I changed. Here is the first (addition in bold/underline text): Code:
%PRESET = (Code:
push @params, '-ovc', 'lavc', |
Re: Parameters: mencoder / N800 / internal player (optimal?)
Can someone try these settings on a 770? With my understanding of what they do, it shouldn't cause any problems, so introducing them as standard for all presets could make the most sense.
|
Re: Parameters: mencoder / N800 / internal player (optimal?)
@sveinan:
I think it's very interesting that you "only" use the internal media player of the N800 and still got good movie performance. I checked out the mplayer thread for some times and I realize that the internal media player only uses the DSP of the cpu to the decode the movie! There is a whole ARM11 core with FPU @330mh wich is not used when you play the movie with the builtin player. Unfortunetly, mplayer is not yet optimized for the n800 hardware...so there should be a GREAT performance boost in the future... |
Re: Parameters: mencoder / N800 / internal player (optimal?)
Agree. If it is the case that the internal do not use all acceleration possible. I'm so looking forward to check out what mplayer will manage once properly tuned. Because, even now, the internal is ok for my use. I'm watching my recoded TV shows at 400x240 25fps without visible dropped frames.
Will be fun to check out possible encode params when mplayer is ready :) |
Re: Parameters: mencoder / N800 / internal player (optimal?)
Yeah, it is somehow very funny. Most of the PDA's with Xscale out there don't even have a DSP, so all the multimedia stuff is processed by the ARM/Xscale core, while you watching movies at an acceptable qualitiy and don't even use your ARM Core :) But I think it is not possbile to load both the ARM core and the DSP at 100% while watching a movie. You can't just mix up mpeg4 decoding on the one and on the other processor. That's while the mplayer developers tried to decode the mpeg on the arm core, while decoding audio and do some image scaling on the dsp.
I am sure there will be a performance boost... I hope that one day, the IVA coprocessor is going to be used. TI specs said that it can handle 640x480 mpeg @30fps :eek: . But there is not much going around with IVA integration. I also hope that Nokia is not going the "We are going to castrate the N800's hardware in order to be able to recruit special Multimedia Devices" way... |
Re: Parameters: mencoder / N800 / internal player (optimal?)
since OS 2007 update on my n800 I've tested the following parameters based on sveinan's enhancement proposals of 770-encode.
noky => { abitrate => 128, vbitrate => 600, width => 400, height => 240, fps => 30, vrcbufsize => 500, vrcmaxrate => 1000 }, I also active index genration for mencoder. Till now I have been able to watch the videos generated (2 only) without any problem on the standard Media Player Just thoght I would share this info for those interested. dwardo |
Re: Parameters: mencoder / N800 / internal player (optimal?)
Would it make sense to do the following in 770-encode.pl to limit vbitrate when preset is more than needed when considering fps width height and vbitrate of original file...
my $ovbitrate = int($info->{vbitrate}*($ofps*$w*$h)/($info->{framerate}*$info->{width}*$info->{height})+0.5); $ovbitrate = $preset->{vbitrate} if $preset->{vbitrate} < $ovbitrate; with this a original file VIDEO: [XVID] 624x352 12bpp 23.976 fps 1010.0 kbps (123.3 kbyte/s) would be encoded with: vbitrate=441 even if the preset contained 600 as a max value. dwardo |
Re: Parameters: mencoder / N800 / internal player (optimal?)
That's an interesting suggestion, but OTTOMH only makes sense when the input format is the same as the output format (i.e. DivX/Xvid)?
I've got some outstanding suggestions from Benjamin Réveillé to look at (apologies if he's reading this), but a new computer and the long Easter break should help knock some of these items off the list. Cheers, Andrew |
Re: Parameters: mencoder / N800 / internal player (optimal?)
Actually I am Benjamin :) Should have told you so.
For the info, I have coded the third proposal I made (the ability to furnish a list of files to encode and determine automatically the outfilename. (Am learning pearl while doing so :) Which I like more and more...) I'll send it to you latter on. As for the framerate, maybe we can test get the original file encoding in movieIfo function and take the proposed measure only if the original file encoding is equivalent to that we want to create... I'm not an encoding guru at all, but there must be some sort of equivalence we can work out. dwardo |
| All times are GMT. The time now is 18:19. |
vBulletin® Version 3.8.8