Category Archives: MPlayer

Mencoder DVD Rip | x264 | 4:3 cropped to 16:9

Info

Ripped from a DVD using mencoder under GNU/Linux Fedora 17. The original video track was PAL 4:3. A Clock was removed from the beginning of the video (17 Seconds were removed). Declarations for aspect ratio and framerate were made in case either were broken in the original. The reason for creating these files is to include them on my personal showreel which can be accessed from any part of the Internet (@ http://www.hadipiter.com/films/legacy-films.htm).

The below documents are very useful with regards this article on basic transcoding.

4:3 to 16:9

These video’s were ripped from the 2004 and 2005 AIB Graduation showreels. AIB practice was to shoot and edit in 4:3 and then, using black bars(!), crop the image to 16:9. This was due to:

  1. lack of understanding what “anamorphic widescreen” was
  2. possible lack of faith in the students (using anamorphic 16:9 feature of Super-16mm film) by the technical staff.
  3. Not all of the 16mm film cameras used by the AIB (between 2002 and 2005) were Super-16 capable.

It is quite clear that 16:9 is the more desirable presentation format for these works – Therefore, -vf cropdetect was used to determine how much of the image was black bars, and then calculations were carried out to determine the best crop to make so that the final video is as close to 16:9 as possible while maintaining that the width and height of the video remain multiples of 16.

Mencoder Code

mencoder -dvd-device /dev/sr0 dvd://1 -o /dev/null -aspect \
4:3 -vid 0 -aid 128 -fps 25 -ss 17 -srate 48000 -ovc x264 \
-x264encopts threads=auto:pass=1:bitrate=964:subq=6:\
partitions=all:8x8dct:me=umh:frameref=5:bframes=3:\
b_pyramid=normal:weight_b -vf crop=704:416:8:80,harddup \
-oac pcm -channels 2 -ofps 25 && mencoder -aspect 4:3 \
-dvd-device /dev/sr0 dvd://1 -o last-gdb.avi -vid 0 -aid \
128 -fps 25 -ss 17 -srate 48000 -ovc x264 -x264encopts \
threads=auto:pass=2:bitrate=964:subq=6:partitions=all:\
8x8dct:me=umh:frameref=5:bframes=3:b_pyramid=normal:\
weight_b -vf crop=704:416:8:80,harddup -oac pcm -channels \
2 -ofps 25

Notes

Please note that:

  • -oac copy produced unexpected results with regard transcoding the audio. -oac pcm was used as a workaround
  • -oac faac cannot be used with a standard installation of mplayer / mencoder on Fedora 17 (mencoder is compiled without faac support). In this respect, UbuntuStudio with the Medibuntu repository and Medibuntu version of mplayer / mencoder installed have yielded more pleasing results for internet distribution or for encoding a QuckTime compatible .MP4
  • The DVD’s from which these titles were ripped contained no encryption, therefor there was absolutely no need for an installation of libdvdcss.
  • Each video was originally 720×576 PAL 25fps. (this implies 720×576 => 768×576)