PDA

View Full Version : MPlayer which version is suitable


Pages : [1] 2 3

rapthor
2006-07-06, 15:30
Hi,

can anyone tell me if I can install mplayer on my N770? Do I need a special version? I'm going to see videos streamed through a socket connection. Will that be possible with mplayer installed on a N770?

Thanks.

konttori
2006-07-06, 20:51
There was some work on porting mplayer to 770, but I'm not sure what is the state of the port now. Should be easier now that we have eabi and softfloat.

I think it's indeed possible to get mplayer with limited codecs working on 770, but oto, just compiling more codecs would be just as good.

Serge
2006-07-06, 23:22
Compiling mplayer for 770 is not difficult. Just tested MPlayer1.0pre8 (the only tweaks are a minor change in the source to workaround internal compiler error and explicit addition of -march=armv5te optimization option). The problem is that it works too slow to be usable:

AVI file format detected.
VIDEO: [DIVX] 320x176 24bpp 29.970 fps 323.2 kbps (39.4 kbyte/s)
Clip info:
Software: MEncoder 1.0pre8-3.4.6
================================================== ========================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
================================================== ========================
It seems there is no Xvideo support for your video card available.
Run 'xvinfo' to verify its Xv support and read DOCS/HTML/en/video.html#xv!
See 'mplayer -vo help' for other (non-xv) video out drivers. Try -vo x11
================================================== ========================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
================================================== ========================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
[AO ESD] latency: [server: 0.28s, net: 0.00s] (adjust 0.28s)
AO: [esd] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 320 x 176 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.82:1 - prescaling to correct movie aspect.
VO: [x11] 320x176 => 320x176 Planar YV12
No accelerated colorspace conversion found
SwScaler: using unscaled Planar YV12 -> BGR 16-bit special converter
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
A: 2.9 V: 2.1 A-V: 0.723 ct: 0.001 65/ 65 78% 8% 246.9% 50 0

************************************************
**** Your system is too SLOW to play this! ****
************************************************

Possible reasons, problems, workarounds:
- Most common: broken/buggy _audio_ driver
- Try -ao sdl or use the OSS emulation of ALSA.
- Experiment with different values for -autosync, 30 is a good start.
- Slow video output
- Try a different -vo driver (-vo help for a list) or try -framedrop!
- Slow CPU
- Don't try to play a big DVD/DivX on a slow CPU! Try some of the lavdopts,
e.g. -vfm ffmpeg -lavdopts lowres=1:fast:skiploopfilter=all.
- Broken file
- Try various combinations of -nobps -ni -forceidx -mc 0.
- Slow media (NFS/SMB mounts, DVD, VCD etc)
- Try -cache 8192.
- Are you using -cache to play a non-interleaved AVI file?
- Try -nocache.
Read DOCS/HTML/en/video.html for tuning/speedup tips.
If none of this helps you, read DOCS/HTML/en/bugreports.html.


I found a link that seems to contain information that hardware should support colorspace conversion: http://people.freedesktop.org/~ajax/xdc2006-notes.txt

What can be done with the hardware?
- Hardware RANDR support
- 2x upscaling - for video and games - cuts screen update memory by 4x!
- YUV->RGB colorspace conversion

And 2x scaling should be also very handy, but what is required to make this all work?

hallgreng
2006-07-07, 00:43
I see that you are using X11 for video output.
You may want to try using SDL in stead, it should work much better as the X11 driver tends to be cpu-intensive.

Also, could you post your binary somewhere?

Serge
2006-07-09, 13:41
Here is a binary: http://ufo2000.xcomufo.com/files/mplayer-1.0pre8-20060709-armel.tar.gz

Also here is some interesting link: http://maemo.org/pipermail/maemo-developers/2006-May/003957.html

Probably mplayer can be improved by using DSP for audio decoding, enabling pixels doubling for faster video playback and finding a way for enabling hardware accelerated colorspace conversion. But I don't have any time to work on this in the forseeable future. So compiling mplayer is pretty much simple, a harder task is to optimize it and tune for Nokia 770 so that it can become useful :)

Serge
2006-07-09, 16:40
Just experimented with mplayer a bit more. Looks like it is really mp3 decoding built in mplayer that is very slow (probably because of floating point use as pointed by Frantisek). I tried to encode video with vorbis audio stream (mplayer has fixed point vorbis decoder) and it works a lot better, actually it is even almost watchable :)

Here is a script I used for encoding video in this test:

#!/bin/bash

XRES=320
YRES=240
BITRATE=200

mplayer "$1" -ao pcm:fast:file=tmp.wav -vc null -vo null
oggenc -q1 tmp.wav
mencoder "$1" -nosound -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=$BITRATE -vf scale=$XRES:$YRES -sws 1 -ffourcc DIVX -o tmp.avi
mkvmerge -o "$2" tmp.avi tmp.ogg

Usage: ./encode.sh input_file.avi output_file.mkv

Also tested streaming video from http url, it works fine but seeking is not supported. Mplayer also has its own streaming server, probably it should support seeking and work better, but I did not test it.

So I see a good potential for mplayer :)

edit:
Looks like mplayer can be compiled with libmad which is a fixed point mp3 decoder implementation. So even 'normal' AVI files created by following instructions from https://maemo.org/maemowiki/VideoEncoding could be probably played with mplayer :)

And some more interesting links:
http://n770galaxy.blogspot.com/2006/03/vlc-work-in-progress.html
http://maemo.org/pipermail/maemo-developers/2006-January/002457.html
http://maemo.org/pipermail/maemo-developers/2006-June/004244.html
http://maemo.org/pipermail/maemo-developers/2006-May/004024.html
http://maemo.org/pipermail/maemo-developers/2006-February/002859.html

rapthor
2006-07-10, 10:12
Here is a binary: http://ufo2000.xcomufo.com/files/mplayer-1.0pre8-20060709-armel.tar.gz

I extracted the file to my N770 device but I don't get it started. The device says "Unknown Filetype".

What do I have to do to start mplayer?

Thanks

Serge
2006-07-10, 10:26
I extracted the file to my N770 device but I don't get it started. The device says "Unknown Filetype".

What do I have to do to start mplayer?

It is not a gui application and also it can't be started from file manager. In order to try it, you can start xterm, enter the directory where you have mplayer extracted and start it with a command line like this:
./mplayer -vo sdl -ao sdl [filename or url]

Adding '-fs' option will start video playback scaled to fullscreen, but it will work even slower.

All in all it is just a test of video decoding capabilities of a single ARM core (with certain optimizations and device features still not used) and not quite enduser ready.

Serge
2006-07-12, 00:54
Updated mplayer binary: http://ufo2000.xcomufo.com/files/mplayer-1.0pre8-20060712-armel.tar.gz

Changes:
* compiled with libmad (fast decoding of mp3 audio)
* tweaked keybindings, now it is completely usable on Nokia 770 - fullscreen key works, sound volume can be changed, enter key works as pause/resume, so all the keys work more or less the same as in default video player

Installation:
1. Copy this file to device (for example into Documents folder)
2. Start X Terminal
3. Find this file on the device (run 'cd MyDocs/.documents' for Documents folder)
4. Unpack archive: 'tar -xzf mplayer-1.0pre8-20060712-armel.tar.gz'
5. Enter 'MPlayer-1.0pre8' directory: 'cd MPlayer-1.0pre8'
6. Try to play discovery video: './mplayer /home/user/MyDocs/.videos/Discovery.avi'
7. Have fun

Note: if you tried a previous build, also delete old configuration file: 'rm /home/user/.mplayer/config', a new build has a different default configuration file (sdl for video output, esd for audio, framedrop option enabled, enabled libmad library, configured aspect ratio).

A patch with tweaks for mplayer 1.0pre8 is here: http://ufo2000.xcomufo.com/files/mplayer-1.0pre8-maemo-20060712.diff
Configured with the following options:
./configure --disable-mencoder --disable-alsa --enable-mad --disable-xv --disable-mp3lib --disable-x11 --target=arm-linux

That's all, I'm done now and not going to do anything else :)

Possible future improvement can be some kind of files selection gui that can start mplayer for playing video. And of course performance optimizations for mplayer itself.

aflegg
2006-07-12, 08:32
Very cool. Uses about 80% CPU to decode a DVD encoded (http://www.bleb.org/software/770/#encode) with the "good" setting.

The only real annoyance is that the screen blanking isn't disabled, but presumably a wrapper script or other form of GUI launcher could fix that by topping and tailing the mplayer invocation.

Nickster
2006-07-12, 08:54
This sounds too good to be true, so here's a ton of questions :)

1) Does it work on v2006?

2) Can it play videos of any resolution?

3) Can it scale videos up(down?) to full screen?

4) What about codec compatibility? Is it the same as mplayer on other platforms where you just drop the codecs into /usr/local/lib/codecs/ and it will play just about anything that there's a codec for?

5) Including .MOV and .WMV?

6) And, for completeness (I'm paranoid about not getting enough info!): MPEG1, MPEG2, Xvid, Divx?

7) Not essential, but how about the Live.com RTSP support?

8) Does it handle VCD, SVCD and 16:9 movie files at full frame rate?

9) I'd like to stream videos from another machine - how would I go about that with mplayer? Can it be done over HTTP?

I know I could try this out myself, but I won't be able to for a few days and my mouth is salivating enough to float my keyboard. It was the movie capabilities that I thought let down the 770, but if mplayer does the job... well...

Many thanks for any answers you could give me :)

fanoush
2006-07-12, 10:52
Very cool. Uses about 80% CPU to decode a DVD encoded (http://www.bleb.org/software/770/#encode) with the "good" setting.

is this scaled to full screen 640x480 or it draws only small 320x240 rectangle when the CPU is at 80%?

faber
2006-07-12, 11:00
6. Try to play discovery video: './mplayer /home/user/MyDocs/.videos/Discovery.avi'
Can't launch mplayer: "./mplayer: not found" :mad:

aflegg
2006-07-12, 12:48
Nickster: yes, yes (but not smoothly; a 640-wide 24fps DivX is effectively unplayable), yes, not sure, not sure, yes, not sure, unlikely, yes.

fanoush: That's scaled to full-screen.

faber: you've not changed to the directory containing mplayer.

HTH,

Andrew

faber
2006-07-12, 13:18
faber: you've not changed to the directory containing mplayer.

Hi Andrew,

I put mplayer binary in home/user/MyDocs/mplayer and play abc.avi from it (./mplayer abc.avi). But XTerm returns: Can't launch mplayer: "./mplayer: not found". I'm obviously sure to be in the right directory. Any idea?

Serge
2006-07-12, 13:33
2faber: First ensure that both mplayer and abc.avi files are in the current directory, run 'ls' to get the list of files there. Also it might be a problem with missing executable attribute (depending on the way you extracted mplayer binary, if you precisely followed the instructions, you should not have any problems). It mplayer binary does not have executable attribute, it can be fixed by running 'chmod +x mplayer'.

Well, I guess packaging mplayer into a .deb packet is unavoidable. But as a gentoo linux user, I will have to finally learn this alien system :)

tzz
2006-07-12, 13:38
Well, I guess packaging mplayer into a .deb packet is unavoidable. But as a gentoo linux user, I will have to finally learn this alien system :)

I remember there's a GUI called gmplayer, so you don't have to package just mplayer as a command-line utility. I haven't used it, but judging from the number of "I can't find ./mplayer" complaints a lot of this forum's readers may need it.

Ted

faber
2006-07-12, 14:14
Tried to decompress precisely following instructions and chmoding mplayer (chmod works and finds mplayer), but still nothing

Serge
2006-07-12, 14:36
2faber: What version of OS are you using? This binary is compiled for IT2006.

2ttz: I remember trying gmplayer some time ago on desktop pc, did not like it. Anyway, console version works fine as long as it is started to play video and does not necessery need gui there :)

And anyway, this binary is just a proof that ARM core is also quite fast and can be used for playing video too (I'm not the first to notice that, see http://maemo.org/pipermail/maemo-developers/2006-January/002457.html). Nokia 770 has a dualcore cpu: ARM + DSP. Default media player uses DSP core only, mplayer uses only ARM. Now imagine that the work of decoding video is balanced between these two cores, for example ARM core is only responsible for decoding video, DSP core is responsible for scaling video and colorspace conversion and also for audio. So using both cores we can improve video playback quality. But it will also consume more power and reduce battery life.

faber
2006-07-12, 18:36
2faber: What version of OS are you using? This binary is compiled for IT2006.
Uh, I have IT 2005 :(
Could you compile mplayer for IT 2005?

Thanx a lot.

Serge
2006-07-13, 06:39
2faber: No I don't have IT2005 anymore. Would not it be better to upgrade? ;)

Also tried to run some benchmarks. Used discovery video without scaling for tests.

time ./mplayer -benchmark -nosound -vo null /home/user/MyDocs/.videos/Discovery.avi

================================================== ========================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
================================================== ========================
Audio: no sound
Starting playback...
VDec: vo config request - 352 x 208 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.69:1 - prescaling to correct movie aspect.
VO: [null] 352x208 => 352x208 Planar YV12
V: 46.7 702/702 26% 0% 0.0% 0 0

BENCHMARKs: VC: 12.453s VO: 0.022s A: 0.000s Sys: 1.951s = 14.426s
BENCHMARK%: VC: 86.3241% VO: 0.1493% A: 0.0000% Sys: 13.5266% = 100.0000%

Exiting... (End of file)
real 0m 14.68s
user 0m 12.78s
sys 0m 0.74s


time ./mplayer -benchmark -nosound -vo sdl /home/user/MyDocs/.videos/Discovery.avi

================================================== ========================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
================================================== ========================
Audio: no sound
Starting playback...
VDec: vo config request - 352 x 208 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.69:1 - prescaling to correct movie aspect.
VO: [sdl] 352x208 => 352x208 Planar YV12
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
V: 46.7 702/702 29% 27% 0.0% 0 0

BENCHMARKs: VC: 14.008s VO: 12.798s A: 0.000s Sys: 2.179s = 28.986s
BENCHMARK%: VC: 48.3280% VO: 44.1539% A: 0.0000% Sys: 7.5180% = 100.0000%

Exiting... (End of file)
real 0m 29.48s
user 0m 24.87s
sys 0m 0.91s


time ./mplayer -benchmark -nosound -vo x11 /home/user/MyDocs/.videos/Discovery.avi

================================================== ========================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
================================================== ========================
Audio: no sound
Starting playback...
VDec: vo config request - 352 x 208 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.69:1 - prescaling to correct movie aspect.
VO: [x11] 352x208 => 352x208 Planar YV12
No accelerated colorspace conversion found
SwScaler: using unscaled Planar YV12 -> BGR 16-bit special converter
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
V: 46.7 702/702 38% 4% 0.0% 0 0

BENCHMARKs: VC: 17.848s VO: 1.887s A: 0.000s Sys: 2.207s = 21.943s
BENCHMARK%: VC: 81.3403% VO: 8.6001% A: 0.0000% Sys: 10.0596% = 100.0000%

Exiting... (End of file)
real 0m 22.38s
user 0m 18.25s
sys 0m 0.92s


So looks like decoding video stream itself takes only 14.68 seconds (while video fragment length is 46 seconds long). When decoding + displaying video unscaled, x11 driver is faster than sdl: 22.38 vs. 29.48 seconds. It is interesting that SDL claims to support YUV surfaces (probably simulated in software, otherwise we would probably get higher 'sys' time and lower 'user' time) while when using X11, this YUV->RGB conversion is performed by mplayer code, so mplayer built-in color conversion seems to be faster.

Everything changes when showing scaled video, SDL time grows up to 49.67 seconds, X11 becomes a real slideshow and is unusable.

My tests also show that -mcpu=arm926ej-s is a bit faster than -march=armv5te, but not a big deal.

Serge
2006-07-14, 00:15
Updated mplayer binary: http://ufo2000.xcomufo.com/files/mplayer-1.0pre8-20060714-armel.tar.gz

Changes:
* added screen blanking prevention hack
* added support for hardware pixel doubling in fullscreen mode with x11 driver ('-vo x11' option)

Now when playing 320x240 or 400x240 video, x11 driver with hardware pixel doubling is prefered and it works faster than sdl (see my previous post for more benchmarking details). The only problem with pixel doubling is lack of flexibility, it only can scale video exactly twice. So discovery video in fullscreen mode with x11 driver is a bit smaller than screen size and has black borders, but at least it can be played without a single frame dropped.

Note: if you tried a previous build, also delete old configuration file: 'rm /home/user/.mplayer/config', a new build has a new option in configuration file enabled by default (-noslices), see mplayer man for more details. It improves performance a bit and seems to be absolutely necessery for proper framedropping with hardware pixel doubling when playing very high bitrate/framerate video. Without this option enabled, some video frames freeze and we get slideshow.

A patch with all these tweaks for mplayer 1.0pre8 sources is included in a tarball. Enjoy :)

smackpotato
2006-07-14, 03:23
iv downloaded a google video for psp i can play it with -nosound or at a reduce framrate. my question is can i set up a codecs.conf file to use the audio codecs that came with the nokia 770.any sugestions would be great

fanoush
2006-07-14, 13:50
This is really good. Plays Futurama at 320x240,25fps,304kbits. Some action scenes (the beginning) are slower but generally it is quite watchable. i wonder how expensive is the 'SwScaler: using unscaled Planar YV12 -> BGR 16-bit special converter' part.

I also wonder if YV12->YUV422 or ->YUV420 conversion is much faster than ->BGR

If yes the some hack with using directly OMAPFB_UPDATE_WINDOW ioctl with YUV420 or 422 format could speed it up in fullscreen mode

fanoush
2006-07-14, 14:46
hmm, looks like YV12 is in fact something like YUV420 (whatever that means exactly :) so the conversion is probably trivial
http://www.fourcc.org/fccyuv.htm#YV12
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwmt/html/YUVFormats.asp

also from the MS article it is clear that yuv->rgb conversion is not so trivial

Serge
2006-07-14, 15:05
2smackpotato: don't know, Nokia 770 uses gstreamer multimedia framework, don't know if mplayer can use gstreamer plugins directly (but mplayer probably can be patched to make some use of them)

2fanoush: Thanks, that is interesting idea. Anyway, we are probably already at ARM core limits (though maybe some time critical parts of decoder can be optimized using armv5 edsp instructions, mplayer uses only armv4 in assembly optimized code fragments). Now in order to improve performance, it would be a good idea to move some work to DSP core (preferably moving color conversion/scaling work to it). We can either try finding a way of using existing DSP based audio codecs from mplayer, or try it the other way around - experiment with compiling ffmpeg based gstreamer plugin and replacing default mpeg4 DSP based decoder with it.

As we don't have a free toolchain for DSP programming, most of the nontrivial parts of code and complicated video codecs would have to be implemented using ARM core. But scaling/color conversion seems to be a relatively simple and well defined task that could be implemented using DSP and reused for any codec. I wonder if DSP can have access both to a memory fragment with a frame decoded by ARM core and to video memory buffer to do this work (from what I read, DSP is only 16-bit cpu, I wonder what addressing modes it supports). And this task could be run simultaneously with decoding the next frame.

Well, everything written above is just a pure speculation :) It is only a few days passed since I even had a look into mplayer internals. And I have absolutely no prior knowledge about multimedia compression algorithms or even color formats, so I'm sorry for possibly posting here some stupid things :) All that started from 'hey, it is quite easy to compile mplayer, here is the binary' and turned into fine tuning it into something useful in the end :)

anidel
2006-07-14, 16:39
That's why Nokia chose to go open-source with the 770 :)

anidel
2006-07-14, 16:40
oh and thanks a lot for the time spent in this..
:)

smackpotato
2006-07-14, 17:58
what director do we put additional codecs in. I want to a link to /lib/dsp/modules/aac.o in there. or am I barking up the wrong tree

fanoush
2006-07-14, 18:02
Color conversion can be done directly by hwa742 chip. Would be nice to have more documentation about it though. I already wrote to email mentioned here
http://www.erd.epson.com/vdc/html/contents/S1D13742.htm but got no answer (no surprise :-).

Also I'm not sure but it looks like DSP doesn't send video to epson chip. It only draws it to shared framebuffer which is then send to the chip by kernel omapfb driver from videoplayer code. So if DSP doesn't decode mp4 video there is no reason to use it for other video steps since there is in fact nothing left to do.

DSP tools are free
http://www.gossamer-threads.com/lists/maemo/developers/3938#3938

gstreamer is probably the right way to go (ffmpeg or other plugin using main cpu) but it doesn't mean patched mplayer is not useful. Currently it is not very clear how to display video with gstreamer on device (preferably also pixel doubled).

smackpotato
2006-07-16, 05:52
2serge here is another fixed point codec
http://sourceforge.net/projects/zfaad
this one is for aac can you make use of it
thankyou

Serge
2006-07-16, 06:30
Thanks, but I'm trying to make mplayer work with gstreamer right now :) That would be probably the best solution. Now I'm getting familiar with gstreamer and testing some simple programs with it.

One problem that awaits ahead is that mplayer decodes video and audio in the same thread, so even if we make DSP decode audio, ARM core will stay idle waiting for results from DSP. Simulated that behaviour artificially slowing down video decoder by inserting empty loop to it until cpu usage has grown to about 85% and also adding a call to usleep in audio decoder (that simulates waiting results from DSP). So video ar audio gets played fine separately but not both at once. This issue also needs to be solved. Though DSP itself may be still faster than ARM for audio decoding and improve performance even in such scenario :)

Also reading these two links appears that ARM core is already used for mpeg1 in the default Nokia 770 player:
http://maemo.org/platform/docs/multimedia/multimedia_architecture.html
http://maemo.org/platform/docs/multimedia/getting_started.html

But mplayer subjectively seems to be faster and skips less frames than default player on one of the *.mpg files from my collection with lots of action (320x240, 30 fps). So I wonder what is the problem? It could be worse compiler optimization options (no use of -mcpu=arm926ej-s), extra unnecessery scaling step in video decoding, gstreamer overhead, nonoptimal use of cpu cores in gstreamer (maybe it could be the same problem as with mplayer - one core is working, the other is idle and waiting for results). I don't know for sure, maybe Nokia developers can have a look and fix some bottleneck if it exists.

By the way, it is possible to use '-lavdopts gray' option to decode video in grayscale, it is a bit faster. Also for grayscale video probably we don't need color conversion at all (only one component Y - luminance is used), so we can make a special grayscale convertor and just set R=Y, G=Y, B=Y in this case. Not that I suggest you to watch grayscale video, but it can be used just like one more experiment to improve performance :)

As for the goal of all this thread, I see it as the following. We can't make Nokia 770 play any video file (there are H264 high resolution video files that are very hard to decode even for desktop PC). So we can try to make player tuned for some transcoded type of video and achieve the best quality with it. Scaling is bad as it requires cpu resources when decoding and also extra scaling step degrades image quality, so let's stick with 320x240 and 400x240 resolution doubled on playback. It is very desirable to keep natural video framerate, so the player should be able to smoothly play 30 fps video.

Serge
2006-07-16, 20:20
2fanoush: Thanks for link to DSP tools (though it looks like I need to be registered to get them), that would be probably fun to experiment with them :) Also as you are interested in color conversion, you can try to optimize this part of code. So looks like we have several options: check what videocontroller is capable of, try to make some use of DSP (from the links you provided, looks like YUV->RGB conversion involves many multiply and accumulate operations and DSP should be good at that), also it might be interesting to try getting the best possible performance with grayscale video decoding.

Now about my progress with getting audio decoded by DSP through gstreamer :) There is nothing to show at this moment (I mean no working mplayer build yet). Appears that Nokia 770 has 'dspmp3sink' gstreamer sink for playing mp3 data. It can't work as gstreamer source, so we can't transcode mp3 using it and are quite limited because of that. By the way, though dspmp3sing has license 'unknown', dspaacsink shows 'LGPL' license when running 'gst-inspect dspaacsink' (in order to use gst-inspect tool, you need to 'apt-get install gstreamer-tools' first). I wonder where we can get the sources? But nevertheless there seems to be a solution to use DSP audio decompression in mplayer anyway :) mplayer has hardware ac3 decompression for some soundcards (-ac hwac3), it is implemented as a hack to send compressed audio data chunks directly to audio card, see more details here (http://www.mplayerhq.hu/DOCS/tech/hwac3.txt). So we can use this one-way gstreamer sink. I have modified one of the gstreamer examples and now it can play mp3 by writing data to a socket, this crude hack is attached here. So we can treat this socket as such soundcard capable of decoding mp3 in hardware :) Implementation will involve parsing mp3 headers in mplayer code, splitting it into mp3 frames, but passing through without decompression. That all requires some work, but I'm quite optimistic :) MP3 format description is here: http://mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm

And maybe we should try to register a project at http://garage.maemo.org now?

There are other things that may be very handy:
1. Make a .deb package for mplayer at last :)
2. Make some gui for selecting files and launching mplayer (maybe porting something like freevo (http://freevo.sourceforge.net) to maemo)
3. Try to build mplayer streaming server, it can be used for streaming video from desktop PC with seek support (sources in TOOLS/netstream), also it is interesting whether it could support transcoding video to format supported by Nokia 770 on the fly.
4. Rewrite some time critical mplayer code in assembler using armv5 edsp instructions.

Any volunteers to take some of these tasks? ;)

Serge
2006-07-17, 23:42
Registered a project at https://garage.maemo.org/projects/mplayer/

Original MPlayer 1.0pre8 sources imported to SVN repository, all the maemo related patches cleaned up and committed. So SVN now contains MPlayer sources that can be cleanly compiled to build optimized and tweaked video player for maemo (and all the other architectures are most likely not broken, at least I tried not to break them:)).

I decided not to create traditional 'trunk' directory, but work with a directory 'MPlayer-1.0pre8'. As this project is only a set of patches against upstream mplayer sources, it seems that the most easy way to maintain that all would be to apply these patches to this directory. Once the next mplayer version gets released, it will get imported into some other directory (for example 'MPlayer-1.0pre9'), existing patches will be merged to it and all the development will get switched to this new directory.

If anybody wants to get commit access (or at least has some nice patch to apply), feel free to contact me :)

aflegg
2006-07-18, 08:41
Usually the way to do this would be to have a trunk into which you import the 1.0pre8 sources. This is tagged as "tags/MPlayer-1.0pre8" (say) and then Maemo development happens on the trunk.

Once MPlayer-1.0pre9 is released, rename the current trunk to "tags/MPlayer-1.0pre8-maemo-final", create a new trunk and import the MPlayer-1.0pre9 sources into it. Tag this and then merge the changes made on the trunk between the 1.0pre8 tag and the rename.

Serge
2006-07-19, 07:20
2aflegg: Sounds reasonable, thanks for advice.

aleksandyr
2006-07-21, 01:20
Out of not so idle curiosity, anyone deciphered:
http://www.maemo.org/platform/docs/multimedia/getting_started.html
To the point of getting mplayer to launch browser videos?

Serge
2006-07-21, 21:39
First initial experimental version of MPlayer which supports MP3 audio decoding using DSP core is ready: http://ufo2000.xcomufo.com/files/MPlayer-1.0pre8-20060721-armel.tar.gz. Patch for original Mplayer 1.0pre8 sources is available from garage project page: https://garage.maemo.org/projects/mplayer/ (binary is not uploaded there because of 2MB upload limit).

In order to install the player, better unpack it to some place that is available in PATH, /usr/bin for example (yes, deb package is still not available).

This new DSP sound decoding feature is implemented by adding new gstreamer sound output module (ao_gst.c) which can be used to play either ordinary stream of sound data (for any decoders) or MP3 frames passed in uncompressed form using dspmp3 fake decoder module (ad_dspmp3.c).

Use 'mplayer -vo x11 -fs -ao gst -ac dspmp3 filename.avi' to get the best mplayer video playback performance at the moment. Remember that it is still experimental and surely contains bugs :) A known limitation is unavailability of volume control for gstreamer output module '-ao gst', it will be fixed later.

And finally some benchmarks:
time ./mplayer -ao gst -ac dspmp3 test.mp3
real 6m 14.91s
user 0m 6.95s
sys 0m 4.00s

time ./mplayer -ao esd -ac mad test.mp3
real 6m 14.07s
user 0m 51.60s
sys 0m 3.67s

So now ARM core definitely has more cycles free for video decoding :)

faber
2006-07-22, 10:03
So now ARM core definitely has more cycles free for video decoding :)
Works great, congratulations!

How can I double video size (you told about a 2x HW option). What about full screen?

.flv's downloaded from Youtube & Google Video are playable too (use this for downloading: http://javimoya.com/blog/youtube_en.php) !

smackpotato
2006-07-22, 13:32
Thanks Serge. you are great at figgering things out fast. iv noticed in a clip with one channel, the video apear to go at double speed. also will you be building a passthough codec for aac. I've notticed that gstreamer has an aac sink

MikeL
2006-07-22, 16:27
I found and installed Koos Vriezen's GUI KMPlayer port for OS2006 and wondered if it would be useful to link this GUI to the great work being done by Siarhei Shamash (Serge) on the command line Mplayer KMPlayer is a Hildon/Gtk port of the KDE/Qt KMPlayer application. It's an audio/video player frontend that supports various playlists like ASX, m3u, RAM, pls, RSS/Atom podcasts and can even play SMIL files w/ support for RealPix format.https://garage.maemo.org/projects/kmplayer/
https://garage.maemo.org/projects/mplayer/

Homesite of KMPlayer http://kmplayer.kde.org/

Can Mplayer be invoked/started via directly selecting a URL in Opera? How exactly can Opera (OS2006) be advised to open Mplayer in preference or in addition to default AV players (Like on a PC with the right mouse button)

For additional information, a personal interest of mine is in being able to utilise the universal Tversity Media Server running on the PC to serve any Personal and Internet AV formats I have or find; for streaming playback on the Nokia 770 http://www.internettablettalk.com/forums/showpost.php?p=18450&postcount=16

fanoush
2006-07-22, 20:27
Well done. The same Futurama clip (320x240,25fps,304kbit video,128Kbit mp3 audio) is now fluent even in screens with lot of motion. Apart from volume and audio being a bit off it is ideal.

Finally something that plays better than my old Tungsten T2 overclocked to 168Mhz with TCPMP ;) And there is still room for improvement at least with the colorspace conversion done directly by the video chip. This could shave off few cycles and memory accesses too.

Serge
2006-07-23, 20:56
2faber: With '-vo x11' option enabled, pixel doubling is automatically used if the image still fits screen when doubled. It is doubling and not scaling, so in order to make video use all screen space, a fixed 320x240 resolution is recommended for encoding (or 400x240 for wide format).

2smackpotato: Thanks, I'll check that single channed double speed issue. As for using aac codec, it is really technically possible, but requires some work. So I think that ensuring bug free and fast MP3 playback is the first priority now. Can you explain why you want aac codec support that much? So aac codec may get higher priority, right now it is quite low :)

2MikeL: It is a good idea, though I'm more interested in getting good performance and stability first. GUI launcher can be added any time.

2fanoush: Yes, hardware colorspace conversion would be certainly very useful for MPlayer, but we depend on Nokia developers here and should try to get some information from them. By the way, here is a report about much improved video performance in IT2006, so maybe optimized MPlayer port is not that much needed now: http://www.internettablettalk.com/forums/showthread.php?t=2538. How does your Futurama clip work with the built-in video player?

fanoush
2006-07-24, 08:17
2fanoush: Yes, hardware colorspace conversion would be certainly very useful for MPlayer, but we depend on Nokia developers here and should try to get some information from them. By the way, here is a report about much improved video performance in IT2006, so maybe optimized MPlayer port is not that much needed now: http://www.internettablettalk.com/forums/showthread.php?t=2538. How does your Futurama clip work with the built-in video player?

Well, maybe there is enough information but someone has to try it. I still had no time for this. It is a hack but you can write to framebuffer directly (as root) using fbdev ioctls. See include/asm-arm/arch-omap/omapfb.h and drivers/video/omap/hwa742.c in kernel source. It should be matter of making OMAPFB_UPDATE_WINDOW ioctl with proper color format (OMAPFB_COLOR_YUV420). The hard part for me is to prepare picture in YUV format to actually verify it works and looks as expected wit this ioctl :)

As for the dsp code in IT2006 with futurama it is good (maybe better in IT2006) but not great and your mplayer version seems faster. And also it hangs sometimes randomly in various scenes and you must wait until dsp daemon restarts dsp (and then you must play movie from the beginning and seek).

Serge
2006-07-24, 19:49
Well, maybe there is enough information but someone has to try it. I still had no time for this. It is a hack but you can write to framebuffer directly (as root) using fbdev ioctls. See include/asm-arm/arch-omap/omapfb.h and drivers/video/omap/hwa742.c in kernel source. It should be matter of making OMAPFB_UPDATE_WINDOW ioctl with proper color format (OMAPFB_COLOR_YUV420). The hard part for me is to prepare picture in YUV format to actually verify it works and looks as expected wit this ioctl :)
Well, googling for OMAPFB_UPDATE_WINDOW I found the following source code: https://stage.maemo.org/svn/maemo/projects/haf/trunk/osso-af-utils/src/fb-progress.c

Did not try this example, but it can be probably used as a template for future experiments (for example trying to convert it to using YUV colorspace may be the first step). And omapfb.h also contains OMAPFB_SCALE define. Does it mean that video controller is also capable of scaling video? Anyway I find the information in omapfb.h not very detailed and not quite obvious, if it got slightly better explained, that would help really a lot.

An interesting observation is the availability of libxv in maemo repository, though it seems to be useless now. But if hardware is really capable, maybe we will get a fully featured XVideo extension support in one of the next revisions? I already asked a question about libxv status in the maemo-developers mailing list, but got no response so far:
http://www.mail-archive.com/maemo-developers@maemo.org/msg04511.html

fanoush
2006-07-24, 20:10
And omapfb.h also contains OMAPFB_SCALE define. Does it mean that video controller is also capable of scaling video? Anyway I find the information in omapfb.h not very detailed and not quite obvious, if it got slightly better explained, that would help really a lot.

Well, it is just a header file. hwa742.c in kernel is actual implementation of these ioctls so it has a bit more information.

Serge
2006-07-24, 21:07
Well, it is just a header file. hwa742.c in kernel is actual implementation of these ioctls so it has a bit more information.
Thanks, found this file. And sorry for misleading information about OMAPFB_SCALE, that was defined in one of the files found in google, but it is not available on Nokia 770 :(

Well, I got one more idea to try :) Maybe the same gstreamer thing can be used for YUV video output. But I would prefer XVideo extension for that. And having to run video player as root for framebuffer access is not good.

As for scaling, seems like I found why SDL is capable of scaling video relatively fast while mplayer using -zoom option with x11 output fails miserably and gets a slideshow. SDL uses a low quality linear scaler, while the fastest software scaling option in MPlayer itself is bilinear scaler. So probably a fast assembler optimized linear scaler can be the best option for providing proper fullscreen support for any video resolution. Though most likely pixel doubling should be disabled and not used with linear scaler otherwise image quality can suffer too much. So we have 2 options, either use better scaling algorithm and stress CPU, or use a linear scaler and stress memory (memory bandwidth is about 250MB/s when only writing memory and about 100MB/s when copying from one location to another).

Nickster
2006-07-24, 21:55
:confused: Odd - I try and run the 20060721 beta as root and user and I get "permission denied" even though I've set it to be executable.

Serge
2006-07-25, 05:12
:confused: Odd - I try and run the 20060721 beta as root and user and I get "permission denied" even though I've set it to be executable.
MPlayer binary is compiled for Internet Tablet OS 2006. It does not work on Internet Tablet OS 2005. Most likely that's the problem you encountered (and you are not the first, check older messages in this forum thread).

Edited project description at garage just in case, though 'armel' suffix already implies OS 2006 requirement.

And MPlayer does not need to be run as root (at least right now, unless we add support for OMAPFB output module).

fanoush
2006-07-25, 08:02
Well, I got one more idea to try :) Maybe the same gstreamer thing can be used for YUV video output. But I would prefer XVideo extension for that. And having to run video player as root for framebuffer access is not good.
I'm not sure gstreamer will help. I guess there is some secret handshake or setup between gstreamer video sinks and video player and that the video frame is sent to framebuffer by videoplayer, not gstreamer (because of pixel doubling which needs to be set). But these are just guesses. I don't think dsp sends data to hwa472 chip directly (i.e video driver is duplicated in dsp code), it only draws to famebuffer in main memory and rest is done either by videoplayer directly or gstreamer. See also this thread http://www.gossamer-threads.com/lists/maemo/developers/8691#8691

Nickster
2006-07-25, 09:09
MPlayer binary is compiled for Internet Tablet OS 2006. It does not work on Internet Tablet OS 2005. Most likely that's the problem you encountered (and you are not the first, check older messages in this forum thread).
Found the problem: I can't execute it from my MMC card, I have to copy it into the main filing system (i.e. /usr/bin/ rather than /media/mmc1/).

Odd Maemo restriction...

Works like a dream though - I'm now considering various transcoding strategies. Know of a way of getting mencoder or transcode to add horizontal or vertical bars to movies so that I can encode them to 400x240 or 320x240 whilst maintaining the original picture aspect ratio?

fanoush
2006-07-25, 11:54
Odd Maemo restriction...

This is not so odd if you consider that FAT filesystem used on MMC cannot preserve permissions (including executable bit). With FAT either everything is executable (with proper mount flags) or nothing. Nothing is better/safer choice.

BanditRider
2006-07-25, 12:36
the mmc1 entry in /etc/fstab has the noexec option.

Nickster
2006-07-25, 12:59
the mmc1 entry in /etc/fstab has the noexec option.
Any idea why someone chose that?

aflegg
2006-07-25, 13:09
Any idea why someone chose that?

For the reasons fanoush outlined.

Nickster
2006-07-25, 13:39
For the reasons fanoush outlined.
D'oh... forum software skipped over his post...

Meanwhile, here's a Perl script that I've knocked up that will recode anything you can throw at Mencoder to produce a 300kbps video 96kbps audio 15fps video file, at 320x240 or 400x240 depending on aspect ratio, with vertical or horizontal bars added if need be.

You'll need Perl, Mplayer and Mencoder installed.

Haven't used it much yet, but the output's OK.

Usage: lokify input_file (output_file)

Default output file name is input_file + ".avi"

http://www.egyptus.co.uk/lokify_pl.txt

fanoush
2006-07-25, 15:06
Why would anyone want black border encoded in the video? Fullscreen playback should add it at no cost :) BTW for the parameters you mentioned (15fps) default video player should be good enough, is there problem with such videos?

Nickster
2006-07-25, 15:12
Regarding the bars, the problem is with videos which aren't precisely 4:3 or 15:9. If you're after generating a 320x240 or 400x240 video, then you're going to have to add bars or distort the picture. I prefer to add bars.

Regarding framerate, I've found that the lag between sound and video is smaller when using 15fps rather than 25fps.

EDIT: Aha, just re-read this thread and discovered the "-vo sdl -ao sdl" option - the 25fps movie I generated is smooth and in synch now! Actually, even the full-sized movies are smoother too... will have to re-think this...

konfoo
2006-07-25, 15:31
Inserting bars will waste bits for en/decoding. You should use the aspect tag in the MP4 header via mplayer's -lavcopts aspect=16/9 (or 4/3, or autoaspect). If you can't get correct 4/3 or 16/9 then use -vf scale to adjust the vertical size of the content so it doesn't appear out of ratio (if your source is 2.35:1, 1.88:1, etc.). At 320x and 400x, a little chopping is not going to cost you any quality.

Serge
2006-07-25, 16:42
Regarding the bars, the problem is with videos which aren't precisely 4:3 or 15:9. If you're after generating a 320x240 or 400x240 video, then you're going to have to add bars or distort the picture. I prefer to add bars.
Well, you don't need to add bars, the player should respect aspect ratio. With -vo x11 the player tries to scale video twice (using hardware pixel doubling), if it still fits screen, pixel doubling is used. So it either displays unscaled video or doubled. 320x240 and 400x240 were just examples of video resolutions that are good for pixel doubling (and 352x288 is bad). And for 16:9 video, the best resolution would be 400x224.

Regarding framerate, I've found that the lag between sound and video is smaller when using 15fps rather than 25fps.
Maybe that's because of esd output module that is used by default. And with -ao gst some lag also exists, it should be compensated in some way later.

EDIT: Aha, just re-read this thread and discovered the "-vo sdl -ao sdl" option - the 25fps movie I generated is smooth and in synch now! Actually, even the full-sized movies are smoother too... will have to re-think this...
I also used -ao sdl first, but found some problems with it on a few video clips (it was quite buggy). So now -ao esd is used by default.

By the way, I enabled wiki at garage and added some information about current command line options usage:
https://garage.maemo.org/plugins/wiki/index.php?UserManual&id=54&type=g

aflegg
2006-07-25, 17:25
D'oh... forum software skipped over his post...

Ah, fair enough.

Meanwhile, here's a Perl script that I've knocked up that will recode anything you can throw at Mencoder to produce a 300kbps video 96kbps audio 15fps video file, at 320x240 or 400x240 depending on aspect ratio, with vertical or horizontal bars added if need be.

You'll need Perl, Mplayer and Mencoder installed.

You might be interested in my own Perl-based command line encoder which automatically works out size based on aspect ratio, and has a number of presets to guarantee the output is always playable on a 770:

http://www.bleb.org/software/770/#encode

I've not yet enhanced it to allow the preset to specify the maximum frame rate, though this is a trivial enhancement to add.

Cheers,

Andrew

daf
2006-07-25, 18:23
someone know how to panscan the video for fill in fullscreen ?
there is a panscan option with mplayer but it does not work with mencoder...

Nickster
2006-07-25, 19:28
I also used -ao sdl first, but found some problems with it on a few video clips (it was quite buggy). So now -ao esd is used by default.

Would I be right in thinking that there won't be a one-option-suits-all approach in the final version? i.e. there's no escaping having to use esd for some movies, sdl for others, etc? By the way, I enabled wiki at garage and added some information about current command line options usage: https://garage.maemo.org/plugins/wiki/index.php?UserManual&id=54&type=g

Nice one - are these appropriate for the 20060721 build? I tried the alternatives to the sdl ao option and playback was a lot worse for a 352x240 29.99fps 224kbps mp3 sound 2Mbps video MPEG1 file (enough description?!).

Have you looked at streaming yet? Using HTTP and Samba/CIFS to access the same file on my local network was very stuttery, even when specifying a large cache size. Once that's sorted, I'll never need to get out of bed again ;)

Nickster
2006-07-25, 19:53
Ignore the bit about appropriate settings - changing vo option from sdl to x11 improves things no end!

smackpotato
2006-07-25, 20:24
Serge . the reason i wanted to decode aac audio was so i could play google video for ipod and psp. it is not important now that ive been told how to download the flv files
thankyou

gfxman
2006-07-26, 01:39
Hi there,

i got a " permission denied " when tryng to launch /.mplayer name.avi

What i'm doing wrong ?

fanoush
2006-07-26, 06:00
What i'm doing wrong ?
Maybe you just forgot to read this thread from the beginning before asking questions? :-)

anidel
2006-07-26, 06:45
Come let's help him :) ehehe let's not be so picky.

Once you've unpacked the .tar.gz you can find the mplayer executable on your current directory. Either you run it as:

./mplayer <options> <movie filename to open>

(and not /.mplayer as you wrote)

or copy it to /usr/bin so that you can run it wherever you are by simply typing:

mplayer <options> <movie filename to open>

Note: if you've unpacked it onto the memory card, then you can't run it as, for security reason I suppose, the Nokia 770 won't allow any executable to be executed from the memory card. In this case either you copy it into your home directory (cp ./mplayer /home/user) or copy it into /usr/bin as stated earlier in this post of mine.

fanoush
2006-07-26, 07:17
Come let's help him :) ehehe let's not be so picky.

You think it is better to write the very same instructions second or third time to the same thread and thus make the thread even longer and repetitive? It is so hard to read first before posting?

anidel
2006-07-26, 08:06
I think it's a good thing to do when the thread becomes too long.
It's very time consuming start reading all the thread from the very beginning.
Moreover many information written in the first posts is usually out-of-date.
It's a good thing to do a search before posting. But usually the answer (as in this case) is split in several posts.
An answer like mine put it all together for an easier reading.

Last, but not less important, I think one should always help. Assuming the other part is not trying to be too lazy.

That's my opinion.

Many times I've found myself reading thru a whole thread and missing important pieces as they were buried into a long post. I am convinced that a summary every now and then helps a lot.

BTW, I totally agree with what you've stated. Even if it appears incongruent with what I've just written. I agree not to repeat answers and I agree that one has to read before posting. But there are cases where repeating an answer avoid wasting time to newcomers.

Nickster
2006-07-26, 09:07
You think it is better to write the very same instructions second or third time to the same thread and thus make the thread even longer and repetitive? It is so hard to read first before posting?
There's a lot of useful info in this thread, but there's also a lot of outdated info too.

I certainly got confused - still am to some extent.

A good solution would be for Serge (and/or other regular posters in this thread) to put a link to Serge's Wiki page with the latest advice and settings in their signatures so that pointer is well publicised.

fpp
2006-07-26, 09:55
It would be even better if the nice person who takes the time to do the summary did it as a Howto page in the Wiki. Forums are not good for this use because the summary itself will get lost in the thread and out of date. It is easier for everyone to just refresh the Wiki page with new information and point new users to it.

gfxman
2006-07-26, 10:12
You think it is better to write the very same instructions second or third time to the same thread and thus make the thread even longer and repetitive? It is so hard to read first before posting?

I've red all the tread ( not all the post, sure, cause some or them are too much tecnic for me, i'm a completly newbie to the linux world, but i've red most of them... ) . I got to start xterm, make it work, lerned how to list files and move the mplayer in the right dir in the memory. Than i din't read that you must put option between the player and the avi... i'm sorry to disappoint you...

About the " confusion" or " rumor " that i would have created making that question, i think that you triple it, by responding that way, and all the post that came after. Thx bytheway for replys.

fanoush
2006-07-26, 11:36
About the " confusion" or " rumor " that i would have created making that question, i think that you triple it, by responding that way, and all the post that came after.
Maybe :) I simply couldn't resist. My bad. Sorry. But I still think everything was already written about the 'permission denied' problem you asked. I thought there was simply no possible reply that would help you and best and fastest for you is to read it again.

Nickster
2006-07-26, 20:25
HTTP streaming success!

I've found that if you encode video as:

Nx240 or 400xN (i.e. scaled to fit precisely into a 400x240 box, but not adding borders or stretching the picture)

25fps

150kbps video (2-pass mpeg4)

96kbps audio (mp3lame)

...then put the resulting AVI file onto a webserver onto my home network (the server's connected by wire to my wireless router) I can stream full-screen video via HTTP to my Nokia 770 using the following command:

mplayer -framedrop -fs -vo x11 -ao sdl -cache 800 http://servername/dir/file.avi

OK, so it means re-encoding a lot of stuff (200kbps video was very stuttery and jumpy), but the movie plays back smoothly and the sound quality is good and in synch.

(EDIT: I'm guessing that if you keep the total bitrate below 250kbps, you might be able to get better video quality at the expense of audio, but I haven't investigated that)


I'm quite pleased :)

Serge
2006-07-27, 06:03
For some more scientific benchmarking you can use -benchmark option for mplayer and measure time and cpu load for different mplayer options and different types of video :)

If you want to check whether some video can be played smoothly, add -noframedrop option, with this option mplayer will complain when it is not fast enough to play this video without dropping some frames.

By the way, probably 2-pass encoding is not the best choice for smooth playback on the resource limited device. It will make some parts of video use lower bitrate than you specified, but some parts will use higher bitrate and may become too heavy for cpu. So if you don't care too much about file size and want a smooth playback, 1-pass encoding is a way to go.

Nickster
2006-07-27, 09:01
Ta for the tip Serge - I'm still experimenting, and will report my findings here.

I've found out that by dropping the audio bitrate to 64kbps, I can increase the video bitrate to the point where it starts dropping frames whilst keeping the audio smooth and in synch (VBR changed up to 300kbps).

Will do more scientific tests from now on now that I know how :)

faber
2006-07-27, 09:48
I've found out that by dropping the audio bitrate to 64kbps, I can increase the video bitrate to the point where it starts dropping frames whilst keeping the audio smooth and in synch (VBR changed up to 300kbps).
My tests (with -vo x11 -fs -ao gst -ac dspmp3 options):

* mpeg4@400x224x25fpsx250kbps+mp3@128kbps=> 90-100% CPU
* h264@300x240x12fpsx250kbps+mp3@128kbps=> 90-100% CPU
* flv/mpeg1@300x240x25fpsx250kbps+mp2@128kbps=> 50-70% CPU

2Serge: Not all of these videos can be played by N770 default player. But the playable ones don't stress CPU (< 25%) as mplayer does. Can we hope in future a low-cpu-loading mplayer version, using DSP also for video?

In the meantime, thanx Serge for your job!

fanoush
2006-07-27, 11:48
t all of these videos can be played by N770 default player. But the playable ones don't stress CPU (< 25%) as mplayer does. Can we hope in future a low-cpu-loading mplayer version, using DSP also for video?
Well one of the main points why to have this mplayer is to not to use dsp for video because it is overused and cannot cope with higher bitrates/framerates together with decoding mp3 audio. If you want this just use the default video player by Nokia. I think the answer to your question is no.

However it would be interesting to add ogg support to default video and audio player (=to gstreamer) as described on maemo.org here http://www.maemo.org/platform/docs/multimedia/getting_started.html . This can move audio decoding to main CPU if you encode it as ogg and thus let DSP decode video a bit faster. But this would not solve problem that the dsp video codecs are a bit picky.

konfoo
2006-07-27, 14:30
My tests (with -vo x11 -fs -ao gst -ac dspmp3 options):

* mpeg4@400x224x25fpsx250kbps+mp3@128kbps=> 90-100% CPU
* h264@300x240x12fpsx250kbps+mp3@128kbps=> 90-100% CPU
* flv/mpeg1@300x240x25fpsx250kbps+mp2@128kbps=> 50-70% CPU


Forget about H.264. This device is not capable and benchmarking it is a complete waste of time.

What settings are you using for 'mpeg4'? QPEL? GMC? What is the spacing of your Iframes?

IMHO MP4 is best suited to this device in terms of capability to play back the video at decent compression ratios.

faber
2006-07-27, 18:36
it is overused and cannot cope with higher bitrates/framerates together with decoding mp3 audio
Not exact. With default player I can decompress mpeg4@352x240x800kbps+mp3@128kbps at < 25% CPU!

The few known limitations of this player are:
* can handle only few formats (no wmv, no flv, no h264, etc...);
* only < 352x288 resolutions and only 16x multiple
* jerky playback in full screen
* no B-frames

No problems with high bitrate/framerate, no CPU overloading with mpeg4. This is the reason why I hope Serge will use DSP for video too.

faber
2006-07-27, 18:39
Forget about H.264. This device is not capable and benchmarking it is a complete waste of time.
I agree. But 12 fps is not so bad for 320x240 h264 on 220 Mhz CPU....

What settings are you using for 'mpeg4'? QPEL? GMC? What is the spacing of your Iframes?
No QPEL, no GMC, no b-frames, 250 interval for I-frames.

IMHO MP4 is best suited to this device in terms of capability to play back the video at decent compression ratios.
I agree.

fanoush
2006-07-27, 19:25
Not exact. With default player I can decompress mpeg4@352x240x800kbps+mp3@128kbps at < 25% CPU!

The few known limitations of this player are:
* can handle only few formats (no wmv, no flv, no h264, etc...);
* only < 352x288 resolutions and only 16x multiple
* jerky playback in full screen
* no B-frames

No problems with high bitrate/framerate, no CPU overloading with mpeg4. This is the reason why I hope Serge will use DSP for video too.

Well looks like you still don't get it :-) The thing is that DSP is another CPU. Default player does not use main ARM CPU for decoding (both video and audio) at all, but uses only DSP. That's why main CPU is below 25% and playback is jerky. The DSP in fact is constantly at 100% when playing most videos and is screaming for help :-) You don't see DSP utilization in load plugin or top command or whatever. You need to watch /sys/devices/platform/dsp/loadinfo to see it.

Nickster
2006-07-27, 22:57
Didn't do any further experimentation today on encoding videos for streaming, but I have figured out how to integrate mplayer with Opera.

First, become root.

Then create a new file named /usr/bin/runmplayer

$ vi /usr/bin/runmplayer

Add these lines to it and save it:


#!/bin/sh

/usr/bin/mplayer -fs -framedrop -vo x11 -ao sdl -cache 800 "$1"


Make it globally executable.

$ chmod 0755 /usr/bin/runmplayer

Stop being root.

Close all Opera windows.

Change to your Opera config directory:

$ cd /home/user/.opera

Copy your current opera.ini file (not sure if this version of Opera randomly overwrites opera.ini like the last one did).

$ cp opera.ini opera.mpl

Open it

$ vi opera.mpl

Under the "File Types" heading, add the following lines:


video/x-msvideo=7,/usr/bin/runmplayer,,runmplayer,avi,|
video/mpeg=7,/usr/bin/runmplayer,,runmplayer,mpg,mpe,mpeg,|

(Add any other file types you know about, note that the line ends with a comma followed by a pipe)

Save it, then copy it over opera.ini

$ cp opera.mpl opera.ini

Start up Opera and find a video link to click on and click on it.

After about ten seconds, the movie will start playing!

It's a bit of a hack (maybe something the Mplayer installation script/module could do automatically?) but it works!

You'll probably want to tune the options given to mplayer, especially when each new release comes out.

What I do is run Apache on my file server, and allow web browsers to display directory listings, so I can now browse my archive and just click on a filename instead of typing in a very long mplayer command plus URL with a stylus from the command line.

This will make testing encoding strategies for streaming a lot less annoying, so that's now my next job.

Nickster
2006-07-30, 21:29
Benchmarking done, but until I post a full analysis, I've found a "silver bullet".

This was on a single-pass encoded DivX, 352x240 @ 25fps.

I've found that if you encoded them with any video bitrate (well, I tested up to 600kbps) but keep the audio bitrate at 96kbps, and play it back on mplayer using "-vo x11 -ao gst -ac dspmp3 -cache 800", you get minimal frame drop.

With the "-noframedrop" flag set, a 60-second video took between 60.0 and 60.8 seconds to play, so I guess specifying "-framedrop" to handle the minimal amount of dropped frames would give you a VERY smooth ride.

More later once I've fully analyzed the results.

MikeL
2006-08-02, 06:48
I really think that adding mplayer as a switch able alternative to the built in audio and video players, via selecting a URL in opera is a great move forward. With the latest version of TVersity Media Server (Version 0.9.7.1 July 30, 2006) I am now able to stream wma as mp3 and mov, wmv, flv etc as mpeg1 using the current built in players on Nokia.

I cannot say video play back is perfect (Frame dropping) because of the streaming resolution issues you are discussing in this thread etc.

HOWEVER, using TVersity as a media server where we can work on the TVersity profile for the Nokia 770 and AV player is probably a great way of ensuring we can maximise Internet streamed content visibility on the Nokia 770 in the simplest way for ordinary Nokia 770 users (Geek less)

More info on progress with TVersity and the Nokia 770 can be found in TVersity Forum and later posts in these threads. i.e.
http://s90264353.onlinehome.us/phpBB/phpBB2/viewtopic.php?t=1761
http://s90264353.onlinehome.us/phpBB/phpBB2/viewtopic.php?t=1789

I would appreciate any support from the Internet Tablet Talk community to ensure TVersity interacts with the Nokia 770 at the best levels of capability and compatibility.

Serge
2006-08-02, 12:04
2Nickster: Can you try to add opera integration instructions to wiki (https://garage.maemo.org/plugins/wiki/index.php?id=54&type=g)?

Now about the progress, I did not have much free time lately, but now volume control support for gstreamer output module is committed to SVN. There is still a problem with audio/video sync that needs to be fixed before '-ao gst -ac dspmp3' can be recommended for everyone and used by default. I also tried a quick search for AAC format description, but did not find anything useful yet.

As for the future improvements, right now it seems to me that having ARM assembler optimized color conversion and scaling would be a good thing to have next. But of course if we can make DSP do this work, it would be even better.

Scaling has bad effect on performance, but if we want a universal player that can accept any video resolutions and show them fullscreen, scaling support is needed. Using sdl video output, we can see that it can be implemented reasonably fast, mplayer just needs an optimized fast software scaler so that we can switch to x11 video output by default.

Nickster
2006-08-03, 09:25
Currently your wiki is marked as read-only - let me in! :)

On the benchmarking, I realised that my results are pretty worthless. I don't think I understand what's going on, nor what to do to get meaningful results. The results I reported earlier in this thread are just numbers that don't mean what I thought they meant - 60s clips that take 60.5s to process doesn't mean that they play smoothly - in fact in this case playback was VERY jumpy.

I'm a programmer, and a couple of my skills are UNIX, Perl and Python scripting, so I'm willing to do any leg-work you can direct my way - just let me know what commands to run, and I'll run them on videos of varying size, FPS, ABR and VBR.

konttori
2006-08-03, 19:12
Some comments on the current progress.

FIrst of all, mplayer seems to be perfect for video playback on 770. 400x240 is the optimal resolution for crisp video. I've been able to play smoothly 18 fps with dspmp3. Very nice.

Second, although I salute the idea that the core should be fixed first and the app developed then, I also think that the scripts for opera integration are great. Magnificent, I might say. I just hope that someone would take the time to create a deb containing mplayer and opera integration. Also, at the same time, deb should register for the maemo platform the file types. I think that is work that will have to be made at some point anyway and delivering the deb making scripts to serge would help him out at some point and help us all immediately. Especially integration and means of registering of google video would be great (is mplayer able to playback youtube?). Does anyone know, if there would be a need for a plugin for opera to be able to launch google videos from web pages?

Third, I am not sure about how mencoder has been coded, but it might make sense to drop some seemingly unnecessary codeks from the pack to drop the filesize a bit.

Nickster
2006-08-03, 22:29
Regarding codecs, I think the basics have been covered, but would be REALLY nice to have WMV capabilities.

mike9285
2006-08-04, 01:46
Avi and mpeg work with mplayer. Are any other file types currently supported?

Nickster
2006-08-04, 10:25
Avi and mpeg work with mplayer. Are any other file types currently supported?
mplayer uses FFMPEG, so the answer is "lots" :)

See: http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html#SEC16

Serge
2006-08-08, 05:55
Currently your wiki is marked as read-only - let me in! :)
Hmm, did not know that. I don't see any settings for enabling access to it. Maybe garage account is needed to be able to edit wiki pages? Or maybe even project membership, don't know.

On the benchmarking, I realised that my results are pretty worthless. I don't think I understand what's going on, nor what to do to get meaningful results. The results I reported earlier in this thread are just numbers that don't mean what I thought they meant - 60s clips that take 60.5s to process doesn't mean that they play smoothly - in fact in this case playback was VERY jumpy.
If you use -benchmark and -nosound options, video will be played at maximum speed possible, so if you get 30 seconds for a 60 seconds video clip, that means mplayer takes 50% of resources for decoding and displaying video. If you add -vo null option, the video is only decoded without even being displayed (minus color conversion and flushing image to screen). So we can get insights about what parts of program take the most time.

I'm a programmer, and a couple of my skills are UNIX, Perl and Python scripting, so I'm willing to do any leg-work you can direct my way - just let me know what commands to run, and I'll run them on videos of varying size, FPS, ABR and VBR.
If you (or somebody else) could have a look and try making .deb package for mplayer, that would be great :)

Serge
2006-08-08, 06:06
Second, although I salute the idea that the core should be fixed first and the app developed then, I also think that the scripts for opera integration are great. Magnificent, I might say. I just hope that someone would take the time to create a deb containing mplayer and opera integration. Also, at the same time, deb should register for the maemo platform the file types. I think that is work that will have to be made at some point anyway and delivering the deb making scripts to serge would help him out at some point and help us all immediately. Especially integration and means of registering of google video would be great (is mplayer able to playback youtube?). Does anyone know, if there would be a need for a plugin for opera to be able to launch google videos from web pages?
I would prefer a plain .deb for mplayer only (nonintrusive and guaranteed not to break user's system) and another one for opera and probably file manager integration :)

Third, I am not sure about how mencoder has been coded, but it might make sense to drop some seemingly unnecessary codeks from the pack to drop the filesize a bit.
Maybe, though it is not the highest priority now. I also tried compiling with -Os instead of -O4, but the size difference is not so noticeable and decoding video gets slower.

By the way, maybe using profile guided optimizations can improve performance somewhat (-fprofile-generate and -fprofile-use gcc options), but they seem to be not supported in codesourcery toolchain (when used with -c option).

schmolch
2006-08-08, 21:40
Hi,

i do not own a N770 yet but it is on his way and will arrive tomorrow morning :-)

I was very suprised to hear that you can use mplayer on it :-)

Now my question:
On my Laptop i use mplayer with the esd-sound output to stream the Sound of the Videos i watch to another Laptop that is connected to the Speakers.
I guess the answer is no, but is this maybe even possible on the N770?

Regards
Schmolch

mrp
2006-08-09, 11:08
ome/user/MyDocs/.documents # mplayer Discovery.avi
MPlayer 1.0pre8-3.4.4 (C) 2000-2006 MPlayer Team
CPU: ARM

Terminal type `xterm' is not defined.

Playing Discovery.avi.
AVI file format detected.
VIDEO: [DIVX] 352x208 24bpp 15.000 fps 389.5 kbps (47.5 kbyte/s)
Clip info:
Software: MEncoder dev-CVS-050626-17:02-3.4.2
================================================== ====================== ==
Trying to force audio codec driver family libmad...
Opening audio decoder: [libmad] libmad mpeg audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 64.0 kbit/4.54% (ratio: 8000->176400)
Selected audio codec: [mad] afm: libmad (libMAD MPEG layer 1-2-3)
================================================== ====================== ==


MPlayer interrupted by signal 11 in module: preinit_libvo
- MPlayer crashed by bad usage of CPU/FPU/RAM.
Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and
disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_c rash.
- MPlayer crashed. This shouldn't happen.
It can be a bug in the MPlayer code _or_ in your drivers _or_ in your
gcc version. If you think it's MPlayer's fault, please read
DOCS/HTML/en/bugreports.html and follow the instructions there. We can 't and
won't help unless you provide this information when reporting a possib le bug.
/home/user/MyDocs/.documents #

Edited: recreated swap file, works now

Serge
2006-08-11, 19:03
Where can you find a mplayer .deb?
I found a kmplayer .deb and installed it but it doesn't perform very well and you cant configure it anyway like you could with mplayer from console.

can you give me some links on the installation of these tools?
A link to the page where you can get MPlayer binary for Nokia 770 is in my signature. It is not yet packaged in .deb for a number of reasons. The most important of them is that I don't think that MPlayer is end user ready right now and don't feel like supporting it, sorry. My intention from the very beginning was to provide some starting ground and handle this project over to somebody else who has more spare time to work on it. I'm not going to abandon it though as there are still some interesting ideas to try :)

MikeL
2006-08-20, 14:43
Installed mplayer on my Nokia 770 and am able to stream Internet wmv feeds/streams such as DL.TV (http://dl.tv/blogs/digitallifetv/default.aspx) transcoded to mpeg1 by TVersity (unlike the issues I was having with the Nokia's built in Video Player which would not stream mpeg1 Video successfully with play-buffer-play-buffer issues)

Here is my ongoing Nokia 770 Video streaming thread in Tversity forumshttp://s90264353.onlinehome.us/phpBB/phpBB2/viewtopic.php?p=11485&sid=5de051c52a9bd7c1f7156b79c6dd9b6a#11485

I am looking forward to the mplayer port being packaged for general Nokia 770 user usage with an option to integrate with the Opera web browser without the need to be root etc.

Great work Serge :)

aflegg
2006-08-21, 11:16
I've uploaded a new version of my command line encoder (http://www.bleb.org/software/770/#encode) which supports an "mplayer" prefix for 400x240 video.

It plays back much better than the "best" preset for the built-in video player with no noticeable tearing, even at 25fps.

Tested using the command:

mplayer -fs -vo x11 -ao gst -ac dspmp3

No frame drops with this preset :-)

Any questions, just give me a shout.

Cheers,

Andrew

Luna
2006-08-22, 13:10
It plays back much better than the "best" preset for the built-in video player with no noticeable tearing, even at 25fps.
Tested using the command:

Andrew

I cannot get the script to run in Win32 ('Get a Faile to get movie info'). What is the gist of the settings you found to be optimal for mplayer. I tried to see what you are using in the script but I still get tearing on my test so I must be missing something.

aflegg
2006-08-22, 13:15
Have you got mencoder on your path? That's the most common reason for "Failed to get movie info". If so, let me know and we can investigate further.

The settings for each preset can be seen in the source:

http://www.bleb.org/software/770/770-encode.pl:source

Luna
2006-08-22, 13:29
Have you got mencoder on your path? That's the most common reason for "Failed to get movie info". If so, let me know and we can investigate further.



I set the path to have mencoder in it as well all execute from the same directory. It makes it past the first block "Failed to get movie info: $@\n";" but fails when parsing the info. Keep in mind perl isn't something I do so newb alert.

I notice set dest to nul: but don't see you use it plus I havent a clue what the 2 is for at the end :)


The settings for each preset can be seen in the source:

I use those settings but not being a perl man I thought I might/probably have missed one of the params being pushed.

aflegg
2006-08-22, 13:43
Apologies, I've noticed a stupid mistake. I've uploaded a new version to the same URL.

FWIW, line 242 changes '/dev/null' to '$dest'.

HTH,

Andrew

Karel Jansens
2006-08-22, 15:33
FWIW, line 242 changes '/dev/null' to '$dest'.

You have an evil mind, did you know that? ;)

Serge
2006-08-22, 23:45
Updated MPlayer build is available at https://garage.maemo.org/projects/mplayer/

It contains improvements to gstreamer sound output support (-ao gst):
* added volume control
* fixed audio/video synchronization problems

Please test it and report any problems with -ao gst -ac dspmp3. If it works ok, the next build will have gstreamer sound output enabled by default (that's why -ao gst should be also tested with other decoders like -ad mad and non mp3 audio). By the way, the next build is likely to be packaged in .deb :)

aflegg
2006-08-23, 08:39
You have an evil mind, did you know that? ;)

It has been mentioned before to me, yes ;-)

And, in fact, usually in relation to Perl scripts.

d_mon
2006-08-23, 14:03
Hi guys,
I have been reading this forum for quite a long time. You guys are doing a really great job here! I haven't got a 770 device yet...but soon. The problem is that I don't know a thing about linux and programming in general and it seems that you need to do a lot of...tweaking. Anyway...here are my questions:
1) Is the video player in OS2006 able to play internet real video such as...rtsp://ugcurec/filename.rm ???
2) What about the Mplayer?
Your answers will be greatly appreciated!
Thanks!

D.

aflegg
2006-08-23, 14:28
1) Is the video player in OS2006 able to play internet real video such as...rtsp://ugcurec/filename.rm ???

Yes. Works very well with the BBC's video on demand.

2) What about the Mplayer?

No, as the RealVideo codecs aren't open source and so it only works with mplayer on x86 with the Windows codecs.

HTH,

Andrew

d_mon
2006-08-23, 14:44
Thanks Andrew for the info!
I went to a local Compusa to try out the tablet and I tried streaming rtsp://212.54.100.33/video/DATA-2006-08-22-1-19.rm but it didn't work. Is this different than the BBC format?

D.

aleksandyr
2006-08-23, 16:22
What error message did you receive?

The media player is notoriously picky about resolutions and bitrates.

d_mon
2006-08-23, 16:36
Well,...the player loaded and...nothing happened. No error messsage. It just didn't work. I wonder why?!

Serge
2006-08-23, 22:27
I've uploaded a new version of my command line encoder (http://www.bleb.org/software/770/#encode) which supports an "mplayer" prefix for 400x240 video.
Just tested this encoder, it works fine for 16:9 widescreen movies and produces video with very good quality. But when I tried to convert 640x480 video, it got cropped too much to fit 400x240. Also when I tried adding '-o' option, it was converted to 400x304 which is not very good for mplayer. So the only thing I'm still missing is proper conversion for 4:3 movies. Anyway, good work, it's a very useful tool =b

It plays back much better than the "best" preset for the built-in video player with no noticeable tearing, even at 25fps.

Tested using the command:
mplayer -fs -vo x11 -ao gst -ac dspmp3
No frame drops with this preset :-)
To be honest, actually I noticed some framedrops on complicated panning scenes with this preset, but it still looks quite acceptable or even good. And we still have potential for quite a noticeable performance improvement by using YUV colorspace directly. Also video decoder from ffmpeg library that is used in mplayer can be probably better optimized for arm :)

aflegg
2006-08-24, 08:42
Just tested this encoder, it works fine for 16:9 widescreen movies and produces video with very good quality. But when I tried to convert 640x480 video, it got cropped too much to fit 400x240. Also when I tried adding '-o' option, it was converted to 400x304 which is not very good for mplayer. So the only thing I'm still missing is proper conversion for 4:3 movies. Anyway, good work, it's a very useful tool =b

What's the best 4:3 ratio for mplayer? Presumably you'd want the height to be maximum, and the width to be minimum. However, the amount of cropping can be reduced (it's the @cropLimit definition at the start of the code). Does mplayer need the multiple-of-16 size that the built-in video player does?

Would it be better in general if the width declared in the preset was ignored for 4:3 stuff (i.e where it's taller than wider) in the original aspect?

To be honest, actually I noticed some framedrops on complicated panning scenes with this preset, but it still looks quite acceptable or even good. And we still have potential for quite a noticeable performance improvement by using YUV colorspace directly. Also video decoder from ffmpeg library that is used in mplayer can be probably better optimized for arm :)

Cool, I'll leave its bitrates as-is for the moment, but they can be tweaked when new versions come out.

Cheers,

Andrew

Serge
2006-08-26, 04:34
What's the best 4:3 ratio for mplayer? Presumably you'd want the height to be maximum, and the width to be minimum. However, the amount of cropping can be reduced (it's the @cropLimit definition at the start of the code).
Probably crop limit should be set so that it is just enough to convert from 16:9 to 15:9 (from wide screen resolution to Nokia 770 fullscreen). Also maybe just changing aspect ratio a bit can be unnoticeable and it is ok to just scale 16:9 movies to 400x240 even without cropping. For 4:3 it is better to scale to 320x240 in mplayer. To sum up, any video converted for mplayer should have either width equal to 400 or height equal to 240 or both :)

Does mplayer need the multiple-of-16 size that the built-in video player does?
MPEG4 is internally using blocks for video compression, so probably using non multiple-of-16 size may result special processing and be inefficient. But I did not look into video decoding logic yet, so don't know for sure. I'm just going to look into mpeg4 (and probably also h264) decoding optimizations.

Would it be better in general if the width declared in the preset was ignored for 4:3 stuff (i.e where it's taller than wider) in the original aspect?

Any solution is ok if it helps to produce files with height not exceeding 240 :)

aflegg
2006-08-26, 12:39
OK, what I'll try and do for the next release is make it so that a preset can specify a height, rather than a width. Or something like that...

Anyway, I'll make sure the mplayer preset generates 240-high output :-)

bac522
2006-08-29, 12:45
LOL, ok I know I'm asking more out of something still in the works, but has anyone had any luck using mplayer to view streaming media?

BanditRider
2006-08-29, 14:52
I can stream a windows media audio stream of WEEI (Boston sports talk radio) using:

mplayer -fs -vo x11 -ao gst -cache 200 http://wmc2.liquidcompass.cc/WEEI?MSWMExt=.asf

bac522
2006-08-30, 13:42
I can stream a windows media audio stream of WEEI (Boston sports talk radio) using:

mplayer -fs -vo x11 -ao gst -cache 200 http://wmc2.liquidcompass.cc/WEEI?MSWMExt=.asf

Haven't tried just audio. I have a linux server at home with a tv capture card in it and I use command line VLC to stream video. Works great with my laptop and pocketpc, but the 770 doesn't doesn't like it.

smackpotato
2006-08-30, 19:52
2serge. Im just curious. Will you be using the gstreamer framebuffer sink (dspfbsink)
for video output in any future releases.

Serge
2006-09-02, 18:13
2smackpotato: I'm still struggling to get dspmp3sink working properly (video/audio sync is still sometimes wrong) :( As for gstreamer framebuffer sink, it is unlikely that I will even try it (though it seems to have YUV support in its caps). Normal framebuffer seems to be a more reliable option to get YUV support, though it will require mplayer to be run as root to use it. Anyway, I still have some other things in my todo list and don't have any plans to try either of these options in the near future. If you feel like trying gstreamer framebuffer sink, you can do some hacking yourself, any useful patches will be welcome :)

Serge
2006-09-04, 03:43
Thanks to Eduard Bartosh, MPlayer is now available as a .deb package for Nokia 770. You can download this new version here: https://garage.maemo.org/frs/?group_id=54
Be sure to read release notes (https://garage.maemo.org/frs/shownotes.php?release_id=123) first if you used one of the older older non-packaged versions.

syam
2006-09-04, 15:05
Thanks to Eduard Bartosh, MPlayer is now available as a .deb package for Nokia 770. You can download this new version here: https://garage.maemo.org/frs/?group_id=54
Be sure to read release notes (https://garage.maemo.org/frs/shownotes.php?release_id=123) first if you used one of the older older non-packaged versions.

I have successfully installed the mplayer, but it does not apper anyhere in the start menu. How can I start the mplayer?

Thanks.

=DC=
2006-09-04, 17:33
I think Serge failed to mention that you still need to use xterm to use the player. It's just an easier way to install the important stuff. We're still waiting for the GUI to be created. It would be nice to have something similar to the newly released Media Streamer (http://www.internettablettalk.com/forums/showthread.php?t=2972) , but I'd be happy with something like the built-in audio/video players.

neiljerram
2006-09-04, 22:33
Thanks to Eduard Bartosh, MPlayer is now available as a .deb package for Nokia 770. You can download this new version here: https://garage.maemo.org/frs/?group_id=54
Be sure to read release notes (https://garage.maemo.org/frs/shownotes.php?release_id=123) first if you used one of the older older non-packaged versions.

Very nice, thank you.

As well as handling video nicely, an unexpected extra is that mplayer also plays my Ogg Vorbis files. What's more, it seems to do so more smoothly than the specific Ogg Vorbis Player application, and using negligible CPU. Is this expected? How is mplayer doing this - is it converting to mp3 and then using the DSP, or something like that?

Regards - Neil

neiljerram
2006-09-04, 22:50
I think Serge failed to mention that you still need to use xterm to use the player. It's just an easier way to install the important stuff. We're still waiting for the GUI to be created. It would be nice to have something similar to the newly released Media Streamer (http://www.internettablettalk.com/forums/showthread.php?t=2972) , but I'd be happy with something like the built-in audio/video players.

Here's a GUI of sorts ... Install Midnight Commander, and add the following to its Extension File setup anywhere before the existing entry for ogg123/xmms:

shell/.ogg
Open=mplayer %f

(And obviously, likewise for the other file extensions you want to go through mplayer.)

Then you can use MC to browse your videos/music, and double clicking on a file in MC will cause mplayer to play it.

It's not exactly Rhythmbox, I know, but it works (rather well).

- Neil

=DC=
2006-09-04, 23:14
Thanks Neil, that definitely helps. Now we just have to wait for a proper GUI and we're set.

syam
2006-09-05, 06:55
I think Serge failed to mention that you still need to use xterm to use the player. It's just an easier way to install the important stuff. We're still waiting for the GUI to be created. It would be nice to have something similar to the newly released Media Streamer (http://www.internettablettalk.com/forums/showthread.php?t=2972) , but I'd be happy with something like the built-in audio/video players.

I tried the following
./mplayer /home/user/MyDocs/.videos/Discovery.avi

I got the following error
Sh: ./mplayer: not found

Any help?

Thanks.

Serge
2006-09-05, 07:19
Just run 'mplayer /home/user/MyDocs/.videos/Discovery.avi' without './' part. It would be needed if you had mplayer binary in the current directory and wanted to run it, that was the case with older non-packaged versions. Now mplayer binary is installed in the system and can be run from anywhere.

As for Discovery.avi video, it is not the best file to play by mplayer right now. Mplayer is optimized for video resolutions that are exactly twice smaller than the screen size (320x240 and 400x240 for example). For such resolutions it uses hardware pixel doubling and works fast. Discovery video is smaller than that, so it needs to be scaled and scaling takes a lot of cpu resources. If you want to get the best performance for Discovery video, you can run mplayer as 'mplayer -vo x11 /home/user/MyDocs/.videos/Discovery.avi' (explicitly force it to use a faster x11 driver with hardware pixel doubling), but you will get some black borders around image.

Currenly mplayer is good at playing video transcoded to 400x240, 400x224 (16:9) and 320x240 (4:3) resolution and is capable to play it at full frame rate.

Also youtube video seems to have 320x240 resolution, so it gets played fine by mplayer too. Used the following python script to download youtube files (though did not try it to run on the device itself yet :) ): http://www.arrakis.es/~rggi3/youtube-dl/

A better universal scaler that will work reasonably fast for any resolutions is planned in the future releases (along with YUV colorspace support).

As for the GUI, it would be really good to have it, any volunteers to create and contribute it? ;)

MikeL
2006-09-05, 16:52
Serge

I am using the latest version of mplayer (.deb) and attempting to stream mpeg1 provided files from TVersity. When the files are on the Nokia's MMC the files play very well on the Nokia 770 using mplayer with a 320x240 video resolution (Set in TVersity profiles.xml for Nokia 770), with only a slight audio miss-alignment. :)

If however I attempt to stream the file to the Nokia 770 it's locking up, however I then noticed that the mplayer has an option to add a "bandwidth" value.

So....

I added mplayer -bandwidth to a TVersity supplied Video URL and what do you know; I had almost perfect streaming, not withstanding the above audio issue and some slight frame dropping. :) (The bandwidth I used is a wild guess at this stage)

The following is a capture of the xterm information while streaming this mpeg1 video file.

mplayer -bandwidth 10000000 http://***.***.****.***:41952/geturl/dl.tv.091.wmv.mpg%3ftype%3dvideo%252fx-ms-wmv%26ttype%3dvideo%252fmpeg%26url%3dhttp%253a%252 f%252fzdpub.vo.llnwd.net%252fo2%252fdltv%252fepiso de91%252f%26ext%3d.mpg
MPlayer 1.0pre8-maemo.4 (C) 2000-2006 MPlayer Team
CPU: ARM


Unknown option on the command line: -bandwidth
Error parsing option on the command line: -bandwidth
/ $ mplayer -bandwidth 10000000 http://***.***.****.***:41952/geturl/dl.tv.091.wmv.mpg%3ftype%3dvideo%252fx-ms-wmv%26ttype%3dvideo%252fmpeg%26url%3dhttp%253a%252 f%252fzdpub.vo.llnwd.net%252fo2%252fdltv%252fepiso de91%252f%26ext%3d.mpg
MPlayer 1.0pre8-maemo.4 (C) 2000-2006 MPlayer Team
CPU: ARM


/usr/share/fonts/SwaRR4nh.ttf doesn't look like a font description, ignoring.
Cannot load font: /usr/share/fonts/SwaRR4nh.ttf
Terminal type `xterm' is not defined.

Playing http://***.***.****.***:41952/geturl/dl.tv.091.wmv.mpg%3ftype%3dvideo%252fx-ms-wmv%26ttype%3dvideo%252fmpeg%26url%3dhttp%253a%252 f%252fzdpub.vo.llnwd.net%252fo2%252fdltv%252fepiso de91%252f%26ext%3d.mpg.
String appears to be already escaped in url_escape %21F2
String appears to be already escaped in url_escape %21F2
String appears to be already escaped in url_escape %31A2
String appears to be already escaped in url_escape %21F2
String appears to be already escaped in url_escape %21F2
String appears to be already escaped in url_escape %21F2
String appears to be already escaped in url_escape %21F2
String appears to be already escaped in url_escape %21F2
String appears to be already escaped in url_escape %21F2
STREAM_HTTP(1), URL: http://***.***.****.***:41952/geturl/dl.tv.091.wmv.mpg%3ftype%3dvideo%252fx-ms-wmv%26ttype%3dvideo%252fmpeg%26url%3dhttp%253a%252 f%252fzdpub.vo.llnwd.net%252fo2%252fdltv%252fepiso de91%252f%26ext%3d.mpg
Connecting to server ***.***.****.***[***.***.****.***]: 41952...
Cache size set to 300 KBytes
Cache fill: 2.67% (8192 bytes)
MPEG-PS file format detected.
VIDEO: MPEG1 320x240 (aspect 1) 24.000 fps 0.0 kbps ( 0.0 kbyte/s)
================================================== ========================
Trying to force audio codec driver family libmad...
Requested audio codec family [mad] (afm=libmad) not available.
Enable it at compilation.
Requested audio codec family [mp3] (afm=mp3lib) not available.
Enable it at compilation.
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 64.0 kbit/4.54% (ratio: 8000->176400)
Selected audio codec: [ffmp2] afm: ffmpeg (FFmpeg MPEG layer-1 and layer-2 audio decoder)
================================================== ========================
[VO_SDL] Using driver: x11.
================================================== ========================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 320 x 240 (preferred colorspace: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try adding the scale filter, e.g. -vf spp,scale instead of -vf spp.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
================================================== ========================
[AO ESD] latency: [server: 0.28s, net: 0.00s] (adjust 0.28s)
AO: [esd] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 320 x 240 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO: [sdl] 320x240 => 320x240 Planar YV12 [fs]
[VO_SDL] Info - please use -vm or -zoom to switch to the best resolution.
A: 133.5 V: 133.4 A-V: 0.063 ct: 0.167 3204/3204 33% 35% 24.9% 1801 0
Exiting... (Quit)
/ $So I am now wondering what slight tweaks I should/could make to improve situation for these TVersity transcoded and streamed mpeg1 files?

Serge
2006-09-05, 17:52
2MikeL: Seems like you use old non-optimal settings from stale '/home/user/.mplayer/config' file (sdl for video, esd for audio), it is better to remove it. Currently default options are stored in '/etc/mplayer/mplayer.conf' (this file should not be edited), you can override any of them with '/home/user/.mplayer/config' which contains your local options and has higher priority. And the command line options have the highest priority.

If you find that '-bandwidth 10000000' works best for you and don't want typing it every time you invoke mplayer, you can add it to '/home/user/.mplayer/config' in the following way:

bandwidth=10000000

Hope this helps.

MikeL
2006-09-05, 18:04
Hope this helps.Thanks Serge, I did follow the instructions to remove the config file before installing the new .deb version of mplayer but then tried to run the old ./mplayer command from the previous directory where an old version of mplayer was still stored. I imagine this could have re-created the file? (What else should we delete from an old mplayer install i.e. the old mplayer executable?)

Anyway config was there again, I removed it and now mplayer playback is very good and it looks like audio is fine with a quick test thank you for your help! :D

--edit-- It seems I do not need the -bandwidth option now either :o Thanks very much Serge it works very very well streaming from TVersity.

itkach
2006-09-06, 01:49
Tried the new .deb package. It installed fine, but all I get when I try to run mplayer in xterm is "Segmentation fault" message. Any ideas why this happens?

Serge
2006-09-06, 05:15
2itkach: Do you use swap? Some problems with crashes on start have been observed before: http://www.internettablettalk.com/forums/showpost.php?p=20068&postcount=96
Also you can try to reboot the device to see if it helps.

itkach
2006-09-06, 14:40
Rebooting didn't help. Turning swap off didn't help. Rebooting after turning off swap didn't help. It doesn't even get to the point of printing out something meaningful like in the other thread. All I get is
/ $ mplayer
Segmentation fault

maxilogan
2006-09-06, 14:46
Can mplayer play .rm files? Is there any particular command line to input?

polyesterangst
2006-09-06, 16:09
I am a newbie to Linux and Xterm, I understand how to run mplayer in Xterm, but have a few questions.

Do I need to be root to run a video off my memory card? If so, does 'sudo su' solve that issue.

I have a video in a folder 'Videos' on my memory card. Do I need to have mplayer installed somewhere specific to access it, like I have seen in this forum, about moving it to the /usr/bin? So to run the video off the memory card, what would be the path I need for mplayer to access it?

Thanks

MikeL
2006-09-06, 16:15
If you have latest mplayer installed just start xterm session and type

mplayer /media/mmc1/Videos/<filenameandextension>

If you have used a combination of upper and lower case characters for your video folder and filename then type the same in xterm.

polyesterangst
2006-09-06, 16:48
Thanks MikeL, you keep saving me. Next I will try the Opera to mplayer that you are doing with TVersity. That I need to gain root on for that to work correct? Which means I will need Dropbear and work with Wiki directions for gaining root, right?

MikeL
2006-09-06, 17:42
Thanks MikeL, you keep saving me. Next I will try the Opera to mplayer that you are doing with TVersity. That I need to gain root on for that to work correct? Which means I will need Dropbear and work with Wiki directions for gaining root, right?Wait, If you are just trying TVersity from inside your own network you do not need Hamachi etc. Its just simply a matter of pointing the browser to ***.***.***.***:41952/LIB Then if you traverse the Tree and select a video URL pasting it in xterm i.e. mplayer -bandwidth 10000000 <TVersity provided URL> it should work more or less. Take a look at this thread over at TVersity forum http://forums.tversity.com/viewtopic.php?t=1865&postdays=0&postorder=asc&start=0

Please read end of thread as this is more relevant with regard to profiles.xml settings in TVersity when using mplayer.

Please do bare in mind I have been testing so thoughts ideas and collection of information may be a bit hap hazard at this stage.

Luna
2006-09-06, 18:52
When trying the new deb version I cannot seem to get the same performance with the mplayer.conf setup as I can with the following script I was using


/usr/bin/mplayer /media/mmc1/Video/$1 -fs -vo x11 -ao gst -ac dspmp3



vo=x11
ac=dspmp3
ao=gst
framedrop=yes
afm=dspmp3
noslices=true
monitorpixelaspect=1
fs=yes
cache=300
font=/usr/share/fonts/SwaRR4nh.ttf
subfont-text-scale=3


It seems to ignore the gst also and uses esd unless I specify in the command line. Same goes with x11.

So what am I doing wrong?

polyesterangst
2006-09-06, 18:56
Thanks MikeL,

I will check that out to get a better understanding. But this may be a dumb question, how did you toggle from full screen to mplayer in the header?

I do wish to do the Hamachi concept you are working with, as I saw on another forum, that you able to stream from TVersity through Hamachi using mplayer, but not through Media Streamer, yet. I will keep my fingers crossed for that when they at TVersity do their update.

So with Hamachi running in the background, in theory, then Media Streamer should be working with TVersity over a secure network. I might need to bug you on the hamachi setup when I get some time to put that together on the N770.

Cheers

MikeL
2006-09-06, 19:38
I do wish to do the Hamachi concept you are working with, as I saw on another forum, that you able to stream from TVersity through Hamachi using mplayer, but not through Media Streamer, yet. I will keep my fingers crossed for that when they at TVersity do their update.Yes but even when we get TVersity working we will not be able to stream pictures and Video to the Nokia 770 using Media Streamer until a new release of Media Streamer announces these features. (However Media Streamer already works as a controller passing them to my UPnP Philips SL300i connected to TV & Hi-Fi) We will need to use mplayer for the Videos and the Opera browser to view the pictures.
So with Hamachi running in the background, in theory, then Media Streamer should be working with TVersity over a secure network. I might need to bug you on the Hamachi set-up when I get some time to put that together on the N770.Yes that's about the size of it! Can you imagine having your PC in one country running TVersity and be in another country streaming all your media securely to either the Nokia 770 (A truly portable Wi-Fi device) or alternatively a UPnP Hardware player.

I am looking forward to the GUI Version of Hamachi for the Nokia 770 :)

polyesterangst
2006-09-06, 20:08
Can someone give me a summary list of commands for mplayer.

I am looking for any volume control or adjusting frame size. I ran a video off my mmc that I used an older version of mconvertor for N770 that works in the system video player fine, but was really quiet in mplayer, and was full screen and the screen toggle button by the power switch did not reduce the size.

Thanks,

elpaso
2006-09-07, 08:31
Hello,

I've just installed mplayer and it works with avi and mp3's, but I couldn't play any test WMV mms stream.

What am I doing wrong?

Where could I find a list of supported formats/streams?

this was my test command:

mplayer 'mms://media.fastweb.it/WM9/raiclick/FMVRAI04000001062556.wmv?idCnt=35094&path=RaiClickWeb^Home^Fiction^Poliziesco^IL+COMMIS SARIO+MONTALBANO#1'

Thanks!

bsterix
2006-09-07, 19:01
First, become root.

Then create a new file named /usr/bin/runmplayer

$ vi /usr/bin/runmplayer

Add these lines to it and save it:


#!/bin/sh

/usr/bin/mplayer -fs -framedrop -vo x11 -ao sdl -cache 800 "$1"


Make it globally executable.

$ chmod 0755 /usr/bin/runmplayer


Why do i have to become root to create runmplayer? Wouldnt it work, if i create the file in my home-directory?

What is the meaning of the second runmplayer in the line inserted in opera.ini?

floone
2006-09-07, 20:13
Hi,

I suppose asx streams are not supported? E.g. http://www.omroep.nl/live/radio1-breed.asx or http://www.omroep.nl/live/radio1-smal.asx

Cheers,

Floone

maba
2006-09-07, 22:34
Ok, so I'm now announcing MPGUI, a simple GUI frontend for MPlayer.

Read more about it here (http://www.barraza.se/index.php?page/MPGUI).

This of course requires you to have MPlayer installed (via the application manager).

Let me know if it works for you.

Also, Serge, I would be happy to contribute the source code of this program for inclusion in your project. Please contact me if you find this interesting. :)

=DC=
2006-09-08, 00:40
Nice work maba! Works perfectly. Now all we need is a way to launch it from the menu and we'er pretty much set. Thanks for making this.

maba
2006-09-08, 05:12
Nice work maba! Works perfectly. Now all we need is a way to launch it from the menu and we'er pretty much set. Thanks for making this.
Thanks, nice to hear.

Also, I have now made a .deb package which installs via the Application Manager and comes with a menu entry to launch it so there you go ;)

=DC=
2006-09-08, 05:49
Thanks, nice to hear.

Also, I have now made a .deb package which installs via the Application Manager and comes with a menu entry to launch it so there you go ;)
Wow, that was quick. Awesome! Thanks Mauricio. :)

faber
2006-09-08, 06:46
mplayer 'mms://media.fastweb.it/WM9/raiclick/FMVRAI04000001062556.wmv?idCnt=35094&path=RaiClickWeb^Home^Fiction^Poliziesco^IL+COMMIS SARIO+MONTALBANO#1'

Mplayer doesn't support WMV9, it can play up to v8.

maxilogan
2006-09-08, 07:11
I tried opening a .rm file (a Family Guy episode) but only could hear the sound.

I know that playing Real files on a PC needs some particular codecs; is there anything similar for mplayer on 770?
I tried with the standard player but, guess what? I get "Resolution not supported" :mad:

Ed_
2006-09-08, 08:36
Ok, so I'm now announcing MPGUI, a simple GUI frontend for MPlayer.

Read more about it here (http://www.barraza.se/index.php?page/MPGUI).

This of course requires you to have MPlayer installed (via the application manager).

Let me know if it works for you.

Also, Serge, I would be happy to contribute the source code of this program for inclusion in your project. Please contact me if you find this interesting. :)

Great work! Thank you.
It would be nice to look at the sources. We had discussion with Sergei about GUI concept recently and his opinion was that we need exactly what you've done - simple graphical file/stream chooser.
So, if you send us sources I'd try to integrate MPGUI into mplayer.
Just in case you've already done some work on this direction don't hesitate to send us (me or Sergey) patches.

Thank you.

MikeL
2006-09-08, 09:13
Wow, that was quick. Awesome! Thanks Mauricio. :)I second that, program is simple to use and operates from locally Stored/Filed and/or Streamed Media URL's.

Tweak
2006-09-09, 04:53
What media encoder settings are you guys using to encode video? I'm using the max video resolution and highest bit rate sound and I'm getting video that plays between 1 and 3 seconds out of sync with the sound track. Looking at the cpus usage it's near max.

TB303
2006-09-09, 09:01
Hi People,
I'm new to Linux, so please be kind if I ask totally noobish questions.

I'm trying to install StreamTuner on my 770 and it says I need to install Mplayer. I duly downloaded Mplayer and tried to install it - however, I recieve an error message that says:

Packages missing:
libncurses5 (>=5.4-1)

I believe I have the 2006 OS.

WHat does it mean? how do I get past it?
I tried "Auto-update" but it didn't find anything.

Please advise, thanks.

Serge
2006-09-09, 10:03
I'm trying to install StreamTuner on my 770 and it says I need to install Mplayer. I duly downloaded Mplayer and tried to install it - however, I recieve an error message that says:

Packages missing:
libncurses5 (>=5.4-1)

I believe I have the 2006 OS.

Please check exact version number of your OS to be sure (go to launch menu, select "tools" -> "control panel" -> "device" -> "about product"). For IT OS 2006 it should be '1.2006.26-8'. From a package reference list (http://repository.maemo.org/stable/mistral/maemo-packages--2.0.html) seems like libncurses should be preinstalled. Unless you managed to uninstall it or cripple in some other way, it should be available :)

Serge
2006-09-09, 10:11
What media encoder settings are you guys using to encode video? I'm using the max video resolution and highest bit rate sound and I'm getting video that plays between 1 and 3 seconds out of sync with the sound track. Looking at the cpus usage it's near max.
I believe it was explained many times in this thread already :) But you should use 320x240 (4:3), 400x224 (16:9) or 400x240 (15:9) video resolution for best playback. Bitrate should not exceed 400 with video codec mpeg4. It should play fine (with some frame dropped on scenes with lots of motion and panning, but that's not a big deal). Audio should be encoded to MP3, bitrate does not matter much here as it is decoded by DSP anyway. You can also try this encoder with 'mplayer' preset: http://www.internettablettalk.com/forums/showpost.php?p=20766&postcount=99

Serge
2006-09-09, 10:25
Mplayer doesn't support WMV9, it can play up to v8.
The latest development version of mplayer from SVN already has native WMV9 support. Once they make the next public release, it can be packaged for Nokia 770.

I tried opening a .rm file (a Family Guy episode) but only could hear the sound.

I know that playing Real files on a PC needs some particular codecs; is there anything similar for mplayer on 770?
I tried with the standard player but, guess what? I get "Resolution not supported" :mad:
It is unlikely for mplayer to support real files on Nokia 770. On PC mplayer is able to use closed source binary codec which is compiled for x86, it just will not work on arm.

I guess, information in .deb file description is somewhat misleading, does not quite apply to maemo port and should be edited (at least parts about win32 dll's and 3dfx).

Also unfortunately MPlayer on Nokia 770 has problems with AAC and AC3 audio (they are either buggy or unusable because of floating point math being too slow). We need to either find and use integer only decoders for them or use DSP based gstreamer decoder for AAC.

Serge
2006-09-09, 10:40
Ok, so I'm now announcing MPGUI, a simple GUI frontend for MPlayer.

Read more about it here (http://www.barraza.se/index.php?page/MPGUI).

This of course requires you to have MPlayer installed (via the application manager).

Let me know if it works for you.

Also, Serge, I would be happy to contribute the source code of this program for inclusion in your project. Please contact me if you find this interesting. :)
Sure it is interesting. As Eduard said already, we can integrate this GUI in MPlayer package. To do this we need the sources of it. A preferred form (but not strictly required) is a patch against maemo mplayer SVN (https://garage.maemo.org/scm/?group_id=54). You also can use garage trackers to submit your code.

Unfortunately I could not try this gui (your web page seems to be down at the moment), but considering other's comments, it can't be bad :)

It is good to see many people consolidating efforts in improving mplayer and video support for Nokia 770. Availablility of GUI will also give us a way to proper credit all the maemo port contributors (it can have a special tab for this). As for other GUI related things, it would be a good idea to be able to edit some configuration options (and save them to '/home/user/.mplayer/config'), some of the settings that I need to have configurable are subtitles code page and language for example.

Keep up the good work.

Serge
2006-09-09, 10:50
Rebooting didn't help. Turning swap off didn't help. Rebooting after turning off swap didn't help. It doesn't even get to the point of printing out something meaningful like in the other thread. All I get is
/ $ mplayer
Segmentation fault
I have no idea what could have happened. Do the other applications work normally? Is there a possibility that you may have crippled the system in one way or another ('apt-get upgrade' is dangerous according to some reports)?

In order to find why it crashes in your system, it is possible to build a debug version of mplayer and try to get a core dump for it.

dattani98
2006-09-09, 16:53
guys - have been tying to install mplayer for 2 days but the application manager tells me its broken. This is the extract from the log - help!!!! oh - I also get something similar when installing xterm.....

osso-application-installer 4.22, UI version 1
W: GPG error: http://catalogue.tableteer.nokia.com mistral Release: The following signatures were invalid: BADSIG CBFC2BECC6903E72 Nokia Internet Tablet Archive Automatic Signing Key <integration@maemo.org>
W: GPG error: http://catalogue.tableteer.nokia.com mistral Release: The following signatures were invalid: BADSIG CBFC2BECC6903E72 Nokia Internet Tablet Archive Automatic Signing Key <integration@maemo.org>
W: GPG error: http://maemo-hackers.org mistral Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3A312B21B9E81572
-----
Installing mplayer 1.0pre8-maemo.4
apt-worker: not configuring unrelated package libncurses5
apt-worker: not configuring unrelated package libvte-common
apt-worker: not configuring unrelated package libvte4
apt-worker: not configuring unrelated package osso-xterm
/bin/sh: /usr/sbin/dpkg-preconfigure: not found
Selecting previously deselected package mplayer.
(Reading database ... 12203 files and directories currently installed.)
Unpacking mplayer (from .../mplayer_1.0pre8-maemo.4_armel.deb) ...
dpkg: dependency problems prevent configuration of mplayer:
mplayer depends on libncurses5 (>= 5.4-1); however:
Package libncurses5 is not configured yet.
dpkg: error processing mplayer (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mplayer
E: Sub-process /usr/bin/dpkg returned an error code (1)

TB303
2006-09-10, 09:49
Please check exact version number of your OS to be sure (go to launch menu, select "tools" -> "control panel" -> "device" -> "about product"). For IT OS 2006 it should be '1.2006.26-8'. From a package reference list (http://repository.maemo.org/stable/mistral/maemo-packages--2.0.html) seems like libncurses should be preinstalled. Unless you managed to uninstall it or cripple in some other way, it should be available :)

Well, I went to nokia's site and ran their upgrade wizard, it now says version 1.2006.26-8 - and Mplayer still won't install...

UPDATE: I now updated again, this time by downloading the .bin file myself - again no progress... ;-((

Any ideas?


thanks!

itkach
2006-09-10, 23:44
I have no idea what could have happened. Do the other applications work normally? Is there a possibility that you may have crippled the system in one way or another ('apt-get upgrade' is dangerous according to some reports)?

In order to find why it crashes in your system, it is possible to build a debug version of mplayer and try to get a core dump for it.
Few other applications I have installed work quite well. I have standard 2006 OS (version 1.2006.26-8) and just few apps like FBReader, X Terminal and Python runtime. Nothing unusual. Maybe I'll re-flash the OS when I have some time to see if it makes any difference for the mplayer.

itkach
2006-09-11, 02:55
Hmm... Checking for updates in Application Manager showed me there's an update for mplayer. After updating mplayer it works. Was earlier package corrupted? Before I tried to install mplayer both through Application Manager and direclty from downloaded .deb - both installed succesfully and both yielded "Segmentation Fault". Now it works. :confused:

Ed_
2006-09-11, 07:54
guys - have been tying to install mplayer for 2 days but the application manager tells me its broken. This is the extract from the log - help!!!! oh - I also get something similar when installing xterm.....

...

Installing mplayer 1.0pre8-maemo.4
apt-worker: not configuring unrelated package libncurses5
apt-worker: not configuring unrelated package libvte-common
apt-worker: not configuring unrelated package libvte4
apt-worker: not configuring unrelated package osso-xterm
/bin/sh: /usr/sbin/dpkg-preconfigure: not found
Selecting previously deselected package mplayer.
(Reading database ... 12203 files and directories currently installed.)
Unpacking mplayer (from .../mplayer_1.0pre8-maemo.4_armel.deb) ...
dpkg: dependency problems prevent configuration of mplayer:
mplayer depends on libncurses5 (>= 5.4-1); however:
Package libncurses5 is not configured yet.
dpkg: error processing mplayer (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mplayer
E: Sub-process /usr/bin/dpkg returned an error code (1)

It seems that you have some packages unconfigured on your device.
Could you show me the output of this command: 'dpkg --configure -a" please?
You should run it from root account.

You also can try to run 'apt-get update && apt-get -f install', but it can remove some packages, so please be careful and read apt messages properly.

maxilogan
2006-09-11, 08:25
It is unlikely for mplayer to support real files on Nokia 770. On PC mplayer is able to use closed source binary codec which is compiled for x86, it just will not work on arm.

I guess, information in .deb file description is somewhat misleading, does not quite apply to maemo port and should be edited (at least parts about win32 dll's and 3dfx).

Also unfortunately MPlayer on Nokia 770 has problems with AAC and AC3 audio (they are either buggy or unusable because of floating point math being too slow). We need to either find and use integer only decoders for them or use DSP based gstreamer decoder for AAC.

OK Serge, thanks for your answer; at least I have no doubt now about keeping working on it or not. Think I'll have to convert all the files to avi as I've done with South park :) quite a boring process but I wont't need to power up the laptop to see the episodes

elpaso
2006-09-11, 09:00
Mplayer doesn't support WMV9, it can play up to v8.

Sorry, but the same movie plays like a charme on my ubuntu.

Maybe you mean "Mplayer on nokia 770 doesn't support WMV9" ?

The command was:
mplayer 'mms://media.fastweb.it/WM9/raiclick/FMVRAI04000001062556.wmv?idCnt=35094&path=RaiClickWeb^Home^Fiction^Poliziesco^IL+COMMIS SARIO+MONTALBANO#1'

Serge
2006-09-11, 10:12
Sorry, but the same movie plays like a charme on my ubuntu.

Maybe you mean "Mplayer on nokia 770 doesn't support WMV9" ?
Any Mplayer up to version 1.0pre8 and including it does not natively support WMV9. It means that your ubuntu uses m$ binary codec for playing it. As these binary codecs only work on x86 platform, they can't be used on Nokia 770. Native WMV9 support was recently added in the latest development snapshots of Mplayer and you can have native WMV9 support if you take its sources from SVN (upstream MPlayer SVN, not maemo port). So the next MPlayer release is likely to have proper WMV9 support and it may be possible to use it on Nokia 770. I hope that explains everything.

If you really want WMV9 support right now, there are two options:
1. you can try to get the latest MPlayer SVN snapshot, apply maemo patches to it (available for download on garage mplayer page) and hope that it will compile and work
2. you can try to backport WMV9 changes to MPlayer 1.0pre8, provide a patch against maemo mplayer SVN and submit it to us

TB303
2006-09-11, 14:52
Well, I went to nokia's site and ran their upgrade wizard, it now says version 1.2006.26-8 - and Mplayer still won't install...

UPDATE: I now updated again, this time by downloading the .bin file myself - again no progress... ;-((

Any ideas?


thanks!

Any ideas?

I tried to install the latest OS again, yet still Mplayer gives me the same error message. Is there a way to do a complete format of the 770? Maybe try and install an OLDER version of Mplayer? If so where can I find one? thanks!!

bsterix
2006-09-11, 16:02
Most of the videos i play with mplayer are very slow (i.e. more a slideshow than a video). Without sound its a bit better, but some videos still hang.

What could be the reason?

Serge
2006-09-11, 16:22
2bsterix: A short answer: Nokia 770 hardware is not fast enough to play any random video you can feed to it. So for best performance with highest visual quality it needs to be transcoded anyway. But now properly transcoded video plays much better in MPlayer than the same video transcoded for use with the default video player and frame rate does not need to be halved (I find 15 fps video not very enjoyable).

Check these links:
http://www.internettablettalk.com/forums/showpost.php?p=21879&postcount=158
http://www.internettablettalk.com/forums/showpost.php?p=21553&postcount=128

I think it is time to prepare some FAQ or we will get flooded with the same questions.

PS. There is still a lot of potential for performance optimizations, but don't expect any miracles.

Serge
2006-09-11, 16:44
Any ideas?

I tried to install the latest OS again, yet still Mplayer gives me the same error message. Is there a way to do a complete format of the 770? Maybe try and install an OLDER version of Mplayer? If so where can I find one? thanks!!
Please use MPlayer garage page (https://garage.maemo.org/projects/mplayer/) to submit bugreport or support request with the detailed description of what you did and what you have seen in the process, we'll try to help you. This forum thread is just getting too long and unmanageable.

As for older versions of MPlayer builds for maemo, they were not packaged for application manager. And considering that you are not very familiar with linux in general, it would be hard for you to try them and just even more questions can arise.

dattani98
2006-09-11, 16:55
[QUOTE=Ed_]It seems that you have some packages unconfigured on your device.
Could you show me the output of this command: 'dpkg --configure -a" please?
You should run it from root account.

hi ed - ran the abv command and got this output

/home/user # dpkg --configure -a
Setting up libncurses5 (5.5-1) ...

Setting up libvte-common (0.12.1-1mh9) ...
Setting up libvte4 (0.12.1-1mh9) ...

Setting up osso-xterm (0.13.mh13) ...

ran the application mgr and now it works!!!! You guys are great. Thanks for your help all.

dattani98
2006-09-11, 17:20
does anyone have maba's MPGUI file hosted somewhere? Maba - your link is down so cant acces the file

ta

Serge
2006-09-12, 08:51
Tried the new .deb package. It installed fine, but all I get when I try to run mplayer in xterm is "Segmentation fault" message. Any ideas why this happens?
If any of you are having strange crashes and buggy behaviour, please also have a look at this thread: http://www.internettablettalk.com/forums/showthread.php?t=3040

MPlayer has quite a big code size ~5MB, so theoretically crash on start may be caused by it being loaded to a faulty region memory.

TB303
2006-09-12, 10:03
Please use MPlayer garage page (https://garage.maemo.org/projects/mplayer/) to submit bugreport or support request with the detailed description of what you did and what you have seen in the process, we'll try to help you. This forum thread is just getting too long and unmanageable.

As for older versions of MPlayer builds for maemo, they were not packaged for application manager. And considering that you are not very familiar with linux in general, it would be hard for you to try them and just even more questions can arise.

OK, done!

thanks mate.

nokkiaa
2006-09-15, 18:05
Hello,(sorry for my english, im a swiss boy ;) can anyone help me to show youtube videos without slow video? I try tihs code always: mplayer -ao gst -vo sdl /home/user/MyDocs/get_video.flv
This code plays video and sound. But the video is slower than sound. Can anyone help me?

Serge
2006-09-15, 18:24
2nokkiaa: Don't use '-vo sdl' option, it is slow. Also '-ao gst' is not needed as it is already used by default. The only option you may want to use in some cases is '-vo x11' when playing video with non-optimal resolution (it will disable scaling, but will work faster). By the way, if you find youtube video clips that have playback problems (even after adding '-vo x11'), please report links to them here.

Patnet
2006-09-15, 22:52
Hello, thanks for the latest 4 Beta. I'm running into missing codecs on a WMV file. Can you guys advise how to tell if my file is WMV9 and therefore not supported? I'm creating the file from a Slingbox stream recorded by Applian Replay A/V/At Large Recorder formerly called Slingcorder.

Ricardo1
2006-09-19, 11:05
I am a nebie to the Linux world but loving the Nokia 770, I wish to install mplayer but am having a little difficulty, I am trying to find instructions and if there are any additional software that I need.

In addition is there a gui for this app or will I need to run it via the command line? Any help would be much appreciated

Sorry foor the silly questions

Serge
2006-09-19, 11:10
2Ricardo1: There is GUI for mplayer already. It was committed to SVN last weekend. The only thing left to do is to make a .deb package. Stay tuned :)

Ricardo1
2006-09-19, 12:49
Cool, any idea of timescale also still looking for advice on install :)

Ricardo1
2006-09-19, 13:50
I have found an earlier post and am in the process of trying to install M-Player using the instructions found on page 2 or 3, are they still valid?

Serge
2006-09-19, 14:33
I have found an earlier post and am in the process of trying to install M-Player using the instructions found on page 2 or 3, are they still valid?
Unlikely. Just install MPlayer from .deb package using application manager. After that you will be able to run it from xterm (also make sure to install xterm before mplayer) by typing 'mplayer some_video_file.avi'. If you find it too difficult, please wait for a few days until the next version gets released.

Ricardo1
2006-09-19, 15:37
Cool, thanks

Ricardo1
2006-09-19, 19:57
My inexperience hinders me, I will talk to some of the system support and developers at work.

BusyBox v1.01 (Debian 3:1.01-4.osso10) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

/ $ mmpmplayer some_video_file.avi
sh: mmpmplayer: not found
/ $
/ $ mplayer some_video_file.avi
MPlayer 1.0pre8-maemo.4 (C) 2000-2006 MPlayer Team
CPU: ARM

Creating config file: /home/user/.mplayer/config

/usr/share/fonts/SwaRR4nh.ttf doesn't look like a font description, ignoring.
Cannot load font: /usr/share/fonts/SwaRR4nh.ttf

Playing some_video_file.avi.
File not found: 'some_video_file.avi'
Failed to open some_video_file.avi.


Exiting... (End of file)
/ $ mplayer some_video_file.avi
MPlayer 1.0pre8-maemo.4 (C) 2000-2006 MPlayer Team
CPU: ARM


/usr/share/fonts/SwaRR4nh.ttf doesn't look like a font description, ignoring.
Cannot load font: /usr/share/fonts/SwaRR4nh.ttf

Playing some_video_file.avi.
File not found: 'some_video_file.avi'
Failed to open some_video_file.avi.


Exiting... (End of file)
/ $ mplayer Stargate.Atlantis.S03E01.WS.DSR.XviD-DIMENSION.avi
MPlayer 1.0pre8-maemo.4 (C) 2000-2006 MPlayer Team
CPU: ARM


/usr/share/fonts/SwaRR4nh.ttf doesn't look like a font description, ignoring.
Cannot load font: /usr/share/fonts/SwaRR4nh.ttf

Playing Stargate.Atlantis.S03E01.WS.DSR.XviD-DIMENSION.avi.
File not found: 'Stargate.Atlantis.S03E01.WS.DSR.XviD-DIMENSION.avi'
Failed to open Stargate.Atlantis.S03E01.WS.DSR.XviD-DIMENSION.avi.


Exiting... (End of file)
/ $

Serge
2006-09-20, 06:12
A new build of mplayer with the first experimantal GUI frontend is now available for download from the garage project page: https://garage.maemo.org/projects/mplayer/

Please consider this as a beta release, test it and report any bugs or installation issues, your feedback is really appreciated.

=DC=
2006-09-20, 12:10
Nice. This UI is a good improvement over Mauricio's solution, but it could still use a little polish [do we really need to see the full path of videos?]. I had some problems with one of my mp4 videos going "double speed" and one going "half speed". I don't know if this is a know issue, but since those are the only two in that format, it's really not a problem for me. The flv files from Google Video and YouTube play fine, and all my avi files play just fine as well. Thanks for all your hard work again Serge.

Oh, by the way, what's the report button for? It didn't appear to do anything when I tapped it. [I hope I didn't remotely launch an underground missile somewhere in the world.]

=DC=
2006-09-20, 14:21
I just noticed if you leave the GMPlauncher open for longer than ~30 seconds it closes automatically. Is it suposed to do that? Also, is there any way you could get the launcher to detect mp3 files as well? Thanks.

Serge
2006-09-20, 15:58
Nice. This UI is a good improvement over Mauricio's solution, but it could still use a little polish [do we really need to see the full path of videos?].
Yes, it still needs some polishing, so suggestions are welcome. Do full paths really annoy you (other people)? As least they provide precise information about the location of each file.

I had some problems with one of my mp4 videos going "double speed" and one going "half speed". I don't know if this is a know issue, but since those are the only two in that format, it's really not a problem for me.
Well there are many different formats and codecs, each one of them can potentially contain bugs. Please try these files with mplayer 1.0pre8 on your desktop computer (it can be downloaded here: http://www.mplayerhq.hu). If you see the same speed problems, we need to check if it is not fixed in SVN yet and report them to upstream mplayer maintainers. If the problems are in maemo build, I would like to see at least mplayer log for them and probably download the files themselves for my test collection. But please submit this information as a bugreport at garage trackers: https://garage.maemo.org/projects/mplayer/

The flv files from Google Video and YouTube play fine, and all my avi files play just fine as well.
That's good to know. If you notice any problems with youtube videos, please provide this information too.

Thanks for all your hard work again Serge.
Actually I'm not the only one who took part in porting and improving mplayer for maemo. Ed Bartosh created deb packages and Josep Torra optimized mpeg1 decoder for Nokia 770. Not to mention numerous upstream developers of mplayer and ffmpeg :) I think we still really need a proper credits tab in mplayer gui.

Oh, by the way, what's the report button for? It didn't appear to do anything when I tapped it. [I hope I didn't remotely launch an underground missile somewhere in the world.]
It just displays mplayer output for the last played video with the detailed information and performance statistics. If you press it just after start, it does not have anything to show yet.

I just noticed if you leave the GMPlauncher open for longer than ~30 seconds it closes automatically. Is it suposed to do that?
It is not supposed to do that. That's the first bug you have noticed, congratulations :) In order to workaround it, you can start 'gmplauncher' from xterm and it should work fine.

A bugfix package will follow really soon after we make sure there are no other critical bugs. Did anyone test installation of mplayer package on a fresh OS2006 device? Does it work ok?

Also, is there any way you could get the launcher to detect mp3 files as well? Thanks.
Technically - yes, it is not hard. But maybe just using audio player for mp3 files is better?

Anyway, I tried to design gui so that you need as little stylus tapping as possible to start playing some video from your MMC card. No need to prepare playlists, just put a bunch of your video files on MMC card and you can start watching them right away. I borrowed this design from FBReader which also autodetects e-books in 'Books' subdirectory on MMC card automatically.

Ricardo1
2006-09-21, 17:28
Great app, installed the Beta and everything is fine, the only quibble I have is with regards to fast forward and rewind which can require a lot of key presses, especially if the last place you watched the file was in the middle or near the end of a film. A progress bar would be great so that you could drag the timeline to wherever you wanted.

Serge
2006-09-21, 20:37
Bugfix release is available, GUI should be stable now, everyone is encouraged to upgrade.

mike9285
2006-09-21, 23:23
I can't start the gmplauncher from the apps menu. Loads fine from xterm.

=DC=
2006-09-22, 00:23
It works for me, but it still closes after 30 seconds when not doing anything with it. I'm going to see if it has anything to do with the settings for the automatic shutdown of the screen. Everything else is cool. I guess having the full path of videos is fine. In fact, I kind of wish the built-in player had something like this. Maybe with an option to view small icons of each like the image viewer does.

Hedgecore
2006-09-22, 14:21
Excellent, a lot more responsive than the built in media player, and I see less artifacts on the screen.

I do have one small request though. I realize everything is in it's infancy, but could functionality be added to type in a path/filename to open? Or just a path and have it scan for media files in the destination like it does for the RSMMC card? (A full blown file browser would be a lot to ask for at this point) :)

I only have a 512mb card and don't have much on there... but what I'd like to do is hit my CIFS mountpoint (I haven't tried mounting any shares onto a directory residing on the RSMMC card).

Otherwise great work, this weekend I'll experiment with other media types and see how playback goes.

Nickster
2006-09-22, 15:10
I only have a 512mb card and don't have much on there... but what I'd like to do is hit my CIFS mountpoint (I haven't tried mounting any shares onto a directory residing on the RSMMC card).
I use HTTP and a slightly modified opera.ini file (details in this thread somewhere). Just run a webserver on the machine hosting the files, set it to display directory listings, and once you've clicked on the relevant filename hyperlink, you're watching the movie in a few seconds :)

Nickster
2006-09-22, 15:11
BTW - is installation of the new version just simple "install the .deb and magic happens", or do I need to do something else? I think I'm two or three releases out of date.

syam
2006-09-22, 15:45
MPGUI is no more required.

Serge
2006-09-22, 16:05
MPGUI is no more required.
Yes, that was a dead branch. Unfortunately its author did not publish the sources so we had to make a new gui from scratch. On the other hand he emphasized the necessity of gui so also helped to improve mplayer in some way :)

The next step in providing a complete video support solution for Nokia 770 is to ensure the availability of a good and user friendly media convertor capable of producing files optimized for mplayer.

MikeL
2006-09-22, 16:51
An opera browser "open with" option for Mplayer would be nice feature now http://www.internettablettalk.com/forums/showthread.php?t=3010

Not much progress on this front unfortunately?

Hedgecore
2006-09-22, 19:14
That was it for me; I'm comfortable around the commandline, but I wanted to wait until a GUI was added. Working around computers for 10 hours a day and I really don't feel like doing anything I don't have to by the time I get home :)

Mind you, I'm also really patient about things (refer to the above). This project is awesome.

Ed_
2006-09-22, 20:26
I do have one small request though. I realize everything is in it's infancy, but could functionality be added to type in a path/filename to open? Or just a path and have it scan for media files in the destination like it does for the RSMMC card? (A full blown file browser would be a lot to ask for at this point) :)

Did you try to type anything in the input field? I think it should work already.
File chooser is on it's way. Commited to the svn yesterday.


I only have a 512mb card and don't have much on there... but what I'd like to do is hit my CIFS mountpoint (I haven't tried mounting any shares onto a directory residing on the RSMMC card).
It will work if you mount your CIFS share into /media/mmc1, you even don't need to have mmc card at all :)

Ed_
2006-09-22, 20:34
It works for me, but it still closes after 30 seconds when not doing anything with it. I'm going to see if it has anything to do with the settings for the automatic shutdown of the screen.
It's not related to shutdown settings, it's a bug in the code. Application just gets killed by dbus after about 30 sec. I hope we'll fix it in a couple of days.

As a workaround you can manually remove "X-Osso-Service=MPlayer" line from /usr/share/applications/hildon/mplayer.desktop and reboot device. It should help.

Hedgecore
2006-09-23, 15:09
... input fiel - - *checks*

Man. I should be shot. Didn't even notice it.

Nightmare
2006-09-23, 15:23
This video - downloaded as flv - lock up the nokia 770 if you try to view it:
http://www.youtube.com/watch?v=7Uv45y6vkcQ

Serge
2006-09-24, 14:09
This video - downloaded as flv - lock up the nokia 770 if you try to view it:
http://www.youtube.com/watch?v=7Uv45y6vkcQ
Thanks, I have downloaded it and added to my test collection. The problem with locking up seems to be related to DSP based audio decoding, when you run mplayer from console with -nosound option, it plays ok. And if you use -ac ffmp3 for mp3 decoding, it also does not lock up. Anyway, video and audio get out of sync pretty fast, seems like there are some problems with framedropping (it does not work) for flv files. It is an interesting file and I'll try to see what can be done to fix these issues.

Serge
2006-09-25, 20:33
A new release is available. It contains final GUI bugfixes, 'file open' button in GUI, OSD menu support with some options

Tweak
2006-09-25, 22:29
How can I remap the keys to adjust the audio delay? I have a video that plays fine on the built in player but is always about a 1 second off using mplayer. I have some other vids that play fine. If this feature can be added to the new menu system, it would be great.

I'm not sure if if could be the cause but the soundtrack is recorded in 48000Hz as opposed to 44100Hz my other video clips use.

Rocketman
2006-09-25, 22:57
It would be great to have easy checkbox access to all those cryptic command line parameters like whether to attempt DSP playback of audio, video rendering modes, etc.

Another thing I would like to see is a better means to skip around within a file. The current forward/back key method using the 5 way hat is far from ideal, particularly when trying to watch movies over multiple sessions. It would be nice to have some sort of timestamp bookmark system or some way to skip to a specified timestamp. Perhaps even just an "open file from last position" feature would do.

Great work so far!

davman
2006-09-26, 11:54
I just got hold of mplayer today, and the first video I attempted to play was an NSV file. Audio works great, but unfortunately, no video playback :(

Requested video codec family [vp6] (vfm=vfwex) not available.
Enable it at compilation.
Cannot find codec matching selected -vo and video format 0x32365056


I understand from reading the rest of this topic that this is probably due to the lack of codecs that will run on an ARM processor?

Are there any plans for VP6 implementation in the future? VP6 on NSV scales well across the Internet, and should be playable on the 770's hardware.

(I'm involved in a Internet TV station similar to ESS.TV, so getting NSV to work on my 770 would be fantastic!)

Thanks for your great work so far!

Patnet
2006-09-26, 18:52
Is there a list of files mplayer will play as it stands? I just get audio on wmv files, same as I did in the command line version.

Nightmare
2006-09-27, 11:17
Another Youtube video that does not work:
http://www.youtube.com/watch?v=1AQX1HUHK50

Maybe 320x240 flv videos with long playtime do not work at all (with sound)?

gigabites
2006-09-27, 11:46
has anyone gotten the mplayer GUI to work? I get the "loading" dialog box and then nothing.

Nightmare
2006-09-27, 12:18
has anyone gotten the mplayer GUI to work? I get the "loading" dialog box and then nothing.

For me it works fine.
Maybe you should try to start it over xterm with gmplauncher and see whats worng.
Or try to uninstall it and reinstall it.

lardman
2006-09-28, 16:54
This thread sure is getting long. I've just searched all through it to see whether the info I'm interested in is available, and I couldn't see it, my apologies if I've missed it.

I see that there was mention of performing the audio decoding using the ARM and the video decoding using the DSP, but that this was excluded because of the picky nature of the video DSP plugins. My question is basically the following: how would the audio and video ideally be split (assuming someone puts the effort in to write the DSP video decoders, etc.)?

I presume that the DSP is not running at 100% just decoding the audio, and that video decoding would almost certainly cause it to run at a higher load, and I also assume that the speed increase in using the DSP rather than the ARM to decode the video is greater than using the DSP rather than the ARM to decode the audio (I hope that makes sense). I may be wrong about this..? This does assume that either the DSP or ARM carries out all of the processing for either the audio/video, though splitting the larger of the two tasks between the two parts of the chip may be another option. It also assumes that both the DSP and ARM have equal memory bandwidth to the display, and this may not be the case, and would therefore influence the choice of video decoding.

I'd be interested to see CPU/DSP load figures and hear other people's thoughts about this.

Cheers,


Si

Serge
2006-09-28, 18:38
2lardman: There was an idea about also using DSP for scaling (video controller does not have scaling support), there was also an attempt to do this http://www.mail-archive.com/maemo-developers@maemo.org/msg05345.html
Considering all this, seems like C55x DSP programming is a very hard task (without proper tools, documentation and examples), as it is a very unusual cpu. So I don't feel like doing any DSP programming in the near future, it seems to be more efficient to use what is already provided on the device (like MP3 decoding using DSP) and apparently developed by the people who are proficient with this. The default video plays performs scaling in some way, so probably the code for it exists. It would be best if Nokia could provide some high level API for using colorspace conversion and scaling: http://www.mail-archive.com/maemo-developers@maemo.org/msg04511.html

On the other hand, ARM core also has some enhanced DSP instructions and is supposed to be suitable for multimedia: http://arm.com/pdfs/DVI0035B_926_PO.pdf
Moreover, optimization of video decoding to use these armv5te instructions has been already started and there are some results already (in upstream ffmpeg SVN, one of the ffmpeg developers got Nokia 770 too :)). The next build of mplayer for nokia 770 will also use these optimizations.

Serge
2006-09-28, 18:49
To everyone asking about what codecs are supported and what are not. I'm not an upstream MPlayer developer and I don't know everything :) MPlayer is now built in default configuration, some codecs may be not compiled in, some may be buggy. I even did not hear about some of these codecs at all and do not have video samples to test if they work with MPlayer. My personal priority right now is to ensure that MPlayer is good at playing converted video with full fps and high quality. Once this milestone is reached (and we are very close to it), I may switch to some other tasks like ensuring more different and exotic codecs support or attempt at getting some nonconverted video played more or less acceptable. Anyway, as it is written in my signature, feel free to join :) If you are interested in some codec support, feel free to investigate how to enable it, fix any bugs it may have on arm architecture and submit a patch. Adding more developers to a project is always welcome.

smackpotato
2006-09-29, 00:41
2serge mp3 decoding is not handled by the system on chip dsp but by a specialized codec dsp. this can be confermed by running
cat /sys/devices/platform/dsp/loadinfo
this leave 70% of the dsp for othr tasks such as scaling.. dspfbsink handles scaling i guess through the on chip dsp. I will try to make a driver for this. but since i am starting with next to no knowladge im sure it will take me to the end of jjanuary. january is also when ill have some free time.
thankyou

Serge
2006-10-02, 11:09
2serge mp3 decoding is not handled by the system on chip dsp but by a specialized codec dsp. this can be confermed by running
cat /sys/devices/platform/dsp/loadinfo
this leave 70% of the dsp for othr tasks such as scaling.. dspfbsink handles scaling i guess through the on chip dsp. I will try to make a driver for this.
I don't know how dspfbsink manages scaling and if it is any good, that's essentially a black box as all the other closed source plugins on Nokia 770. After, dealing with audio decoding using gstreamer sinks, I would prefer to stay away from it for a while :)

As for scaling using DSP chip, seems like it should be possible in spite of the previous unsuccessful attempt. I got some docs in .pdf's descriping Nokia 770 DSP core (C55x), and looks like it can be actually good for scaling. Here is the description of additional extensions that seem to be supported by OMAP1710 DSP core: http://focus.ti.com/lit/ug/spru098/spru098.pdf
Check "Pixel interpolation Hardware Extension" part :)

There are also lots of references to other docs, they are quite interesting to read.

And in general, DSP does not seem so bad from looking its presentation and benchmark results: http://www.omimo.be/magazine/01q2/2001q2_p034.pdf

but since i am starting with next to no knowladge im sure it will take me to the end of jjanuary. january is also when ill have some free time.
thankyou
Well, it is good to know, but I hope that all the most important mplayer porting work will be finished by that time already :) Anyway if things will not proceed as good as expected, your help will be welcome in January :)

Serge
2006-10-02, 11:18
By the way, a new build of MPlayer was released today. As promised, it contains some video decoding performance improvements for mpeg4 (up to 10% faster at about 1000kbps video files, this effect is smaller for lower bitrates). Also some video decoding artefacts are now gone as a side effect of replacing old buggy idct code. Most of the work for this optimization was done by Mans Rullgard, and some minor improvements were added by me :)

Tweak
2006-10-04, 01:58
Success!
Added the following in .mplayer/input.conf so I can now adjust the sound delay in video that were unwatchable because of playing audio out of sync. I discovered there are a ton of other keymappings you can do too.

UP audio_delay 0.100
DOWN audio_delay -0.100

Serge
2006-10-04, 04:13
Success!
Added the following in .mplayer/input.conf so I can now adjust the sound delay in video that were unwatchable because of playing audio out of sync. I discovered there are a ton of other keymappings you can do too.

UP audio_delay 0.100
DOWN audio_delay -0.100
Sure you can do that, always refer original mplayer documentation, it can use tons of configuration options :)

But it would be much better if you provided some additional information about such videos because such behavious is not normal for sure. If you have more than one such file (your report implies that), try to find out what was common in all of them. Maybe it is better to get full mplayer log and submit a bugreport at garage trackers with this information. Thanks.

Nickster
2006-10-04, 09:27
Success!
Added the following in .mplayer/input.conf so I can now adjust the sound delay in video that were unwatchable because of playing audio out of sync. I discovered there are a ton of other keymappings you can do too.

UP audio_delay 0.100
DOWN audio_delay -0.100
A very useful discovery indeed - I didn't know that mplayer (any version) could do that. And the annoying thing is: such a feature makes an enormous amount of sense. This bit of info will be very useful to me as I use mplayer to play my video collection over HTTP, and it *appears* that the sound sync problems get worse when viewing videos that way.

Serge
2006-10-08, 23:40
Initial version of webpage is now created: http://mplayer.garage.maemo.org/

Please check it for spelling/grammar errors. Also if you have any suggestions about what information can be added there, feel free to propose them here. It is a good idea to have some comprehensive information so that anyone can start using MPlayer for watching video easily and avoid encountering any issues :)

Nickster
2006-10-10, 10:01
You'll probably want to add a bit about Opera integration.

Serge
2006-10-11, 11:20
2Nikster: The most easy way to add this information is to checkout 'www' subdirectory from maemo mplayer SVN, add all the necessary information to 'index.html' and submit a patch. Webpage will be updated in no time :) I used nvu (http://www.nvu.com/) to edit webpage, it seems to be quite convenient for this task.

By the way, did you consider trying to make some .deb package which could add opera integration for mplayer so that it would be much easier for end users?

MikeL
2006-10-11, 12:42
By the way, did you consider trying to make some .deb package which could add opera integration for mplayer so that it would be much easier for end users?Please bear in mind that I imagine normal users, will no not want a complete switch from built in video player to Mplayer for all video streams (i.e. RealMedia AV uses built in player)

Serge
2006-10-11, 12:55
Please bear in mind that I imagine normal users, will no not want a complete switch from built in video player to Mplayer for all video streams (i.e. RealMedia AV uses built in player)
http://www.internettablettalk.com/forums/showpost.php?p=19972&postcount=94
"I would prefer a plain .deb for mplayer only (nonintrusive and guaranteed not to break user's system) and another one for opera and probably file manager integration"

Additional package with a name something like 'mplayer-opera-integration.deb' which has 'mplayer' in its dependencies would be useful for those who really want it.

I would even prefer a separate .deb package for GUI, but expected some silly questions like 'I installed mplayer package but don't see it anywhere in my system', or 'why do I need to install 2 packages just for a single video player?' :) So everything is now bundled in a single package right now.

Drewvt
2006-10-24, 16:48
Success!
Added the following in .mplayer/input.conf so I can now adjust the sound delay in video that were unwatchable because of playing audio out of sync. I discovered there are a ton of other keymappings you can do too.

UP audio_delay 0.100
DOWN audio_delay -0.100

I also have this issue, where half of my videos - converted with Kottori's Media Converter - are slightly out of sync, the sound being a fraction of a second ahead of the video. It's too bad because the video quality is terrific.

I assume that if you edit the configuration file like that, you have to re-edit it all the time (depending on whether the video is out of sync and by how much). Bit of a hassle; obviously I concur with the suggestion to make it a feature inside MPlayer...

Tweak
2006-10-25, 01:21
You only need to edit the file once so you can get access to the audio offset functions. The way I have it set up/down increases/decreases the audio delay by 0.1 secs instead of the default forward/reverse.

Presently, the tv series I converted need +0.5 to sync, so I click up 5 times once the file loads and starts playing.


I also have this issue, where half of my videos - converted with Kottori's Media Converter - are slightly out of sync, the sound being a fraction of a second ahead of the video. It's too bad because the video quality is terrific.

I assume that if you edit the configuration file like that, you have to re-edit it all the time (depending on whether the video is out of sync and by how much). Bit of a hassle; obviously I concur with the suggestion to make it a feature inside MPlayer...

konttori
2006-10-25, 16:13
Just to let all of you guys know, I've updatede media converter today.

Download links and stuff in the blogpost here:
http://konttoristhoughts.blogspot.com/2006/10/media-converter-12-beta-released.html

Drewvt
2006-10-26, 16:54
You only need to edit the file once so you can get access to the audio offset functions. The way I have it set up/down increases/decreases the audio delay by 0.1 secs instead of the default forward/reverse.

Presently, the tv series I converted need +0.5 to sync, so I click up 5 times once the file loads and starts playing.

Ah, of course. I get it now.

Stupid question: where is the Mplayer directory? I'm root, I'm in Xterm, but I can't seem to find it anywhere...

username49
2006-10-27, 01:08
how do i install xterminal and all of the directions because i can't install mplayer into my nokia 770. Do i need the 2006OS version to install it. but can anybody tell me the directions i need to make a successful install.

aflegg
2006-10-27, 07:47
Make sure you're running the 2006 OS release.
Add the repository to the Application Manager as described in the ApplicationCatalog (http://maemo.org/maemowiki/ApplicationCatalog2006)
Select "MPlayer" from the "Install new application" application


HTH,

Andrew

Drewvt
2006-10-27, 09:18
Never mind re: the directory, i've got the mplayer keys mapped out. Aces, now that the sound can be made to sync.

cybe
2006-11-02, 14:54
Have not read all 24 pages of this thread, but from some reading here and experimenting it seems to me as though the following plays very well:

mplayer -ac dspmp3 -ao gst -vo x11 filename

Is this the best configuration to use with mplayer?

smackpotato
2006-11-02, 15:15
that is more ore less the default. i've had good success streaming mpeg2 from vlc with wget http://bla.bla -O - |mplayer -cache 4000 -noframedrop -

cybe
2006-11-02, 15:50
>that is more ore less the default.

Doesn't appear to be for me. Without tweaking the settings it's rather choppy. Took a while to find the dspmp3 setting for me. And I have a rather new(est?) mplayer that has the nice GTK frontend...



EDIT: There was a mplayer config file in /home/user/.mplayer/config with vo=sdl etc... probably put there by an older mplayer installation because I don't recall putting it there.

grau
2006-11-07, 12:51
OK, since I'm a newbie on linux, I might be missing something here...

I opened the config file in the .mplayer directory (with midnightcommander) and added the lines

UP audio_delay 0.100
DOWN audio_delay -0.100

Then, I launch Mplayer, I get the list of videos available but nothing happens when I try to play them.

Any idea anyone ?

Serge
2006-11-07, 12:58
grau:
Most likely MPlayer terminates because of the error in the config file. You can try to press 'Report' button to see detailed information about the last video playback attempt. If you recall a post from Tweak (http://www.internettablettalk.com/forums/showpost.php?p=23389&postcount=222), these lines should be added to input.conf file, but not to config. Hope this helps.

ioan
2006-11-07, 17:32
Hi all,
every time I try to run MPlayer, I have that small box with "MPlayer loading..." for few seconds and then nothing happens. Uninstall/Install does not help.
Any ideas?

TIA
-ioan

Serge
2006-11-07, 17:55
Hi all,
every time I try to run MPlayer, I have that small box with "MPlayer loading..." for few seconds and then nothing happens. Uninstall/Install does not help.
Any ideas?

Try to run 'gmplauncher' from XTerminal instead of using menu and report what happens, it can provide some useful error messages in console.

Also you may want to try rebooting the device, it sounds dumb but this method already helped in some cases :) I nothing helps, please provide some additional information such as your IT2006 version, some information about your mmc card (its size, filesystem type, general directories layout), as mplayer gui scans mmc card for video files, it may have some problems on your device at this step. Also it is interesting whether you are using swap or not. With more details it will be easier to figure out what happens and make MPlayer work on your device.

ioan
2006-11-07, 18:39
Try to run 'gmplauncher' from XTerminal instead of using menu and report what happens, it can provide some useful error messages in console.

~ $ gmplauncher
/usr/share/themes/theme4-14pt/gtk-2.0/gtkrc:5853: Unable to locate image file in pixmap_path: "../images/qgn_plat_volume_bar_horizontal_regular_mute_button _disa bled_pressed.png"
/usr/share/themes/theme4-14pt/gtk-2.0/gtkrc:5855: "Background" image options spe cified without filename
/usr/share/themes/theme4-14pt/gtk-2.0/gtkrc:5867: Unable to locate image file in pixmap_path: "../images/qgn_plat_volume_bar_horizontal_regular_mute_button _disa bled_pressed.png"
/usr/share/themes/theme4-14pt/gtk-2.0/gtkrc:5869: "Background" image options spe cified without filename
/usr/share/themes/theme4-14pt/gtk-2.0/gtkrc:6048: Unable to locate image file in pixmap_path: "../images/qgn_plat_volume_bar_vertical_regular_mute_button_d isabl ed_pressed.png"
/usr/share/themes/theme4-14pt/gtk-2.0/gtkrc:6050: "Background" image options spe cified without filename
/usr/share/themes/theme4-14pt/gtk-2.0/gtkrc:6062: Unable to locate image file in pixmap_path: "../images/qgn_plat_volume_bar_vertical_regular_mute_button_d isabl ed_pressed.png"
/usr/share/themes/theme4-14pt/gtk-2.0/gtkrc:6064: "Background" image options spe cified without filename

so I suppose is because I use the 14pt theme...

Also you may want to try rebooting the device, it sounds dumb but this method already helped in some cases :) I nothing helps, please provide some additional information

Of course I rebooted, still nothing. I have a 2GB mmc, formated in fat32, I have a 24MB swap file... I don't have any video files on my mmc yet, I just wanted to run it to see the application and then maybe convert some videos.

Now one more question, do the MPlayer works with the xm online satellite radio broadcast? I think they broadcast in wma format, and the mime is video/x-ms-asf.

Thanks
-ioan

ioan
2006-11-07, 19:11
so I suppose is because I use the 14pt theme...


actually I think is the memory card (and/or swap file). If I take out the memory card, the MPlayer starts right away, if the card is in... nothing happens if I try to run the application.
I have the memory card almost full with maps for maemo-mapper, over 200k of map tiles... maybe the MPlayer is searching for videos on the mmc and just take time (lots of time) until starts? If this is the case, can you disable the option to search for video files?

Thanks
-ioan

grau
2006-11-07, 20:02
grau:
Most likely MPlayer terminates because of the error in the config file. You can try to press 'Report' button to see detailed information about the last video playback attempt. If you recall a post from Tweak (http://www.internettablettalk.com/forums/showpost.php?p=23389&postcount=222), these lines should be added to input.conf file, but not to config. Hope this helps.

hum... thanks for the answer, but I didn't find any other file. Besides, this oone had "Place here the codes you want to apply" (or something close) so I figured out that was it.

I'll keep looking, but thanks already fot your answer.

Tweak
2006-11-08, 02:46
I don't recall input.conf being created by default, so you will probably need to make it yourself. For more options check the full documention on the mplayer (http://www.mplayerhq.hu/) site.

hum... thanks for the answer, but I didn't find any other file. Besides, this oone had "Place here the codes you want to apply" (or something close) so I figured out that was it.

I'll keep looking, but thanks already fot your answer.

Serge
2006-11-08, 11:57
actually I think is the memory card (and/or swap file). If I take out the memory card, the MPlayer starts right away, if the card is in... nothing happens if I try to run the application.
I have the memory card almost full with maps for maemo-mapper, over 200k of map tiles... maybe the MPlayer is searching for videos on the mmc and just take time (lots of time) until starts? If this is the case, can you disable the option to search for video files?

Yes, most likely. Scanning all these files can take quite a lot of time, I have only about several hundreds of files on MMC card, so GUI starts with almost no delay. Disabling automatic scanning for files can reduce usability as you will have to perform many extra operations just to open video files to start watching them. The goal of this GUI was simplicity, but looks like it fails when there are too many files. Maybe we can either restrict scanning for video files in some subdirectory on MMC card such as 'Videos'? One more option is to have some limit on MMC card scanning (limit either time or the number of files before giving up). Anyway comments about how to resolve such issue are welcome.

Now one more question, do the MPlayer works with the xm online satellite radio broadcast? I think they broadcast in wma format, and the mime is video/x-ms-asf.
Don't know, it is better ot try it :) You can run mplayer from XTerminal by providing url in its command line.

By the way, I'm going to upgrade maemo mplayer package to upstream version 1.0rc1 on this weekend, it should have better flv and wmv support and also support some new other formats.

neiljerram
2006-11-08, 13:12
Maybe we can either restrict scanning for video files in some subdirectory on MMC card such as 'Videos'?

It would be good to provide a general directory-to-scan config option. As well as solving this start up time problem, it would also allow people (including me) to specify a directory on a different MMC partition.

- Neil

ioan
2006-11-08, 17:22
Maybe we can either restrict scanning for video files in some subdirectory on MMC card such as 'Videos'?

you got my vote, scanning just in one dir (and all subdirs) on the mmc is the best idea.

Thanks,
-ioan