maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   mencoder and mediaplayer (https://talk.maemo.org/showthread.php?t=23650)

lilith 2008-09-16 14:18

mencoder and mediaplayer
 
Dear all, I know that these forums already provide a lot of useful information on encoding video for Nokia Internet Tablets. I could not find any explanation for my problem in them, so I try opening another thread hoping that somebody will immediately spot a probably trivial problem.

I'm using mencoder to encode my videos to my Diablo-based N810. I found all the existing scripts a little bit too conservative with respect to the capabilities of the latest version of the software/hardware, so I decided to build my own script:

Code:

mencoder "$1" -o /dev/null
-oac copy
-ovc lavc -lavcopts vcodec=mpeg4:vbitrate=$VBR:mbd=1:threads=2:vpass=1:turbo
-vf scale -zoom -xy $RESOLUTION  -ffourcc DIVX 2>/dev/null

mencoder "$1" -o "$2"
-oac mp3lame -lameopts preset=medium
-ovc lavc -lavcopts vcodec=mpeg4:vbitrate=$VBR:mbd=1:threads=2:vpass=2
-vf scale -zoom -xy $RESOLUTION -ffourcc DIVX 2>/dev/null

Nothing special here. The output shoud be a normal AVI file encoded in MPEG-4 with MP3 VBR audio. I used the ffourcc option to force the fourcc code to DIVX according to previous documentation that I found around. While mplayer is able to play without a glitch encoded videos also with RESOLUTION=600 and VBR=600, I can't find any way to make the builtin Diablo mediaplayer to play these files. Does anybody have a good reason for this?

Note: I also tried to use CBR bitrates for MP3 and also AAC audio. All the cases worked without problems in mplayer but not on the builtin player. I also tried different fourcc values, but nothing changed.

codeMonkey 2008-09-16 15:15

Re: mencoder and mediaplayer
 
Can the builtin media player play DIVX?

lilith 2008-09-16 15:38

Re: mencoder and mediaplayer
 
Quote:

Originally Posted by codeMonkey (Post 224321)
Can the builtin media player play DIVX?

If you refer to the ability of the media player to understand the DIVX fourcc code, I got this "hint" from this:

http://maemo.org/community/wiki/VideoEncoding/

Also trying different fourcc (e.g. MP4V), I had no success. The output of the encoding is not a DIVX though, it is encoded using the MPEG-4 codec, that is supported by the builtin mediaplayer.

codeMonkey 2008-09-16 16:24

Re: mencoder and mediaplayer
 
Cheers for the link - yeah, that's what I was referring to - I wasn't aware that the built-in media player could play DIVX encoded avis.
Whenever I've done any transcoding, I usually use ffmpeg through transcode.
Went through to this newer wiki page from that, though I can't see that it will help any further to be honest.

benny1967 2008-09-16 17:55

Re: mencoder and mediaplayer
 
lilith, what do you mean by "doesn't play"? doesn't open? doesn't play smoothly?

in general, mplayer and the built in media player have different strengths. in general ppl. seem to have better results with mplayer, although its UI isn't as good. OTOH, h.264-playback is better with the built in player. so we're lucky and have a choice, 2 players to choose froom, depending on the source material.

about the parameters you use: a width of 600px seems very daring to me. do you really gain anything in quality compared to the usual 400px? maybe this is the one setting that prevents the built in player from playing it.

KYSoh 2008-09-17 02:52

Re: mencoder and mediaplayer
 
Have you looked at the settings used by tablet-encode http://maemo.org/downloads/product/PC/tablet-encode/? It may help you to optimize your encoder settings.

lilith 2008-09-17 07:19

Re: mencoder and mediaplayer
 
Quote:

Originally Posted by benny1967 (Post 224362)
lilith, what do you mean by "doesn't play"? doesn't open? doesn't play smoothly?

It "thinks" for a while after which it brings up a popup saying "File format not supported". I could not find in the tablet any log with more specific information on the nature of the error...

benny1967 2008-09-18 07:30

Re: mencoder and mediaplayer
 
lilith, it would be interesting to encode the same video with lower bitrate (~300) and a horizontal resolution of <=400px. This way you can find out if the video is simply too demanding in terms of CPU power or if it's something else.

Also, check http://wiki.maemo.org/Manual_video_encoding

lilith 2008-09-18 07:41

Re: mencoder and mediaplayer
 
Quote:

Originally Posted by benny1967 (Post 224903)
lilith, it would be interesting to encode the same video with lower bitrate (~300) and a horizontal resolution of <=400px. This way you can find out if the video is simply too demanding in terms of CPU power or if it's something else.

Also, check http://wiki.maemo.org/Manual_video_encoding

I already tried that. Normally, if a video is too demanding mediaplayer comes out with a different error, something like "video resolution not supported". I did try to use also a resolution =400px, but with no luck.

The funny thing is that I normally encode my videos using Handbrake, with bitrates between 800 and 1000, and they always work and look gorgeous. I just wanted to have my little mencoder script, but at this point I suspect that it is something specific to my version of mencoder or libavcodec.

dan 2008-09-18 11:06

Re: mencoder and mediaplayer
 
I use handbrake and I set it at 1500 and 416 x 190 give or take 10-20 each way.
Here is a little trick I discovered that has made video playback seemless.
I have dual boot with PB Easy Dual boot and I put a 1gb swap partition. Now I can leave my wifi, bluetooth, weather app, and email all on while running a video on my N800.


All times are GMT. The time now is 08:16.

vBulletin® Version 3.8.8