Log in

View Full Version : Problem with Xvid on cell phone


HoloJoe
13th November 2005, 00:09
Hello all!

I'm trying to convert some videos I have to MPEG-4 for use on my cell phone
(Motorola A780). The phone is capable of playing MPEG-4 content stored in
the mp4 container. I already succeded in converting videos with ffmpeg and
the play just fine! I used a resolution of 320x240 (resolution of the full screen
of the phone) and a bitrate of 300 kbps at 25 fps.
It's quite easy to convert videos to mp4 with ffmpeg but I don't like the quality.
Compared with Xvid quality is much worse. So I decided to try and convert
a test file with AviSynth --> VirtualDub --> Xvid and mux the resulting
AVI file with MP4Box to a mp4 conatiner. Audio was handled seperately (saved
to an uncompressed wav file with VirtualDub) and then converted to MPEG-4
AAC LC with Apple's ITunes (and muxed with MP4Box together with the AVI I
mentioned above). On my PC the resulting mp4 file plays just fine using
Quicktime Player 7. But on my phone the video freezes all the time (the sound
plays relatively well). I tested with smaller bitrates and several profiles like
Simple @ L3 and Simple @ L1 but with no success.
The question is why is it ? With ffmpeg there are no problems, even at higher
bitrates. As I have the same problem with DivX generated files, could it be
MP4Box ? I thought it handles all the AVI hacks well. Btw. I didn't use any
B-VOPs so there shouldn't be a problem anyway.
Is there any way I can output raw MPEG-4 stream using Xvid and some
other program (with a GUI) to circumvent the AVI container ?

I am really clueless right now as I have tested nearly all possible XVid options
but anytime without success.

Could anybody of you point me in the right direction ?

Any hints very much appreciated!


Thank you,

HoloJoe

CWR03
13th November 2005, 05:53
I ran across this thread (http://forum.doom9.org/showthread.php?t=101138&highlight=motorola) when I first received my phone - perhaps it has some tips that might be of use to you.

If you figure out a way to rotate the image 90 degrees, please let me know.

HoloJoe
13th November 2005, 15:37
Yes, I know that thread.
The author only tested with a very small resolution and bitrate.
Maybe it runs fine with these settings, but I don't want to go that low.
As I said, ffmpeg encodes with comparable bitrates/resolutions work just fine.
So either there's something wrong with MP4Box (incompatible with my phone)
or with the way Xvid and Divx produce MPEG-4 files. I don't think there's a bug
in both XVid and DivX, so probably my phone has some limitations I am not
aware of.

If you figure out a way to rotate the image 90 degrees, please let me know.

On my phone it's no problem. I only have to tap on the touchscreen during
playback and the video is shown fullscreen rotated by 90 degrees.
If your phone isn't capable of doing that, you can probably use AviSynth or
something similar to rotate the video before the encoding step.
I think that shouldn't be a problem, should it ?

TurnLeft (clip)
TurnRight (clip)

are your friends in AviSynth ;)

CWR03
14th November 2005, 00:15
I only have to tap on the touchscreen during
playback and the video is shown fullscreen rotated by 90 degrees.
Thanks, mine does too, which I discovered after I'd posted.

One reason I pointed to that thread was that he's using a resolution that matches the screen - in theory if the video's pixels line up with the screen's, a low-res file would look as good if not better than a higher-res one that (insert term here that means "doesn't line up and causes pixels to be spread across a non-matching display resolution").

Blue_MiSfit
17th November 2005, 05:00
Make sure you're not using ANY ASP features. This includes CQMs, B-vops, qpel, gmc, AQ, etc.

AFAIK none of these are compatible with cell's yet. I have an e815 that I use (XviD+nAAC)->MP4 frequently on. I get excellent results as long as I keep the resolution at 170x... or so, and the video bitrate below 200kbit.

Elias
29th November 2005, 14:47
I will be putting up a guide for this kind of procedure later.

dodone
23rd May 2006, 15:21
I have the same problem on a motorola v3x, it must depend on audio encoding or muxing :scared:

raeltheimperialaerosolkid
24th May 2006, 08:40
I don't know if it can help but I made some encode for my PocketPC (HP ipaq 1950). I used a simple avisynth script to resize the video to 320x240 then, through VDubmod, I encoded the video in XviD (Handheld profile) at fixed quantizer 3 (obviously single pass). I encoded separatly the audio to a standard .mp3 128kbps then muxed into a .avi . As player, I used TMCMP and everything worked smoothly. The average bitrate of the final file (an anime) was about 300kbps. This should work fine for you also...

dodone
24th May 2006, 21:41
I'm trying to do a 2-pass @280kbps, not using b-frames like in handheld profile, but i always get some interruptions during playback. I dont get them with no audio (i'm using aac 48k 22.050h muxed with yamb and mp4box). I've tried also to limit bitrate peaks changing profiles and I-P frames settings, but results are poor.

imcold
25th May 2006, 03:58
Is there any way I can output raw MPEG-4 stream using Xvid and some other program (with a GUI) to circumvent the AVI container ?


You should give xvid_encraw (http://forum.doom9.org/showthread.php?t=98469) a try. But I'm not sure if it will solve your problem. Did a significantly lower bitrate work?

raeltheimperialaerosolkid
25th May 2006, 08:26
I'm trying to do a 2-pass @280kbps, not using b-frames like in handheld profile, but i always get some interruptions during playback. I dont get them with no audio (i'm using aac 48k 22.050h muxed with yamb and mp4box). I've tried also to limit bitrate peaks changing profiles and I-P frames settings, but results are poor.

Make a try with the .mp3 audio instead of the AAC.

bond
28th May 2006, 10:21
as alternative to mp4box you can also always try mp4creator (but only with not packed streams! and only with raw .m4v but no .avi input!)

Wam7
4th June 2006, 15:00
I get some excellent xvid encodes for my SE P910i. My settings are as follows;

Default Xvid 2 pass; No Qpel, No GMC, No B-frames (these add more to CPU strain) ~ 300 kbps (depending on aspect ratio)

Audio is done seperately using db poweramp and Lame mp3 Alt-preset-standard, 64kbps 22Khz

I use Smartmovie or TCPMP to play - TCPMP is slightly better but still in beta on Symbian UIQ so missing a lot of options like audio preload etc.