Hello,
I have Sony Ericsson k800i and I want to encode some videos to watch on it. Here are its supported codecs:
Code:
# MP3, WMA, RealAudio 8 and AAC/AAC+/eAAC+ audio
# MP4, 3GP and RealVideo 8 video
I want to use mencoder.
Here I have a video 253can-low.avi which is 320x240, so I won't had to care of resizing for now.
I tried following:
Code:
/usr/local/bin/mencoder 253can-low.avi -o out.mp4 -ovc x264 -oac mp3lame
(I have another mplayer and mencoder installed in /usr/bin, but they are compiled at time I did not had x264 installed)
And I get the following:
Code:
MEncoder 1.0rc2-3.4.6 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (Family: 15, Model: 4, Stepping: 1)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
WARNING: OUTPUT FILE FORMAT IS _AVI_. See -of help.
success: format: 0 data: 0x0 - 0x20cb000
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO: [DX50] 320x240 24bpp 29.970 fps 299.9 kbps (36.6 kbyte/s)
[V] filefmt:3 fourcc:0x30355844 size:320x240 fps:29.97 ftime:=0.0334
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 12000 Hz, 2 ch, s16le, 16.0 kbit/4.17% (ratio: 2000->48000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
MP3 audio selected.
VDec: vo config request - 320 x 240 (preferred colorspace: Planar YV12)
VDec: using Planar I420 as output csp (no 1)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
x264 [error]: no ratecontrol method specified
x264_encoder_open failed.
FATAL: Cannot initialize video driver.
Exiting...
I'm not sure if there must be added additional options for x264? Or I'm completely wrong about x264 and I don't need it?
What is the simpliest way to encode video for that phone?
Update: I tried using lavc:
Code:
mencoder 253can-low.avi -o out.mp4 -ovc lavc -lavcopts vcodec=mpeg4 -oac mp3lame
But the output file size is way too big: input file of 33MB became output file 85MB. I don't think this is correct, becouse it pushes the bitrate from
Code:
VIDEO: [DX50] 320x240 24bpp 29.970 fps 299.9 kbps (36.6 kbyte/s)
To:
Code:
VIDEO: [FMP4] 320x240 24bpp 29.970 fps 812.7 kbps (99.2 kbyte/s)
Update2: I managed to limit the bitrate at 384Kbps as suggested and the filesize was 35MB, but once I upload that clip to the phone it won't play it. It doesn't have 'view' option nor preview - I think something is wrong with the mencoder settings.