[MPlayer-users] Video encoding for SVCD with mplayer and mpeg2enc

romildo at uber.com.br romildo at uber.com.br
Sun Jan 4 16:12:16 CET 2004


Hello.

I want to convert an AVI movie to NTSC SVCD using mplayer,
mpeg2enc, mplex and vcdimager. I am needing help in
the video encoding steps.

Basically the steps for encoding the video are:

- Add black borders at the top and at the bottom of
  the video frame, in order to bring the image to
  a 4:3 aspect ratio.
- Resize (scale) the video frame to 480x480 and set
  the aspect ratio to 4:3.
- Convert the video stream to YUV4MPEG format. 
- Encode the video stream to MPEG2.

I am having difficult in accomplishing the frame scale
step with mplayer. Up to now I have used mplayer for
the black borders and for the YUV4MPEG conversion
steps. For scaling I have used yuvscaler, and for
the MPEG2 encoding, I have used mpeg2enc.

This solution does works, but it is too slow when
compared to a solution which uses transcode for
all the steps above, except MPEG2 encoding.

So I would like to have mplayer doing the
scale, eliminating the need for yuvscale. But
I am having difficult on doing that.

For a 672x272 movie, I am trying:

$ mkfifo -m 660 stream.yuv
$ mplayer -noframedrop -vo yuv4mpeg -nosound -v \
    movie.avi -vf expand=:504,scale=480:480 -sws 2 -zoom &
$ mpeg2enc -v 0 -I 0 -s -f 5 -V 230 -S 800 -a 2 -F 1 -n n \
    -b 2500 -B 280 -q 6 -K tmpgenc -R 0 -E -8 -4 2 -2 1 \
    stream.yuv -o video.m2v &
$ wait

The frame size looks right in the resulting MPEG video
stream, but the image is completetly messed up. It has
become most green and does not stays still, but looks
like a TV signal out of sync.

Any tips?

Regards.

Romildo
-- 
Prof. José Romildo Malaquias        romildo at uber.com.br
Departamento de Computação       malaquias at iceb.ufop.br
Univ. Federal de Ouro Preto  http://uber.com.br/romildo




More information about the MPlayer-users mailing list