githubのコードからのfolk
Revision | 4560ade3c833f282f02d15a9473e233488617df9 (tree) |
---|---|
Time | 2010-12-01 04:43:28 |
Author | sr55 <sr55@b64f...> |
Commiter | sr55 |
CLI: update the built in presets
git-svn-id: svn://localhost/HandBrake/trunk@3694 b64f7644-9d1e-0410-96f1-a4d463321fa5
@@ -611,476 +611,564 @@ static int HandleEvents( hb_handle_t * h ) | ||
611 | 611 | fprintf( stderr, "+ Using preset: %s", preset_name); |
612 | 612 | |
613 | 613 | if (!strcmp(preset_name, "Universal")) |
614 | - { | |
615 | - if( !mux ) | |
616 | - { | |
617 | - mux = HB_MUX_MP4; | |
618 | - } | |
619 | - vcodec = HB_VCODEC_X264; | |
620 | - job->vquality = 20.0; | |
621 | - if( !atracks ) | |
622 | - { | |
623 | - atracks = strdup("1,1"); | |
624 | - } | |
625 | - if( !acodecs ) | |
626 | - { | |
627 | - acodecs = strdup("faac,copy:ac3"); | |
628 | - } | |
629 | - if( !abitrates ) | |
630 | - { | |
631 | - abitrates = strdup("160,160"); | |
632 | - } | |
633 | - if( !mixdowns ) | |
634 | - { | |
635 | - mixdowns = strdup("dpl2,auto"); | |
636 | - } | |
637 | - if( !arates ) | |
638 | - { | |
639 | - arates = strdup("Auto,Auto"); | |
640 | - } | |
641 | - if( !dynamic_range_compression ) | |
642 | - { | |
643 | - dynamic_range_compression = strdup("0.0,0.0"); | |
644 | - } | |
645 | - maxWidth = 720; | |
646 | - if( !x264opts ) | |
647 | - { | |
648 | - x264opts = strdup("cabac=0:ref=2:me=umh:bframes=0:weightp=0:8x8dct=0:trellis=0:subme=6"); | |
649 | - } | |
650 | - if( !anamorphic_mode ) | |
651 | - { | |
652 | - anamorphic_mode = 2; | |
653 | - } | |
654 | - job->chapter_markers = 1; | |
655 | - | |
656 | - } | |
657 | - | |
658 | - if (!strcmp(preset_name, "iPod")) | |
659 | - { | |
660 | - if( !mux ) | |
661 | - { | |
662 | - mux = HB_MUX_MP4; | |
663 | - } | |
664 | - job->ipod_atom = 1; | |
665 | - vcodec = HB_VCODEC_X264; | |
666 | - job->vbitrate = 700; | |
667 | - if( !atracks ) | |
668 | - { | |
669 | - atracks = strdup("1"); | |
670 | - } | |
671 | - if( !acodecs ) | |
672 | - { | |
673 | - acodecs = strdup("faac"); | |
674 | - } | |
675 | - if( !abitrates ) | |
676 | - { | |
677 | - abitrates = strdup("160"); | |
678 | - } | |
679 | - if( !mixdowns ) | |
680 | - { | |
681 | - mixdowns = strdup("dpl2"); | |
682 | - } | |
683 | - if( !arates ) | |
684 | - { | |
685 | - arates = strdup("Auto"); | |
686 | - } | |
687 | - if( !dynamic_range_compression ) | |
688 | - { | |
689 | - dynamic_range_compression = strdup("0.0"); | |
690 | - } | |
691 | - maxWidth = 320; | |
692 | - if( !x264opts ) | |
693 | - { | |
694 | - x264opts = strdup("level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subme=6:8x8dct=0:trellis=0"); | |
695 | - } | |
696 | - job->chapter_markers = 1; | |
697 | - | |
698 | - } | |
699 | - | |
700 | - if (!strcmp(preset_name, "iPhone & iPod Touch")) | |
701 | - { | |
702 | - if( !mux ) | |
703 | - { | |
704 | - mux = HB_MUX_MP4; | |
705 | - } | |
706 | - vcodec = HB_VCODEC_X264; | |
707 | - job->vquality = 20.0; | |
708 | - if( !atracks ) | |
709 | - { | |
710 | - atracks = strdup("1"); | |
711 | - } | |
712 | - if( !acodecs ) | |
713 | - { | |
714 | - acodecs = strdup("faac"); | |
715 | - } | |
716 | - if( !abitrates ) | |
717 | - { | |
718 | - abitrates = strdup("128"); | |
719 | - } | |
720 | - if( !mixdowns ) | |
721 | - { | |
722 | - mixdowns = strdup("dpl2"); | |
723 | - } | |
724 | - if( !arates ) | |
725 | - { | |
726 | - arates = strdup("Auto"); | |
727 | - } | |
728 | - if( !dynamic_range_compression ) | |
729 | - { | |
730 | - dynamic_range_compression = strdup("0.0"); | |
731 | - } | |
732 | - maxWidth = 480; | |
733 | - if( !x264opts ) | |
734 | - { | |
735 | - x264opts = strdup("cabac=0:ref=2:me=umh:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0"); | |
736 | - } | |
737 | - job->chapter_markers = 1; | |
738 | - | |
739 | - } | |
740 | - | |
741 | - if (!strcmp(preset_name, "iPad")) | |
742 | - { | |
743 | - if( !mux ) | |
744 | - { | |
745 | - mux = HB_MUX_MP4; | |
746 | - } | |
747 | - job->largeFileSize = 1; | |
748 | - vcodec = HB_VCODEC_X264; | |
749 | - job->vquality = 20.0; | |
750 | - job->vrate_base = 900900; | |
751 | - job->cfr = 2; | |
752 | - if( !atracks ) | |
753 | - { | |
754 | - atracks = strdup("1"); | |
755 | - } | |
756 | - if( !acodecs ) | |
757 | - { | |
758 | - acodecs = strdup("faac"); | |
759 | - } | |
760 | - if( !abitrates ) | |
761 | - { | |
762 | - abitrates = strdup("160"); | |
763 | - } | |
764 | - if( !mixdowns ) | |
765 | - { | |
766 | - mixdowns = strdup("dpl2"); | |
767 | - } | |
768 | - if( !arates ) | |
769 | - { | |
770 | - arates = strdup("Auto"); | |
771 | - } | |
772 | - if( !dynamic_range_compression ) | |
773 | - { | |
774 | - dynamic_range_compression = strdup("0.0"); | |
775 | - } | |
776 | - maxWidth = 1024; | |
777 | - if( !anamorphic_mode ) | |
778 | - { | |
779 | - anamorphic_mode = 2; | |
780 | - } | |
781 | - job->chapter_markers = 1; | |
782 | - | |
783 | - } | |
784 | - | |
785 | - if (!strcmp(preset_name, "AppleTV")) | |
786 | - { | |
787 | - if( !mux ) | |
788 | - { | |
789 | - mux = HB_MUX_MP4; | |
790 | - } | |
791 | - job->largeFileSize = 1; | |
792 | - vcodec = HB_VCODEC_X264; | |
793 | - job->vquality = 20.0; | |
794 | - if( !atracks ) | |
795 | - { | |
796 | - atracks = strdup("1,1"); | |
797 | - } | |
798 | - if( !acodecs ) | |
799 | - { | |
800 | - acodecs = strdup("faac,copy:ac3"); | |
801 | - } | |
802 | - if( !abitrates ) | |
803 | - { | |
804 | - abitrates = strdup("160,160"); | |
805 | - } | |
806 | - if( !mixdowns ) | |
807 | - { | |
808 | - mixdowns = strdup("dpl2,auto"); | |
809 | - } | |
810 | - if( !arates ) | |
811 | - { | |
812 | - arates = strdup("Auto,Auto"); | |
813 | - } | |
814 | - if( !dynamic_range_compression ) | |
815 | - { | |
816 | - dynamic_range_compression = strdup("0.0,0.0"); | |
817 | - } | |
818 | - maxWidth = 960; | |
819 | - if( !x264opts ) | |
820 | - { | |
821 | - x264opts = strdup("cabac=0:ref=2:me=umh:b-pyramid=none:b-adapt=2:weightb=0:trellis=0:weightp=0:vbv-maxrate=9500:vbv-bufsize=9500"); | |
822 | - } | |
823 | - if( !anamorphic_mode ) | |
824 | - { | |
825 | - anamorphic_mode = 2; | |
826 | - } | |
827 | - job->chapter_markers = 1; | |
828 | - | |
829 | - } | |
830 | - | |
831 | - if (!strcmp(preset_name, "Normal")) | |
832 | - { | |
833 | - if( !mux ) | |
834 | - { | |
835 | - mux = HB_MUX_MP4; | |
836 | - } | |
837 | - vcodec = HB_VCODEC_X264; | |
838 | - job->vquality = 20.0; | |
839 | - if( !atracks ) | |
840 | - { | |
841 | - atracks = strdup("1"); | |
842 | - } | |
843 | - if( !acodecs ) | |
844 | - { | |
845 | - acodecs = strdup("faac"); | |
846 | - } | |
847 | - if( !abitrates ) | |
848 | - { | |
849 | - abitrates = strdup("160"); | |
850 | - } | |
851 | - if( !mixdowns ) | |
852 | - { | |
853 | - mixdowns = strdup("dpl2"); | |
854 | - } | |
855 | - if( !arates ) | |
856 | - { | |
857 | - arates = strdup("Auto"); | |
858 | - } | |
859 | - if( !dynamic_range_compression ) | |
860 | - { | |
861 | - dynamic_range_compression = strdup("0.0"); | |
862 | - } | |
863 | - if( !x264opts ) | |
864 | - { | |
865 | - x264opts = strdup("ref=2:bframes=2:subme=6:mixed-refs=0:weightb=0:8x8dct=0:trellis=0"); | |
866 | - } | |
867 | - if( !anamorphic_mode ) | |
868 | - { | |
869 | - anamorphic_mode = 1; | |
870 | - } | |
871 | - job->chapter_markers = 1; | |
872 | - | |
873 | - } | |
874 | - | |
875 | - if (!strcmp(preset_name, "High Profile")) | |
876 | - { | |
877 | - if( !mux ) | |
878 | - { | |
879 | - mux = HB_MUX_MP4; | |
880 | - } | |
881 | - vcodec = HB_VCODEC_X264; | |
882 | - job->vquality = 20.0; | |
883 | - if( !atracks ) | |
884 | - { | |
885 | - atracks = strdup("1,1"); | |
886 | - } | |
887 | - if( !acodecs ) | |
888 | - { | |
889 | - acodecs = strdup("faac,copy:ac3"); | |
890 | - } | |
891 | - if( !abitrates ) | |
892 | - { | |
893 | - abitrates = strdup("160,160"); | |
894 | - } | |
895 | - if( !mixdowns ) | |
896 | - { | |
897 | - mixdowns = strdup("dpl2,auto"); | |
898 | - } | |
899 | - if( !arates ) | |
900 | - { | |
901 | - arates = strdup("Auto,Auto"); | |
902 | - } | |
903 | - if( !dynamic_range_compression ) | |
904 | - { | |
905 | - dynamic_range_compression = strdup("0.0,0.0"); | |
906 | - } | |
907 | - if( !x264opts ) | |
908 | - { | |
909 | - x264opts = strdup("b-adapt=2:rc-lookahead=50"); | |
910 | - } | |
911 | - detelecine = 1; | |
912 | - decomb = 1; | |
913 | - if( !anamorphic_mode ) | |
914 | - { | |
915 | - anamorphic_mode = 2; | |
916 | - } | |
917 | - job->chapter_markers = 1; | |
918 | - | |
919 | - } | |
920 | - | |
921 | - if (!strcmp(preset_name, "Classic")) | |
922 | - { | |
923 | - if( !mux ) | |
924 | - { | |
925 | - mux = HB_MUX_MP4; | |
926 | - } | |
927 | - job->vbitrate = 1000; | |
928 | - if( !atracks ) | |
929 | - { | |
930 | - atracks = strdup("1"); | |
931 | - } | |
932 | - if( !acodecs ) | |
933 | - { | |
934 | - acodecs = strdup("faac"); | |
935 | - } | |
936 | - if( !abitrates ) | |
937 | - { | |
938 | - abitrates = strdup("160"); | |
939 | - } | |
940 | - if( !mixdowns ) | |
941 | - { | |
942 | - mixdowns = strdup("dpl2"); | |
943 | - } | |
944 | - if( !arates ) | |
945 | - { | |
946 | - arates = strdup("Auto"); | |
947 | - } | |
948 | - if( !dynamic_range_compression ) | |
949 | - { | |
950 | - dynamic_range_compression = strdup("0.0"); | |
951 | - } | |
952 | - | |
953 | - } | |
954 | - | |
955 | - if (!strcmp(preset_name, "AppleTV Legacy")) | |
956 | - { | |
957 | - if( !mux ) | |
958 | - { | |
959 | - mux = HB_MUX_MP4; | |
960 | - } | |
961 | - job->largeFileSize = 1; | |
962 | - vcodec = HB_VCODEC_X264; | |
963 | - job->vbitrate = 2500; | |
964 | - if( !atracks ) | |
965 | - { | |
966 | - atracks = strdup("1,1"); | |
967 | - } | |
968 | - if( !acodecs ) | |
969 | - { | |
970 | - acodecs = strdup("faac,copy:ac3"); | |
971 | - } | |
972 | - if( !abitrates ) | |
973 | - { | |
974 | - abitrates = strdup("160,160"); | |
975 | - } | |
976 | - if( !mixdowns ) | |
977 | - { | |
978 | - mixdowns = strdup("dpl2,auto"); | |
979 | - } | |
980 | - if( !arates ) | |
981 | - { | |
982 | - arates = strdup("Auto,Auto"); | |
983 | - } | |
984 | - if( !dynamic_range_compression ) | |
985 | - { | |
986 | - dynamic_range_compression = strdup("0.0,0.0"); | |
987 | - } | |
988 | - if( !x264opts ) | |
989 | - { | |
990 | - x264opts = strdup("ref=1:b-pyramid=none:weightp=0:subme=5:me=umh:no-fast-pskip=1:cabac=0:weightb=0:8x8dct=0:trellis=0"); | |
991 | - } | |
992 | - if( !anamorphic_mode ) | |
993 | - { | |
994 | - anamorphic_mode = 1; | |
995 | - } | |
996 | - job->chapter_markers = 1; | |
997 | - | |
998 | - } | |
999 | - | |
1000 | - if (!strcmp(preset_name, "iPhone Legacy")) | |
1001 | - { | |
1002 | - if( !mux ) | |
1003 | - { | |
1004 | - mux = HB_MUX_MP4; | |
1005 | - } | |
1006 | - job->ipod_atom = 1; | |
1007 | - vcodec = HB_VCODEC_X264; | |
1008 | - job->vbitrate = 960; | |
1009 | - if( !atracks ) | |
1010 | - { | |
1011 | - atracks = strdup("1"); | |
1012 | - } | |
1013 | - if( !acodecs ) | |
1014 | - { | |
1015 | - acodecs = strdup("faac"); | |
1016 | - } | |
1017 | - if( !abitrates ) | |
1018 | - { | |
1019 | - abitrates = strdup("128"); | |
1020 | - } | |
1021 | - if( !mixdowns ) | |
1022 | - { | |
1023 | - mixdowns = strdup("dpl2"); | |
1024 | - } | |
1025 | - if( !arates ) | |
1026 | - { | |
1027 | - arates = strdup("Auto"); | |
1028 | - } | |
1029 | - if( !dynamic_range_compression ) | |
1030 | - { | |
1031 | - dynamic_range_compression = strdup("0.0"); | |
1032 | - } | |
1033 | - maxWidth = 480; | |
1034 | - if( !x264opts ) | |
1035 | - { | |
1036 | - x264opts = strdup("level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0"); | |
1037 | - } | |
1038 | - job->chapter_markers = 1; | |
1039 | - | |
1040 | - } | |
1041 | - | |
1042 | - if (!strcmp(preset_name, "iPod Legacy")) | |
1043 | - { | |
1044 | - if( !mux ) | |
1045 | - { | |
1046 | - mux = HB_MUX_MP4; | |
1047 | - } | |
1048 | - job->ipod_atom = 1; | |
1049 | - vcodec = HB_VCODEC_X264; | |
1050 | - job->vbitrate = 1500; | |
1051 | - if( !atracks ) | |
1052 | - { | |
1053 | - atracks = strdup("1"); | |
1054 | - } | |
1055 | - if( !acodecs ) | |
1056 | - { | |
1057 | - acodecs = strdup("faac"); | |
1058 | - } | |
1059 | - if( !abitrates ) | |
1060 | - { | |
1061 | - abitrates = strdup("160"); | |
1062 | - } | |
1063 | - if( !mixdowns ) | |
1064 | - { | |
1065 | - mixdowns = strdup("dpl2"); | |
1066 | - } | |
1067 | - if( !arates ) | |
1068 | - { | |
1069 | - arates = strdup("Auto"); | |
1070 | - } | |
1071 | - if( !dynamic_range_compression ) | |
1072 | - { | |
1073 | - dynamic_range_compression = strdup("0.0"); | |
1074 | - } | |
1075 | - maxWidth = 640; | |
1076 | - if( !x264opts ) | |
1077 | - { | |
1078 | - x264opts = strdup("level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:subme=6:8x8dct=0:trellis=0"); | |
1079 | - } | |
1080 | - job->chapter_markers = 1; | |
1081 | - | |
1082 | - } | |
1083 | - | |
614 | + { | |
615 | + if( !mux ) | |
616 | + { | |
617 | + mux = HB_MUX_MP4; | |
618 | + } | |
619 | + vcodec = HB_VCODEC_X264; | |
620 | + job->vquality = 20.0; | |
621 | + if( !atracks ) | |
622 | + { | |
623 | + atracks = strdup("1,1"); | |
624 | + } | |
625 | + if( !acodecs ) | |
626 | + { | |
627 | + acodecs = strdup("faac,copy:ac3"); | |
628 | + } | |
629 | + if( !abitrates ) | |
630 | + { | |
631 | + abitrates = strdup("160,160"); | |
632 | + } | |
633 | + if( !mixdowns ) | |
634 | + { | |
635 | + mixdowns = strdup("dpl2,auto"); | |
636 | + } | |
637 | + if( !arates ) | |
638 | + { | |
639 | + arates = strdup("Auto,Auto"); | |
640 | + } | |
641 | + if( !dynamic_range_compression ) | |
642 | + { | |
643 | + dynamic_range_compression = strdup("0.0,0.0"); | |
644 | + } | |
645 | + maxWidth = 720; | |
646 | + if( !x264opts ) | |
647 | + { | |
648 | + x264opts = strdup("cabac=0:ref=2:me=umh:bframes=0:weightp=0:8x8dct=0:trellis=0:subme=6"); | |
649 | + } | |
650 | + if( !anamorphic_mode ) | |
651 | + { | |
652 | + anamorphic_mode = 2; | |
653 | + } | |
654 | + job->chapter_markers = 1; | |
655 | + | |
656 | + } | |
657 | + | |
658 | + if (!strcmp(preset_name, "iPod")) | |
659 | + { | |
660 | + if( !mux ) | |
661 | + { | |
662 | + mux = HB_MUX_MP4; | |
663 | + } | |
664 | + job->ipod_atom = 1; | |
665 | + vcodec = HB_VCODEC_X264; | |
666 | + job->vbitrate = 700; | |
667 | + if( !atracks ) | |
668 | + { | |
669 | + atracks = strdup("1"); | |
670 | + } | |
671 | + if( !acodecs ) | |
672 | + { | |
673 | + acodecs = strdup("faac"); | |
674 | + } | |
675 | + if( !abitrates ) | |
676 | + { | |
677 | + abitrates = strdup("160"); | |
678 | + } | |
679 | + if( !mixdowns ) | |
680 | + { | |
681 | + mixdowns = strdup("dpl2"); | |
682 | + } | |
683 | + if( !arates ) | |
684 | + { | |
685 | + arates = strdup("Auto"); | |
686 | + } | |
687 | + if( !dynamic_range_compression ) | |
688 | + { | |
689 | + dynamic_range_compression = strdup("0.0"); | |
690 | + } | |
691 | + maxWidth = 320; | |
692 | + if( !x264opts ) | |
693 | + { | |
694 | + x264opts = strdup("level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subme=6:8x8dct=0:trellis=0"); | |
695 | + } | |
696 | + job->chapter_markers = 1; | |
697 | + | |
698 | + } | |
699 | + | |
700 | + if (!strcmp(preset_name, "iPhone & iPod Touch")) | |
701 | + { | |
702 | + if( !mux ) | |
703 | + { | |
704 | + mux = HB_MUX_MP4; | |
705 | + } | |
706 | + vcodec = HB_VCODEC_X264; | |
707 | + job->vquality = 20.0; | |
708 | + if( !atracks ) | |
709 | + { | |
710 | + atracks = strdup("1"); | |
711 | + } | |
712 | + if( !acodecs ) | |
713 | + { | |
714 | + acodecs = strdup("faac"); | |
715 | + } | |
716 | + if( !abitrates ) | |
717 | + { | |
718 | + abitrates = strdup("128"); | |
719 | + } | |
720 | + if( !mixdowns ) | |
721 | + { | |
722 | + mixdowns = strdup("dpl2"); | |
723 | + } | |
724 | + if( !arates ) | |
725 | + { | |
726 | + arates = strdup("Auto"); | |
727 | + } | |
728 | + if( !dynamic_range_compression ) | |
729 | + { | |
730 | + dynamic_range_compression = strdup("0.0"); | |
731 | + } | |
732 | + maxWidth = 480; | |
733 | + if( !x264opts ) | |
734 | + { | |
735 | + x264opts = strdup("cabac=0:ref=2:me=umh:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0"); | |
736 | + } | |
737 | + job->chapter_markers = 1; | |
738 | + | |
739 | + } | |
740 | + | |
741 | + if (!strcmp(preset_name, "iPhone 4")) | |
742 | + { | |
743 | + if( !mux ) | |
744 | + { | |
745 | + mux = HB_MUX_MP4; | |
746 | + } | |
747 | + job->largeFileSize = 1; | |
748 | + vcodec = HB_VCODEC_X264; | |
749 | + job->vquality = 20.0; | |
750 | + job->vrate_base = 900900; | |
751 | + job->cfr = 2; | |
752 | + if( !atracks ) | |
753 | + { | |
754 | + atracks = strdup("1"); | |
755 | + } | |
756 | + if( !acodecs ) | |
757 | + { | |
758 | + acodecs = strdup("faac"); | |
759 | + } | |
760 | + if( !abitrates ) | |
761 | + { | |
762 | + abitrates = strdup("160"); | |
763 | + } | |
764 | + if( !mixdowns ) | |
765 | + { | |
766 | + mixdowns = strdup("dpl2"); | |
767 | + } | |
768 | + if( !arates ) | |
769 | + { | |
770 | + arates = strdup("Auto"); | |
771 | + } | |
772 | + if( !dynamic_range_compression ) | |
773 | + { | |
774 | + dynamic_range_compression = strdup("0.0"); | |
775 | + } | |
776 | + maxWidth = 960; | |
777 | + if( !anamorphic_mode ) | |
778 | + { | |
779 | + anamorphic_mode = 2; | |
780 | + } | |
781 | + job->chapter_markers = 1; | |
782 | + | |
783 | + } | |
784 | + | |
785 | + if (!strcmp(preset_name, "iPad")) | |
786 | + { | |
787 | + if( !mux ) | |
788 | + { | |
789 | + mux = HB_MUX_MP4; | |
790 | + } | |
791 | + job->largeFileSize = 1; | |
792 | + vcodec = HB_VCODEC_X264; | |
793 | + job->vquality = 20.0; | |
794 | + job->vrate_base = 900900; | |
795 | + job->cfr = 2; | |
796 | + if( !atracks ) | |
797 | + { | |
798 | + atracks = strdup("1"); | |
799 | + } | |
800 | + if( !acodecs ) | |
801 | + { | |
802 | + acodecs = strdup("faac"); | |
803 | + } | |
804 | + if( !abitrates ) | |
805 | + { | |
806 | + abitrates = strdup("160"); | |
807 | + } | |
808 | + if( !mixdowns ) | |
809 | + { | |
810 | + mixdowns = strdup("dpl2"); | |
811 | + } | |
812 | + if( !arates ) | |
813 | + { | |
814 | + arates = strdup("Auto"); | |
815 | + } | |
816 | + if( !dynamic_range_compression ) | |
817 | + { | |
818 | + dynamic_range_compression = strdup("0.0"); | |
819 | + } | |
820 | + maxWidth = 1024; | |
821 | + if( !anamorphic_mode ) | |
822 | + { | |
823 | + anamorphic_mode = 2; | |
824 | + } | |
825 | + job->chapter_markers = 1; | |
826 | + | |
827 | + } | |
828 | + | |
829 | + if (!strcmp(preset_name, "AppleTV")) | |
830 | + { | |
831 | + if( !mux ) | |
832 | + { | |
833 | + mux = HB_MUX_MP4; | |
834 | + } | |
835 | + job->largeFileSize = 1; | |
836 | + vcodec = HB_VCODEC_X264; | |
837 | + job->vquality = 20.0; | |
838 | + if( !atracks ) | |
839 | + { | |
840 | + atracks = strdup("1,1"); | |
841 | + } | |
842 | + if( !acodecs ) | |
843 | + { | |
844 | + acodecs = strdup("faac,copy:ac3"); | |
845 | + } | |
846 | + if( !abitrates ) | |
847 | + { | |
848 | + abitrates = strdup("160,160"); | |
849 | + } | |
850 | + if( !mixdowns ) | |
851 | + { | |
852 | + mixdowns = strdup("dpl2,auto"); | |
853 | + } | |
854 | + if( !arates ) | |
855 | + { | |
856 | + arates = strdup("Auto,Auto"); | |
857 | + } | |
858 | + if( !dynamic_range_compression ) | |
859 | + { | |
860 | + dynamic_range_compression = strdup("0.0,0.0"); | |
861 | + } | |
862 | + maxWidth = 960; | |
863 | + if( !x264opts ) | |
864 | + { | |
865 | + x264opts = strdup("cabac=0:ref=2:me=umh:b-pyramid=none:b-adapt=2:weightb=0:trellis=0:weightp=0:vbv-maxrate=9500:vbv-bufsize=9500"); | |
866 | + } | |
867 | + if( !anamorphic_mode ) | |
868 | + { | |
869 | + anamorphic_mode = 2; | |
870 | + } | |
871 | + job->chapter_markers = 1; | |
872 | + | |
873 | + } | |
874 | + | |
875 | + if (!strcmp(preset_name, "Apple Tv 2")) | |
876 | + { | |
877 | + if( !mux ) | |
878 | + { | |
879 | + mux = HB_MUX_MP4; | |
880 | + } | |
881 | + job->largeFileSize = 1; | |
882 | + vcodec = HB_VCODEC_X264; | |
883 | + job->vquality = 20.0; | |
884 | + job->vrate_base = 900900; | |
885 | + job->cfr = 2; | |
886 | + if( !atracks ) | |
887 | + { | |
888 | + atracks = strdup("1,1"); | |
889 | + } | |
890 | + if( !acodecs ) | |
891 | + { | |
892 | + acodecs = strdup("faac,copy:ac3"); | |
893 | + } | |
894 | + if( !abitrates ) | |
895 | + { | |
896 | + abitrates = strdup("160,160"); | |
897 | + } | |
898 | + if( !mixdowns ) | |
899 | + { | |
900 | + mixdowns = strdup("dpl2,auto"); | |
901 | + } | |
902 | + if( !arates ) | |
903 | + { | |
904 | + arates = strdup("Auto,Auto"); | |
905 | + } | |
906 | + if( !dynamic_range_compression ) | |
907 | + { | |
908 | + dynamic_range_compression = strdup("0.0,0.0"); | |
909 | + } | |
910 | + maxWidth = 1280; | |
911 | + if( !anamorphic_mode ) | |
912 | + { | |
913 | + anamorphic_mode = 2; | |
914 | + } | |
915 | + job->chapter_markers = 1; | |
916 | + | |
917 | + } | |
918 | + | |
919 | + if (!strcmp(preset_name, "Normal")) | |
920 | + { | |
921 | + if( !mux ) | |
922 | + { | |
923 | + mux = HB_MUX_MP4; | |
924 | + } | |
925 | + vcodec = HB_VCODEC_X264; | |
926 | + job->vquality = 20.0; | |
927 | + if( !atracks ) | |
928 | + { | |
929 | + atracks = strdup("1"); | |
930 | + } | |
931 | + if( !acodecs ) | |
932 | + { | |
933 | + acodecs = strdup("faac"); | |
934 | + } | |
935 | + if( !abitrates ) | |
936 | + { | |
937 | + abitrates = strdup("160"); | |
938 | + } | |
939 | + if( !mixdowns ) | |
940 | + { | |
941 | + mixdowns = strdup("dpl2"); | |
942 | + } | |
943 | + if( !arates ) | |
944 | + { | |
945 | + arates = strdup("Auto"); | |
946 | + } | |
947 | + if( !dynamic_range_compression ) | |
948 | + { | |
949 | + dynamic_range_compression = strdup("0.0"); | |
950 | + } | |
951 | + if( !x264opts ) | |
952 | + { | |
953 | + x264opts = strdup("ref=2:bframes=2:subme=6:mixed-refs=0:weightb=0:8x8dct=0:trellis=0"); | |
954 | + } | |
955 | + if( !anamorphic_mode ) | |
956 | + { | |
957 | + anamorphic_mode = 1; | |
958 | + } | |
959 | + job->chapter_markers = 1; | |
960 | + | |
961 | + } | |
962 | + | |
963 | + if (!strcmp(preset_name, "High Profile")) | |
964 | + { | |
965 | + if( !mux ) | |
966 | + { | |
967 | + mux = HB_MUX_MP4; | |
968 | + } | |
969 | + vcodec = HB_VCODEC_X264; | |
970 | + job->vquality = 20.0; | |
971 | + if( !atracks ) | |
972 | + { | |
973 | + atracks = strdup("1,1"); | |
974 | + } | |
975 | + if( !acodecs ) | |
976 | + { | |
977 | + acodecs = strdup("faac,copy:ac3"); | |
978 | + } | |
979 | + if( !abitrates ) | |
980 | + { | |
981 | + abitrates = strdup("160,160"); | |
982 | + } | |
983 | + if( !mixdowns ) | |
984 | + { | |
985 | + mixdowns = strdup("dpl2,auto"); | |
986 | + } | |
987 | + if( !arates ) | |
988 | + { | |
989 | + arates = strdup("Auto,Auto"); | |
990 | + } | |
991 | + if( !dynamic_range_compression ) | |
992 | + { | |
993 | + dynamic_range_compression = strdup("0.0,0.0"); | |
994 | + } | |
995 | + if( !x264opts ) | |
996 | + { | |
997 | + x264opts = strdup("b-adapt=2:rc-lookahead=50"); | |
998 | + } | |
999 | + detelecine = 1; | |
1000 | + decomb = 1; | |
1001 | + if( !anamorphic_mode ) | |
1002 | + { | |
1003 | + anamorphic_mode = 2; | |
1004 | + } | |
1005 | + job->chapter_markers = 1; | |
1006 | + | |
1007 | + } | |
1008 | + | |
1009 | + if (!strcmp(preset_name, "Classic")) | |
1010 | + { | |
1011 | + if( !mux ) | |
1012 | + { | |
1013 | + mux = HB_MUX_MP4; | |
1014 | + } | |
1015 | + job->vbitrate = 1000; | |
1016 | + if( !atracks ) | |
1017 | + { | |
1018 | + atracks = strdup("1"); | |
1019 | + } | |
1020 | + if( !acodecs ) | |
1021 | + { | |
1022 | + acodecs = strdup("faac"); | |
1023 | + } | |
1024 | + if( !abitrates ) | |
1025 | + { | |
1026 | + abitrates = strdup("160"); | |
1027 | + } | |
1028 | + if( !mixdowns ) | |
1029 | + { | |
1030 | + mixdowns = strdup("dpl2"); | |
1031 | + } | |
1032 | + if( !arates ) | |
1033 | + { | |
1034 | + arates = strdup("Auto"); | |
1035 | + } | |
1036 | + if( !dynamic_range_compression ) | |
1037 | + { | |
1038 | + dynamic_range_compression = strdup("0.0"); | |
1039 | + } | |
1040 | + | |
1041 | + } | |
1042 | + | |
1043 | + if (!strcmp(preset_name, "AppleTV Legacy")) | |
1044 | + { | |
1045 | + if( !mux ) | |
1046 | + { | |
1047 | + mux = HB_MUX_MP4; | |
1048 | + } | |
1049 | + job->largeFileSize = 1; | |
1050 | + vcodec = HB_VCODEC_X264; | |
1051 | + job->vbitrate = 2500; | |
1052 | + if( !atracks ) | |
1053 | + { | |
1054 | + atracks = strdup("1,1"); | |
1055 | + } | |
1056 | + if( !acodecs ) | |
1057 | + { | |
1058 | + acodecs = strdup("faac,copy:ac3"); | |
1059 | + } | |
1060 | + if( !abitrates ) | |
1061 | + { | |
1062 | + abitrates = strdup("160,160"); | |
1063 | + } | |
1064 | + if( !mixdowns ) | |
1065 | + { | |
1066 | + mixdowns = strdup("dpl2,auto"); | |
1067 | + } | |
1068 | + if( !arates ) | |
1069 | + { | |
1070 | + arates = strdup("Auto,Auto"); | |
1071 | + } | |
1072 | + if( !dynamic_range_compression ) | |
1073 | + { | |
1074 | + dynamic_range_compression = strdup("0.0,0.0"); | |
1075 | + } | |
1076 | + if( !x264opts ) | |
1077 | + { | |
1078 | + x264opts = strdup("ref=1:b-pyramid=none:weightp=0:subme=5:me=umh:no-fast-pskip=1:cabac=0:weightb=0:8x8dct=0:trellis=0"); | |
1079 | + } | |
1080 | + if( !anamorphic_mode ) | |
1081 | + { | |
1082 | + anamorphic_mode = 1; | |
1083 | + } | |
1084 | + job->chapter_markers = 1; | |
1085 | + | |
1086 | + } | |
1087 | + | |
1088 | + if (!strcmp(preset_name, "iPhone Legacy")) | |
1089 | + { | |
1090 | + if( !mux ) | |
1091 | + { | |
1092 | + mux = HB_MUX_MP4; | |
1093 | + } | |
1094 | + job->ipod_atom = 1; | |
1095 | + vcodec = HB_VCODEC_X264; | |
1096 | + job->vbitrate = 960; | |
1097 | + if( !atracks ) | |
1098 | + { | |
1099 | + atracks = strdup("1"); | |
1100 | + } | |
1101 | + if( !acodecs ) | |
1102 | + { | |
1103 | + acodecs = strdup("faac"); | |
1104 | + } | |
1105 | + if( !abitrates ) | |
1106 | + { | |
1107 | + abitrates = strdup("128"); | |
1108 | + } | |
1109 | + if( !mixdowns ) | |
1110 | + { | |
1111 | + mixdowns = strdup("dpl2"); | |
1112 | + } | |
1113 | + if( !arates ) | |
1114 | + { | |
1115 | + arates = strdup("Auto"); | |
1116 | + } | |
1117 | + if( !dynamic_range_compression ) | |
1118 | + { | |
1119 | + dynamic_range_compression = strdup("0.0"); | |
1120 | + } | |
1121 | + maxWidth = 480; | |
1122 | + if( !x264opts ) | |
1123 | + { | |
1124 | + x264opts = strdup("level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0"); | |
1125 | + } | |
1126 | + job->chapter_markers = 1; | |
1127 | + | |
1128 | + } | |
1129 | + | |
1130 | + if (!strcmp(preset_name, "iPod Legacy")) | |
1131 | + { | |
1132 | + if( !mux ) | |
1133 | + { | |
1134 | + mux = HB_MUX_MP4; | |
1135 | + } | |
1136 | + job->ipod_atom = 1; | |
1137 | + vcodec = HB_VCODEC_X264; | |
1138 | + job->vbitrate = 1500; | |
1139 | + if( !atracks ) | |
1140 | + { | |
1141 | + atracks = strdup("1"); | |
1142 | + } | |
1143 | + if( !acodecs ) | |
1144 | + { | |
1145 | + acodecs = strdup("faac"); | |
1146 | + } | |
1147 | + if( !abitrates ) | |
1148 | + { | |
1149 | + abitrates = strdup("160"); | |
1150 | + } | |
1151 | + if( !mixdowns ) | |
1152 | + { | |
1153 | + mixdowns = strdup("dpl2"); | |
1154 | + } | |
1155 | + if( !arates ) | |
1156 | + { | |
1157 | + arates = strdup("Auto"); | |
1158 | + } | |
1159 | + if( !dynamic_range_compression ) | |
1160 | + { | |
1161 | + dynamic_range_compression = strdup("0.0"); | |
1162 | + } | |
1163 | + maxWidth = 640; | |
1164 | + if( !x264opts ) | |
1165 | + { | |
1166 | + x264opts = strdup("level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:subme=6:8x8dct=0:trellis=0"); | |
1167 | + } | |
1168 | + job->chapter_markers = 1; | |
1169 | + | |
1170 | + } | |
1171 | + | |
1084 | 1172 | } |
1085 | 1173 | |
1086 | 1174 | if ( chapter_markers ) |
@@ -2568,38 +2656,42 @@ static void ShowHelp() | ||
2568 | 2656 | ****************************************************************************/ |
2569 | 2657 | static void ShowPresets() |
2570 | 2658 | { |
2571 | - printf("\n< Apple\n"); | |
2572 | - | |
2659 | + printf("\n< Apple\n"); | |
2660 | + | |
2573 | 2661 | printf("\n + Universal: -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 -X 720 --loose-anamorphic -m -x cabac=0:ref=2:me=umh:bframes=0:weightp=0:8x8dct=0:trellis=0:subme=6\n"); |
2574 | - | |
2662 | + | |
2575 | 2663 | printf("\n + iPod: -e x264 -b 700 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -I -X 320 -m -x level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subme=6:8x8dct=0:trellis=0\n"); |
2576 | - | |
2664 | + | |
2577 | 2665 | printf("\n + iPhone & iPod Touch: -e x264 -q 20.0 -a 1 -E faac -B 128 -6 dpl2 -R Auto -D 0.0 -f mp4 -X 480 -m -x cabac=0:ref=2:me=umh:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0\n"); |
2578 | - | |
2666 | + | |
2667 | + printf("\n + iPhone 4: -e x264 -q 20.0 -r 29.97 --pfr -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -4 -X 960 --loose-anamorphic -m\n"); | |
2668 | + | |
2579 | 2669 | printf("\n + iPad: -e x264 -q 20.0 -r 29.97 --pfr -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -4 -X 1024 --loose-anamorphic -m\n"); |
2580 | - | |
2670 | + | |
2581 | 2671 | printf("\n + AppleTV: -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 -X 960 --loose-anamorphic -m -x cabac=0:ref=2:me=umh:b-pyramid=none:b-adapt=2:weightb=0:trellis=0:weightp=0:vbv-maxrate=9500:vbv-bufsize=9500\n"); |
2582 | - | |
2672 | + | |
2673 | + printf("\n + Apple Tv 2: -e x264 -q 20.0 -r 29.97 --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 --loose-anamorphic -m\n"); | |
2674 | + | |
2583 | 2675 | printf("\n>\n"); |
2584 | - | |
2676 | + | |
2585 | 2677 | printf("\n< Regular\n"); |
2586 | - | |
2678 | + | |
2587 | 2679 | printf("\n + Normal: -e x264 -q 20.0 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 --strict-anamorphic -m -x ref=2:bframes=2:subme=6:mixed-refs=0:weightb=0:8x8dct=0:trellis=0\n"); |
2588 | - | |
2680 | + | |
2589 | 2681 | 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 --detelecine --decomb --loose-anamorphic -m -x b-adapt=2:rc-lookahead=50\n"); |
2590 | - | |
2682 | + | |
2591 | 2683 | printf("\n>\n"); |
2592 | - | |
2684 | + | |
2593 | 2685 | printf("\n< Legacy\n"); |
2594 | - | |
2686 | + | |
2595 | 2687 | printf("\n + Classic: -b 1000 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4\n"); |
2596 | - | |
2688 | + | |
2597 | 2689 | printf("\n + AppleTV Legacy: -e x264 -b 2500 -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 --strict-anamorphic -m -x ref=1:b-pyramid=none:weightp=0:subme=5:me=umh:no-fast-pskip=1:cabac=0:weightb=0:8x8dct=0:trellis=0\n"); |
2598 | - | |
2690 | + | |
2599 | 2691 | printf("\n + iPhone Legacy: -e x264 -b 960 -a 1 -E faac -B 128 -6 dpl2 -R Auto -D 0.0 -f mp4 -I -X 480 -m -x level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0\n"); |
2600 | - | |
2692 | + | |
2601 | 2693 | printf("\n + iPod Legacy: -e x264 -b 1500 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -I -X 640 -m -x level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:subme=6:8x8dct=0:trellis=0\n"); |
2602 | - | |
2694 | + | |
2603 | 2695 | printf("\n>\n"); |
2604 | 2696 | |
2605 | 2697 | } |