Adjusted ipod/iphone MP4 encoding settings
authorAlan J. Pippin <ajp@pippins.net>
Thu, 21 May 2009 18:08:31 +0000 (12:08 -0600)
committerAlan J. Pippin <ajp@pippins.net>
Thu, 21 May 2009 18:08:31 +0000 (12:08 -0600)
rip_dvd

diff --git a/rip_dvd b/rip_dvd
index 905afdc183b67ed480c913b0cea660a1aa50530b..b11c77d7b60656e0a42c86d83223ac3e55aea916 100755 (executable)
--- a/rip_dvd
+++ b/rip_dvd
@@ -180,7 +180,7 @@ if [ "$aspect" != "" ]; then
   fi
   echo "$aspect" | grep -q ":"
   if [ $? != 0 ]; then
-    SCALE=",scale -zoom -xy $aspect"
+    SCALE=",scale -zoom -sws 9 -xy $aspect"
   else
     SCALE=",scale=$aspect"
   fi
@@ -848,9 +848,17 @@ function compress_vob_file {
     # MP4 encoding 
     found_profile=1
     if [ "$profile" == "iphone" ]; then
-      SCALE=",scale=480:320"
+      # SCALE: 480x320
+      # scale width to 480, set height appropriately, but keep a multiple of 16
+      #SCALE=",scale=480:-10"
+      # scale the video down however far is necessary to fit in 480x320
+      SCALE=",dsize=480:320:0,scale=-8:-8"
     else
-      SCALE=",scale=320:240"
+      # SCALE: 320x240
+      # scale width to 320, set height appropriately, but keep a multiple of 16
+      #SCALE=",scale=320:-10"
+      # scale the video down however far is necessary to fit in 320x240
+      SCALE=",dsize=320:240:0,scale=-8:-8"
     fi
     final_output_file="$dest/$dvdname.mp4"
     mencoder_general_opts="-quiet $lang_opts -passlogfile $passlogfile"
@@ -868,6 +876,8 @@ function compress_vob_file {
     video_encoder_opts[8]="trellis=1"
     video_encoder_opts[9]="level_idc=30"
     video_encoder_opts[10]="global_header"
+    video_encoder_opts[11]="bframes=0"
+    video_encoder_opts[12]="partitions=all"
     for OPTS in "${video_encoder_opts[@]}"; do 
       mencoder_video_encoder_opts="$mencoder_video_encoder_opts:$OPTS"
     done