Log in

View Full Version : Give me recommendation for extreme compression


junglemike
19th December 2004, 06:54
HI folks, I'm encoding video for handhelds computer, (palm) of course i use Xvid since it gives me best quality/size.
In order to put full movid (100-120mins) to one 256mb card - i'm using pre-filtering

ConvertToYUY2()
undot()
FluxSmoothT()
Convolution3D (0, 3, 4, 3, 4, 2.8, 0)

This gives me very clear picture on low bitrates, like 200-250 kbits/sec. Video parameters are 480x255 or 480x272 @25fps, Audio is 48kb/44khz/mono or 24kb/22khz/mono
So far so good, But i'm now writing a new guide (on palm forum) and i want to find settings for endoing full movies on 128mb SD card.
I know it sould rediculous, but i still want to do it.
So question is:
What is your recommendations (Xvid settings/ filters/anything) to achieve acceptable quality on extremely low bitrates, like 80-120 kbits/sec? So full movie could be stored on one 128mb sd card?

Selur
19th December 2004, 09:06
Search precision 6, VHQ 4, vhq for b-frames, chroma motion, trellis qunatization and chroma optimizer shoudl be enabled since they do not change the bitstream chracteristic (need no special support during playback) and help the quality.

Though if you want that users with no palms on their own give you a recommendation about the main settings of xvid (like qpel&co) you might want to post which Xvid/Mpeg4 features are supported by a palm, what's the max resolution.

Cu Selur

Ps.: it might also be a nice thing to lower the framerate to 15fps, since one doesn't really see the difference if the display isn't that big. ;)

Blue_MiSfit
20th December 2004, 00:03
more denoising. Try PixieDust or Deen, they both can offer huge compressibility gains.

Make sure you are using a low bitrate matrix like h263 or hvs-good.

I also reccommend adaptive quant (assuming palm supports this).

DEFINATLEY convert it to 15/12fps, this literally halves the data you need to encode.

Audio - go with vorbis or HE-AAC at uber low bitrate like what you posted.

Good luck - let us know how it works :)

symonjfox
21st December 2004, 21:53
Hi, I have a similar problem, since I want to encode a movie to a 128 MMC card to play on my NGage phone.
I downloaded Smart Movie (a nice program for Series 60 phones) and it has a standalone encoder to create videos for those phones.
I analized the output file ... it's a normal AVI file, just resized to Nokia resolution. Some clips play well on it, other don't.
NGage phone doesn't support B Frames at all. When there's one, it freezes the image to next P frame or I frame.
Audio must be 22k mono mp3.

So I tried to play with custom matrices. I found that the Very Low Bitrate matrixes help a lot with compression. With a "small" screen as a phone (or a palm), artifacts are less noticeable, while the same file is unwatchable on a computer monitor.

The other settings I used are VHQ 4, Adaptive Quant, Trellis, and Motion Estimation 6 and Chroma motion.

I found that with those settings and a small resolution, the codec is NOT precise at finding scene changes (also using fixed quant 5), so it uses few I frames. I don't know if someone can improve it, or tweak the codec for very small videos.

With these settings I could reach the target.

PS: now the problem is the battery :(
PPS: a palm is more powerful than the Nokia Ngage (100 mhz processor). I just wanted to help you with your settings.

junglemike
21st December 2004, 22:14
Thank you guys very much.
I tried Vhq 4 , trellis, h263 matrix, and more de-noise filters -
Well, the result is noticable better, although i get only 3-4 fps speed on my poor celeron cpu (really need to upgrade :-). but speed deosn't matter for me.
HI symonjfox, i also tried a SmartMovie for palmos . But when i tried 25fps clip on my palm - i say that it plays only 1/2 of frames - i thought that this is because lack of speed optimization for palm - but if you say that SM doens't supprot b-frames - this maybe makes sence now to me. Since approx. half of frames in my clips are b-frames. So i'm using another programs called MMplayer - it has no trouble playing b-frames, and give me full frame rate. But in order to get really big clips to play smooth - like 480x272 - i need to overclock my palm to 532 or 600mhz (from original 400mhz)
But anyway, it's working great, these settings really help video to look "acceptable" at such small resolutions.

Razorblade2000
22nd December 2004, 22:50
I know that this is in the xvid forum, but on little advice:
If your Pocket PC has the necessary power, I would try real media if I was you :D

I got reall nice results with Real Video 8 and a bitrate of 125 kbit/s (Video AND audio) at a resolution of 160*X (I told him to double the resolution while playback so it would fit my VCD Resolution IPAQ 3660)

Chainmax
22nd December 2004, 23:42
Somewhat paraphrasing what Blue_MiSfit said, I think you could replace all the denoisers you use in there with a single GoldDust call. You don't mention what are you using for resizing, but I assume it's Lanczos, so I'd recommend you to try BilinearResize. As for custom matrices, EQM V3 ULR has fared pretty well in the ultra low bitrate test (http://forum.doom9.org/showthread.php?s=&threadid=84375&perpage=20&highlight=900kbps&pagenumber=4), so you probably should give it a shot. You can find it in Sharktooth's sig. I also think you might want to reduce the resolution. I know these are extreme case encodes, but a bits/pixel.frame of 0.063-0.078 is way too low, I don't think you should drop below 0.15 which would amount to a resolution of ~320x180 or ~368x208 given your fps and bitrate). About the audio, I was just about to ask what should be a suitable channels/frequency choice for bitrates below 96kbps.

Of course, keep in mind that it all depends on what you're encoding.

junglemike
23rd December 2004, 05:11
Chainmax, thanks, that was very helpful, i will try that GoldDust filter
and also EQM V3 ULR.
but I assume it's Lanczos, so I'd recommend you to try BilinearResize.
BilinearREsize() is what i'm using now :-)
I also think you might want to reduce the resolution.
That is also one of the options, but zoomed video doens't looks good (smooth) on palm screen (unlike pc monitor)
Audio i'm using is 48kb/44khz/mono or 32/22/m or 24/22/m or 16/11/m

I know that this is in the xvid forum, but on little advice:
If your Pocket PC has the necessary power, I would try real media if I was you

I got reall nice results with Real Video 8 and a bitrate of 125 kbit/s (Video AND audio) at a resolution of 160*X (I told him to double the resolution while playback so it would fit my VCD Resolution IPAQ 3660)
Xm ,yes, i know that pocket pc's are more advanced in this field, having many players , etc, But it is not a pocket pc, it is a PalmPilot (Tungsten T3 400mhz cpu, 480x320 screen) . So with PalmOS5 we have only 2 player that play mpeg-4 MMplayer and SmartMovie, notheing more, also notheing (that i heard of) which could player other formats like realvideo. But i not sure that rv would give better quality/size that Xvid, or maybe i'm wrong and foru super-low bitrates it is better. never have used RV so i don't know. But it seems i have no choise here since notheing can playe rv on palm os.
REsolutin of 160? ! - That's too low, you won't recognize the human faces :D

Razorblade2000
23rd December 2004, 08:20
Real Player for Palm: http://www.realnetworks.com/mobile/player/palm/

I was surprised about the 160*X Resolution myself, but it looks quite perfect on such a small VCD resolution display :D

(For you, it should be 240*X I guess :D)

junglemike
23rd December 2004, 15:20
I know real player - it is built-in into flash, but he plays only audio, as it is stated on their site
RealPlayer for Palm runs on the latest Palm-branded OS 5 devices with ARM processors. It supports the local playback of MP3 and RealAudio content from inserted SD memory cards. The RealPlayer for Palm currently supports the following Palm PDAs:

Razorblade2000
23rd December 2004, 15:31
oooops :P
well... then xvid is one of the best alternatives for you ^_^

Chainmax
24th December 2004, 00:35
Originally posted by junglemike
Chainmax, thanks, that was very helpful, i will try that GoldDust filter
BTW, GoldDust is a part of Dustv5. It needs YUY2 colorspace, MOD16 resolution and from what I read in a forum it replaces the last frame with the penultimate one. The correct way to call it in order to avoid the frame issue is this:

LoadPlugin("x:\wherever\LoadPluginEX2.dll")
LoadPlugin("x:\wherever\Dustv5.dll")
Load your source file here
ConvertToYUY2()
GoldDust(limit=5).trim(0,framecount-2)+trim(framecount-1,framecount-1)
ConvertToYV12()


You can download Dustv5 from here (www.avisynth.org/warpenterprises) and LoadPluginEX2 here (http://www.avisynth.org/LoadOldPlugins) (you'll need msvcr71.dll if you get loading errors, get it from here in Misc plugins question 22 (http://www.avisynth.org/Section+3%3A+Filters%2C+plugins+and+colorspaces#q3.5)).

P.S: it's possible that your player can't decode streams made with custom matrices, in that case stick to H.263 which is a pretty good matrix for compressibility anyway.