]> granicus.if.org Git - handbrake/commitdiff
CLI: add default Auto Passthru settings to built-in presets.
authorRodeo <tdskywalker@gmail.com>
Mon, 4 Mar 2013 14:34:30 +0000 (14:34 +0000)
committerRodeo <tdskywalker@gmail.com>
Mon, 4 Mar 2013 14:34:30 +0000 (14:34 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5304 b64f7644-9d1e-0410-96f1-a4d463321fa5

test/test.c

index 96e71942a445bf038bec05e863921a1d75402e14..9431d7f41143dbe87c9b2a330578166fe59f87a2 100644 (file)
@@ -739,6 +739,20 @@ static int HandleEvents( hb_handle_t * h )
                     {
                         dynamic_range_compression = strdup("0.0,0.0");
                     }
+                    if( allowed_audio_copy == -1 )
+                    {
+                        allowed_audio_copy = 0;
+                        allowed_audio_copy |= HB_ACODEC_AAC_PASS;
+                        allowed_audio_copy |= HB_ACODEC_AC3_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_HD_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_PASS;
+                        allowed_audio_copy |= HB_ACODEC_MP3_PASS;
+                        allowed_audio_copy &= HB_ACODEC_PASS_MASK;
+                    }
+                    if( !acodec_fallback )
+                    {
+                        acodec_fallback = HB_ACODEC_AC3;
+                    }
                     maxWidth = 720;
                     maxHeight = 576;
                     if (x264_preset == NULL)
@@ -795,6 +809,20 @@ static int HandleEvents( hb_handle_t * h )
                     {
                         dynamic_range_compression = strdup("0.0");
                     }
+                    if( allowed_audio_copy == -1 )
+                    {
+                        allowed_audio_copy = 0;
+                        allowed_audio_copy |= HB_ACODEC_AAC_PASS;
+                        allowed_audio_copy |= HB_ACODEC_AC3_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_HD_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_PASS;
+                        allowed_audio_copy |= HB_ACODEC_MP3_PASS;
+                        allowed_audio_copy &= HB_ACODEC_PASS_MASK;
+                    }
+                    if( !acodec_fallback )
+                    {
+                        acodec_fallback = HB_ACODEC_AC3;
+                    }
                     maxWidth = 320;
                     maxHeight = 240;
                     if (x264_preset == NULL)
@@ -847,6 +875,20 @@ static int HandleEvents( hb_handle_t * h )
                     {
                         dynamic_range_compression = strdup("0.0");
                     }
+                    if( allowed_audio_copy == -1 )
+                    {
+                        allowed_audio_copy = 0;
+                        allowed_audio_copy |= HB_ACODEC_AAC_PASS;
+                        allowed_audio_copy |= HB_ACODEC_AC3_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_HD_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_PASS;
+                        allowed_audio_copy |= HB_ACODEC_MP3_PASS;
+                        allowed_audio_copy &= HB_ACODEC_PASS_MASK;
+                    }
+                    if( !acodec_fallback )
+                    {
+                        acodec_fallback = HB_ACODEC_AC3;
+                    }
                     maxWidth = 960;
                     maxHeight = 640;
                     if (x264_preset == NULL)
@@ -903,6 +945,20 @@ static int HandleEvents( hb_handle_t * h )
                     {
                         dynamic_range_compression = strdup("0.0");
                     }
+                    if( allowed_audio_copy == -1 )
+                    {
+                        allowed_audio_copy = 0;
+                        allowed_audio_copy |= HB_ACODEC_AAC_PASS;
+                        allowed_audio_copy |= HB_ACODEC_AC3_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_HD_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_PASS;
+                        allowed_audio_copy |= HB_ACODEC_MP3_PASS;
+                        allowed_audio_copy &= HB_ACODEC_PASS_MASK;
+                    }
+                    if( !acodec_fallback )
+                    {
+                        acodec_fallback = HB_ACODEC_AC3;
+                    }
                     maxWidth = 1280;
                     maxHeight = 720;
                     if (x264_preset == NULL)
@@ -959,6 +1015,20 @@ static int HandleEvents( hb_handle_t * h )
                     {
                         dynamic_range_compression = strdup("0.0,0.0");
                     }
+                    if( allowed_audio_copy == -1 )
+                    {
+                        allowed_audio_copy = 0;
+                        allowed_audio_copy |= HB_ACODEC_AAC_PASS;
+                        allowed_audio_copy |= HB_ACODEC_AC3_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_HD_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_PASS;
+                        allowed_audio_copy |= HB_ACODEC_MP3_PASS;
+                        allowed_audio_copy &= HB_ACODEC_PASS_MASK;
+                    }
+                    if( !acodec_fallback )
+                    {
+                        acodec_fallback = HB_ACODEC_AC3;
+                    }
                     maxWidth = 960;
                     maxHeight = 720;
                     if (x264_preset == NULL)
@@ -1019,6 +1089,20 @@ static int HandleEvents( hb_handle_t * h )
                     {
                         dynamic_range_compression = strdup("0.0,0.0");
                     }
+                    if( allowed_audio_copy == -1 )
+                    {
+                        allowed_audio_copy = 0;
+                        allowed_audio_copy |= HB_ACODEC_AAC_PASS;
+                        allowed_audio_copy |= HB_ACODEC_AC3_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_HD_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_PASS;
+                        allowed_audio_copy |= HB_ACODEC_MP3_PASS;
+                        allowed_audio_copy &= HB_ACODEC_PASS_MASK;
+                    }
+                    if( !acodec_fallback )
+                    {
+                        acodec_fallback = HB_ACODEC_AC3;
+                    }
                     maxWidth = 1280;
                     maxHeight = 720;
                     if (x264_preset == NULL)
@@ -1075,6 +1159,20 @@ static int HandleEvents( hb_handle_t * h )
                     {
                         dynamic_range_compression = strdup("0.0,0.0");
                     }
+                    if( allowed_audio_copy == -1 )
+                    {
+                        allowed_audio_copy = 0;
+                        allowed_audio_copy |= HB_ACODEC_AAC_PASS;
+                        allowed_audio_copy |= HB_ACODEC_AC3_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_HD_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_PASS;
+                        allowed_audio_copy |= HB_ACODEC_MP3_PASS;
+                        allowed_audio_copy &= HB_ACODEC_PASS_MASK;
+                    }
+                    if( !acodec_fallback )
+                    {
+                        acodec_fallback = HB_ACODEC_AC3;
+                    }
                     maxWidth = 1920;
                     maxHeight = 1080;
                     if (x264_preset == NULL)
@@ -1132,6 +1230,20 @@ static int HandleEvents( hb_handle_t * h )
                     {
                         dynamic_range_compression = strdup("0.0");
                     }
+                    if( allowed_audio_copy == -1 )
+                    {
+                        allowed_audio_copy = 0;
+                        allowed_audio_copy |= HB_ACODEC_AAC_PASS;
+                        allowed_audio_copy |= HB_ACODEC_AC3_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_HD_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_PASS;
+                        allowed_audio_copy |= HB_ACODEC_MP3_PASS;
+                        allowed_audio_copy &= HB_ACODEC_PASS_MASK;
+                    }
+                    if( !acodec_fallback )
+                    {
+                        acodec_fallback = HB_ACODEC_AC3;
+                    }
                     maxWidth = 720;
                     maxHeight = 576;
                     if (x264_preset == NULL)
@@ -1186,6 +1298,20 @@ static int HandleEvents( hb_handle_t * h )
                     {
                         dynamic_range_compression = strdup("0.0");
                     }
+                    if( allowed_audio_copy == -1 )
+                    {
+                        allowed_audio_copy = 0;
+                        allowed_audio_copy |= HB_ACODEC_AAC_PASS;
+                        allowed_audio_copy |= HB_ACODEC_AC3_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_HD_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_PASS;
+                        allowed_audio_copy |= HB_ACODEC_MP3_PASS;
+                        allowed_audio_copy &= HB_ACODEC_PASS_MASK;
+                    }
+                    if( !acodec_fallback )
+                    {
+                        acodec_fallback = HB_ACODEC_AC3;
+                    }
                     maxWidth = 1280;
                     maxHeight = 720;
                     if (x264_preset == NULL)
@@ -1238,6 +1364,20 @@ static int HandleEvents( hb_handle_t * h )
                     {
                         dynamic_range_compression = strdup("0.0");
                     }
+                    if( allowed_audio_copy == -1 )
+                    {
+                        allowed_audio_copy = 0;
+                        allowed_audio_copy |= HB_ACODEC_AAC_PASS;
+                        allowed_audio_copy |= HB_ACODEC_AC3_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_HD_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_PASS;
+                        allowed_audio_copy |= HB_ACODEC_MP3_PASS;
+                        allowed_audio_copy &= HB_ACODEC_PASS_MASK;
+                    }
+                    if( !acodec_fallback )
+                    {
+                        acodec_fallback = HB_ACODEC_AC3;
+                    }
                     if (x264_preset == NULL)
                     {
                         x264_preset = strdup("veryfast");
@@ -1290,6 +1430,20 @@ static int HandleEvents( hb_handle_t * h )
                     {
                         dynamic_range_compression = strdup("0.0,0.0");
                     }
+                    if( allowed_audio_copy == -1 )
+                    {
+                        allowed_audio_copy = 0;
+                        allowed_audio_copy |= HB_ACODEC_AAC_PASS;
+                        allowed_audio_copy |= HB_ACODEC_AC3_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_HD_PASS;
+                        allowed_audio_copy |= HB_ACODEC_DCA_PASS;
+                        allowed_audio_copy |= HB_ACODEC_MP3_PASS;
+                        allowed_audio_copy &= HB_ACODEC_PASS_MASK;
+                    }
+                    if( !acodec_fallback )
+                    {
+                        acodec_fallback = HB_ACODEC_AC3;
+                    }
                     if (x264_preset == NULL)
                     {
                         x264_preset = strdup("medium");
@@ -3171,19 +3325,19 @@ static void ShowPresets()
     fprintf( stderr, "%s - %s - %s\n", HB_PROJECT_TITLE, HB_PROJECT_BUILD_TITLE, HB_PROJECT_URL_WEBSITE );
 
     printf("\n< Devices\n");
-    printf("\n   + Universal:  -e x264  -q 20.0 -r 30 --pfr  -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -X 720 -Y 576 --loose-anamorphic --modulus 2 -m --x264-preset fast --h264-profile baseline --h264-level 3.0\n");
-    printf("\n   + iPod:  -e x264  -q 22.0 -r 30 --pfr  -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -I -X 320 -Y 240 --modulus 2 -m --x264-preset medium --h264-profile baseline --h264-level 1.3\n");
-    printf("\n   + iPhone & iPod touch:  -e x264  -q 22.0 -r 30 --pfr  -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -4 -X 960 -Y 640 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 3.1\n");
-    printf("\n   + iPad:  -e x264  -q 20.0 -r 30 --pfr  -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -4 -X 1280 -Y 720 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 3.1\n");
-    printf("\n   + AppleTV:  -e x264  -q 20.0 -r 30 --pfr  -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 960 -Y 720 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 3.1 -x qpmin=4:cabac=0:ref=2:b-pyramid=none:weightb=0:weightp=0:vbv-maxrate=9500:vbv-bufsize=9500\n");
-    printf("\n   + AppleTV 2:  -e x264  -q 20.0 -r 30 --pfr  -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 1280 -Y 720 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 3.1\n");
-    printf("\n   + AppleTV 3:  -e x264  -q 20.0 -r 30 --pfr  -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 1920 -Y 1080 --decomb=fast --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 4.0\n");
-    printf("\n   + Android:  -e x264  -q 22.0 -r 30 --pfr  -a 1 -E faac -B 128 -6 dpl2 -R Auto -D 0.0 -f mp4 -X 720 -Y 576 --loose-anamorphic --modulus 2 --x264-preset medium --h264-profile main --h264-level 3.0\n");
-    printf("\n   + Android Tablet:  -e x264  -q 22.0 -r 30 --pfr  -a 1 -E faac -B 128 -6 dpl2 -R Auto -D 0.0 -f mp4 -X 1280 -Y 720 --loose-anamorphic --modulus 2 --x264-preset medium --h264-profile main --h264-level 3.1\n");
+    printf("\n   + Universal:  -e x264  -q 20.0 -r 30 --pfr  -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -X 720 -Y 576 --loose-anamorphic --modulus 2 -m --x264-preset fast --h264-profile baseline --h264-level 3.0\n");
+    printf("\n   + iPod:  -e x264  -q 22.0 -r 30 --pfr  -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -I -X 320 -Y 240 --modulus 2 -m --x264-preset medium --h264-profile baseline --h264-level 1.3\n");
+    printf("\n   + iPhone & iPod touch:  -e x264  -q 22.0 -r 30 --pfr  -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -4 -X 960 -Y 640 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 3.1\n");
+    printf("\n   + iPad:  -e x264  -q 20.0 -r 30 --pfr  -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -4 -X 1280 -Y 720 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 3.1\n");
+    printf("\n   + AppleTV:  -e x264  -q 20.0 -r 30 --pfr  -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -4 -X 960 -Y 720 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 3.1 -x qpmin=4:cabac=0:ref=2:b-pyramid=none:weightb=0:weightp=0:vbv-maxrate=9500:vbv-bufsize=9500\n");
+    printf("\n   + AppleTV 2:  -e x264  -q 20.0 -r 30 --pfr  -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -4 -X 1280 -Y 720 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 3.1\n");
+    printf("\n   + AppleTV 3:  -e x264  -q 20.0 -r 30 --pfr  -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -4 -X 1920 -Y 1080 --decomb=fast --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 4.0\n");
+    printf("\n   + Android:  -e x264  -q 22.0 -r 30 --pfr  -a 1 -E faac -B 128 -6 dpl2 -R Auto -D 0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -X 720 -Y 576 --loose-anamorphic --modulus 2 --x264-preset medium --h264-profile main --h264-level 3.0\n");
+    printf("\n   + Android Tablet:  -e x264  -q 22.0 -r 30 --pfr  -a 1 -E faac -B 128 -6 dpl2 -R Auto -D 0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -X 1280 -Y 720 --loose-anamorphic --modulus 2 --x264-preset medium --h264-profile main --h264-level 3.1\n");
     printf("\n>\n");
     printf("\n< Regular\n");
-    printf("\n   + Normal:  -e x264  -q 20.0 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 --loose-anamorphic --modulus 2 -m --x264-preset veryfast --h264-profile main --h264-level 4.0\n");
-    printf("\n   + High Profile:  -e x264  -q 20.0 -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 --decomb --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 4.1\n");
+    printf("\n   + Normal:  -e x264  -q 20.0 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 --loose-anamorphic --modulus 2 -m --x264-preset veryfast --h264-profile main --h264-level 4.0\n");
+    printf("\n   + High Profile:  -e x264  -q 20.0 -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -4 --decomb --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 4.1\n");
     printf("\n>\n");
 }