IRIX and Software

MP4 video.

Right, this is the second time I'm posting this as my first attempt was foiled by a new kitten! "Hey dad, what you typing on the interwebs, I can type too?!"

Anyway, I've download a teaser sample of a MP4 video file from here , but as soon as I play it back with mplayer I get garbled video, audio plays fine. I get video OK with the -vo gl or gl2 flags, but I end up with error messages about currupt frames, with serious frame drops.

Any ideas? I can covert the video with mencoder to a .mov, but at 2fps its a bit barking to convert the whole thing...

OR is my box just too slow to play the file?

-J
No SGI box currently...Snif!
JacquesT wrote: Anyway, I've download a teaser sample of a MP4 video file from here , but as soon as I play it back with mplayer I get garbled video, audio plays fine. I get video OK with the -vo gl or gl2 flags, but I end up with error messages about currupt frames, with serious frame drops.

the skewed display is a known problem with vo_sgi with many h.264 videos. You can work around it by using external colorspace conversion (-vf format=rgb24), which makes it essentially behave exactly like vo_gl2 on your VPro.

Any ideas? I can covert the video with mencoder to a .mov, but at 2fps its a bit barking to convert the whole thing...

OR is my box just too slow to play the file?

In short: yes :(

I tried it on my 600MHz Fuel and with disabled audio (i.e. without dropping frames) I get around 4fps (vs. 63fps on my laptop :( ) so as soon as you add audio it will drop just about everything. After converting it to Xvid4 the Fuel plays it without issues at around 50% CPU though, so your Octane should still do fine there.
schleusel wrote: In short: yes :(

I tried it on my 600MHz Fuel and with disabled audio (i.e. without dropping frames) I get around 4fps (vs. 63fps on my laptop :( ) so as soon as you add audio it will drop just about everything. After converting it to Xvid4 the Fuel plays it without issues at around 50% CPU though, so your Octane should still do fine there.


Oh piff! My 1Ghz Tibook plays it fine. Guess I'll have to get it set up next to me...Will try the Xvid4 conversion. Did you use 'mencoder'?

-J
No SGI box currently...Snif!
JacquesT wrote: Will try the Xvid4 conversion. Did you use 'mencoder'?

no, i was lazy and used avidemux and the original libxvidcore on Linux. Using mencoder or ffmpeg (libavcodec) should work just fine too though..
Just curious, how does one interpret the output from mplayer to find out the frame rate achieved? For the
speeder_teaser.mp4 movie, I get:

Code: Select all

MPlayer 1.0rc1- MIPSpro Compilers: Version 7.4.4m (C) 2000-2006 MPlayer Team
CPU: SGI MIPS

Playing speeder_teaser.mp4.
Cache fill:  5.18% (434176 bytes)
ISO: File Type Major Brand: ISO/IEC 14496-1 (MPEG-4 system) v2
Quicktime/MOV file format detected.
Warning! pts=1894000  length=1894023
Warning! pts=4165680  length=4168243
VIDEO:  [avc1]  1280x1040  24bpp  10.000 fps    0.0 kbps ( 0.0 kbyte/s)
Opening video filter: [format fmt=RGB24]
==========================================================================
Trying to force video codec driver family ffmpeg...
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Audio: no sound
Starting playback...
VDec: vo config request - 1280 x 1040 (preferred colorspace: Planar YV12)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.23:1 - prescaling to correct movie aspect.
SwScaler: using unscaled yuv420p -> rgb24 special converter
VO: [null] 1280x1040 => 1280x1040 RGB 24-bit
[h264 @ 1069dcb0]AVC: Consumed only 454 bytes instead of 459
V: 189.3 1894/1894 70% 19%  0.0% 0 0 0%

BENCHMARKs: VC: 132.943s VO:  36.990s A:   0.000s Sys:   1.198s =  171.131s
BENCHMARK%: VC: 77.6848% VO: 21.6152% A:  0.0000% Sys:  0.7000% = 100.0000%

Exiting... (End of file)


Does the output imply that ideally the movie should play at 10fps?

The command I used to play the file was:

Code: Select all

mplayer -vo gl2 -vf format=RGB24 -osdlevel 0 -benchmark -nosound -vo null speeder_teaser.mp4


Ian.
(07/Mar/2015) FREE! (collection only) 16x Sagitta 12-bay dual-channel U160 SCSI JBOD units.
Email, phone or PM for details, or see my forum post .
[email protected]
+44 (0)131 476 0796
mapesdhs wrote: Does the output imply that ideally the movie should play at 10fps?


yes. Given the material, 10fps is reasonable. Capturing more would probably slow down the creator's system and you're not missing much.

Just fyi a 1.5ghz pentium 4 plays the clip fine in VLC. maybe 35% cpu.
You eat Cadillacs; Lincolns too... Mercurys and Subarus.
So how does one interpret mplayer's benchmark results output? Couldn't find a ref in the man page.

Ian.
well, if you want something to compare it to:

Code: Select all

D:\mark\My Videos\MPlayer-1.0rc2>mplayer -vo g12 -vf format=RGB24 -osdlevel 0 -b
enchmark -nosound -vo null ..\speeder_teaser.mp4
MPlayer 1.0rc2-4.2.1 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 1500MHz (Family: 15, Model: 0, Stepping: 7)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.

Playing ..\speeder_teaser.mp4.
ISO: File Type Major Brand: ISO/IEC 14496-1 (MPEG-4 system) v2
Quicktime/MOV file format detected.
Warning! pts=1894000  length=1894023
[mov] Video stream found, -vid 0
Warning! pts=4165680  length=4168243
[mov] Audio stream found, -aid 1
VIDEO:  [avc1]  1280x1040  24bpp  10.000 fps    0.0 kbps ( 0.0 kbyte/s)
Opening video filter: [format fmt=RGB24]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Audio: no sound
Starting playback...
VDec: vo config request - 1280 x 1040 (preferred colorspace: Planar YV12)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.23:1 - prescaling to correct movie aspect.
[swscaler @ 00D4AEB0]No accelerated colorspace conversion found
[swscaler @ 00D4AEB0]SwScaler: using unscaled yuv420p -> rgb24 special converter

VO: [null] 1280x1040 => 1280x1040 RGB 24-bit
[h264 @ 00D4FB70]AVC: Consumed only 454 bytes instead of 459


BENCHMARKs: VC:  60.333s VO:  21.783s A:   0.000s Sys:   3.902s =   86.018s
BENCHMARK%: VC: 70.1400% VO: 25.3238% A:  0.0000% Sys:  4.5363% = 100.0000%

Exiting... (End of file)


Fullscreen playback:

Code: Select all

D:\mark\My Videos\MPlayer-1.0rc2>mplayer -fs -benchmark ..\speeder_teaser.mp4
MPlayer 1.0rc2-4.2.1 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 1500MHz (Family: 15, Model: 0, Stepping: 7)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.

Playing ..\speeder_teaser.mp4

...blahblahblah...


BENCHMARKs: VC:  57.930s VO:   6.909s A:   3.547s Sys: 120.436s =  188.822s
BENCHMARK%: VC: 30.6797% VO:  3.6590% A:  1.8785% Sys: 63.7828% = 100.0000%

Exiting... (End of file)



Just a wild guess, but here is my theory: in seconds and percentage, the VC is the time spent decoding the video, VO is the time spent (added:) outputting the video, A is the audio, and sys is other processes (I've got folding going in the background here as well as a bunch of other stuff)

With the -vo null option it will just decode as fast as possible and not worry about displaying (compare the SYS usage between the first and second tries)

you might try some tea leaf reading through google searches if nothing else.
You eat Cadillacs; Lincolns too... Mercurys and Subarus.
Is there somewhere it says how many frames are in the movie? Just wondering how people are calculating
their fps numbers from the output.

Ian.
mapesdhs wrote: Is there somewhere it says how many frames are in the movie? Just wondering how people are calculating their fps numbers from the output.


I'd bust out the hourglass and slide rule :) There's probably a switch to show it but bugger all if I can find it.
You eat Cadillacs; Lincolns too... Mercurys and Subarus.
mapesdhs wrote:

Code: Select all

V: 189.3 1894/1894 70% 19%  0.0% 0 0 0%


- current video position: 189.3 seconds
- 1894 of 1894 frames played
- 70% CPU usage for decode
- 19% CPU usage for display
- 0% CPU usage for audio playback
- 0 frames dropped
- no automatic post processing done
- 0% cache fill

if audio is enabled, even more information is shown. Here is the full list:
http://www.mplayerhq.hu/DOCS/HTML/en/faq.html#id2811815

The CPU usage for display with vo_null is because by adding -vf format=rgb24 you enforced colorspace conversion even without displaying anything.
If you really want to benchmark the codec only, skip that one.

These percentage scores are momentary values, the -benchmark output gives overall results instead:

Code: Select all

BENCHMARKs: VC: 132.943s VO:  36.990s A:   0.000s Sys:   1.198s =  171.131s
BENCHMARK%: VC: 77.6848% VO: 21.6152% A:  0.0000% Sys:  0.7000% = 100.0000%


- 132.943s for decode
- 36.990s for display
- 0.000s for audio playback
- 1.198s used by the OS
- 171.131s total

i.e. 1894 frames / 171 seconds = 11 fps for decoding and colorspace conversion but without video and audio playback.
The second line gives percentage scores of the same.

The command I used to play the file was:

Code: Select all

mplayer -vo gl2 -vf format=RGB24 -osdlevel 0 -benchmark -nosound -vo null speeder_teaser.mp4


The -vo gl2 is overridden by the -vo null, the -vf format=rgb24 enforces the extra colorspace conversion (with gl2 this shouldn't be needed anyway. I just mentioned it as a workaround for the display problem with vo_sgi mentioned above). For comparison, here are the numbers from my Fuel:

- decode only (-osdlevel 0 -benchmark -nosound -vo null):

Code: Select all

BENCHMARKs: VC: 193.406s VO:   0.041s A:   0.000s Sys:   0.989s =  194.435s
BENCHMARK%: VC: 99.4706% VO:  0.0210% A:  0.0000% Sys:  0.5084% = 100.0000%

= 9.7 fps. As you can see, without the -vf format=rgb24 filter, nearly no time is spent for VO.


- decode + colorspace conversion (added -vf format=rgb24, same as you did):

Code: Select all

BENCHMARKs: VC: 195.205s VO:  56.811s A:   0.000s Sys:   1.071s =  253.086s
BENCHMARK%: VC: 77.1297% VO: 22.4473% A:  0.0000% Sys:  0.4230% = 100.0000%

= 7.5 fps. So I assume you tested on a 700MHz machine? :)


- decode + gl2 display (-vo gl2 -osdlevel 0 -nosound -benchmark):

Code: Select all

BENCHMARKs: VC: 194.845s VO: 258.793s A:   0.000s Sys:   1.383s =  455.021s
BENCHMARK%: VC: 42.8210% VO: 56.8750% A:  0.0000% Sys:  0.3040% = 100.0000%

= 4.2 fps..


And the inevitable comparison.. decode only on a 1.8GHz Core2Duo (Linux):

Code: Select all

BENCHMARKs: VC:  17.044s VO:   0.007s A:   0.000s Sys:   0.290s =   17.341s
BENCHMARK%: VC: 98.2833% VO:  0.0417% A:  0.0000% Sys:  1.6750% = 100.0000%

= 109 fps :( H.264 is really not the stuff to feed the irix mplayer with..
The CPU usage for display with vo_null is because by adding -vf format=rgb24 you enforced colorspace conversion even without displaying anything.
If you really want to benchmark the codec only, skip that one.


ah ha! That's what I was suspecting at first but I couldn't figure why it would be using so much CPU doing nothing .
You eat Cadillacs; Lincolns too... Mercurys and Subarus.
It's encoded at 10fps. For a tutorial there is no point in going above 15fps.

Guess I'll stick to my now-ancient powerbook for H.264 playback...It manages...just!

Does anybody have a 1Ghz Tezro or 900Mhz Fuel to test this on?

-Jacques.
No SGI box currently...Snif!
Wow, my Core Duo laptop plays it with only 15% CPU (CoreAVC). To top it off, it''s so simple relatively that it's shocking that even a Fuel would struggle to decode it.
Originally Posted by Tommie
Please delete your post. It is an insult to all the hard work society has put into making you an intelligent being.

Like somebody at AMD said about a decade ago: Benchmarking is like sex. Everybody brags about it, everybody loves doing it and nobody can agree on performance.
ritchan wrote: it's shocking that even a Fuel would struggle to decode it.


The h264 path in mplayer isn't optimized for MIPS at all. dexter1 did a lot of great work optimizing mplayer's xvid path for MIPS, but at the time he did this h264 wasn't even part of the software.
Twitter: @neko_no_ko
IRIX Release 4.0.5 IP12 Version 06151813 System V
Copyright 1987-1992 Silicon Graphics, Inc.
All Rights Reserved.