bool ffMpeg4Configure(void) { diaMenuEntry meE[]={ {1,QT_TRANSLATE_NOOP("ffmpeg4","None")}, {2,QT_TRANSLATE_NOOP("ffmpeg4","Full")}, {3,QT_TRANSLATE_NOOP("ffmpeg4","Log")}, {4,QT_TRANSLATE_NOOP("ffmpeg4","Phods")}, {5,QT_TRANSLATE_NOOP("ffmpeg4","EPZS")}, {6,QT_TRANSLATE_NOOP("ffmpeg4","X1")} }; diaMenuEntry qzE[]={ {0,QT_TRANSLATE_NOOP("ffmpeg4","H.263")}, {1,QT_TRANSLATE_NOOP("ffmpeg4","MPEG")} }; diaMenuEntry rdE[]={ {0,QT_TRANSLATE_NOOP("ffmpeg4","MB comparison")}, {1,QT_TRANSLATE_NOOP("ffmpeg4","Fewest bits (vhq)")}, {2,QT_TRANSLATE_NOOP("ffmpeg4","Rate distortion")} }; diaMenuEntry threads[]={ {0,QT_TRANSLATE_NOOP("ffmpeg4","One thread")}, {2,QT_TRANSLATE_NOOP("ffmpeg4","Two threads)")}, {3,QT_TRANSLATE_NOOP("ffmpeg4","Three threads")}, {99,QT_TRANSLATE_NOOP("ffmpeg4","Auto (#cpu)")} }; FFcodecSettings *conf=&Mp4Settings; uint32_t me=(uint32_t)conf->lavcSettings.me_method; #define PX(x) &(conf->lavcSettings.x) diaElemBitrate bitrate(&(Mp4Settings.params),NULL); diaElemMenu meM(&me,QT_TRANSLATE_NOOP("ffmpeg4","Matrices"),4,meE); diaElemMenu threadM(PX(MultiThreaded),QT_TRANSLATE_NOOP("ffmpeg4","Threading"),4,threads); diaElemUInteger qminM(PX(qmin),QT_TRANSLATE_NOOP("ffmpeg4","Mi_n. quantizer:"),1,31); diaElemUInteger qmaxM(PX(qmax),QT_TRANSLATE_NOOP("ffmpeg4","Ma_x. quantizer:"),1,31); diaElemUInteger qdiffM(PX(max_qdiff),QT_TRANSLATE_NOOP("ffmpeg4","Max. quantizer _difference:"),1,31); diaElemToggle fourMv(PX(_4MV),QT_TRANSLATE_NOOP("ffmpeg4","4_MV")); diaElemToggle trellis(PX(_TRELLIS_QUANT),QT_TRANSLATE_NOOP("ffmpeg4","_Trellis quantization")); diaElemToggle qpel(PX(_QPEL),QT_TRANSLATE_NOOP("ffmpeg4","_Quarter pixel")); diaElemToggle gmc(PX(_GMC),QT_TRANSLATE_NOOP("ffmpeg4","_GMC")); diaElemUInteger max_b_frames(PX(max_b_frames),QT_TRANSLATE_NOOP("ffmpeg4","_Number of B frames:"),0,32); diaElemMenu qzM(PX(mpeg_quant),QT_TRANSLATE_NOOP("ffmpeg4","_Quantization type:"),2,qzE); diaElemMenu rdM(PX(mb_eval),QT_TRANSLATE_NOOP("ffmpeg4","_Macroblock decision:"),3,rdE); diaElemUInteger filetol(PX(vratetol),QT_TRANSLATE_NOOP("ffmpeg4","_Filesize tolerance (kb):"),0,100000); diaElemFloat qzComp(PX(qcompress),QT_TRANSLATE_NOOP("ffmpeg4","_Quantizer compression:"),0,1); diaElemFloat qzBlur(PX(qblur),QT_TRANSLATE_NOOP("ffmpeg4","Quantizer _blur:"),0,1); diaElemUInteger GopSize(PX(gop_size),QT_TRANSLATE_NOOP("ffmpeg4","_Gop Size:"),1,500); /* First Tab : encoding mode */ diaElem *diamode[]={&GopSize,&threadM,&bitrate}; diaElemTabs tabMode(QT_TRANSLATE_NOOP("ffmpeg4","User Interface"),3,diamode); /* 2nd Tab : ME */ diaElemFrame frameMe(QT_TRANSLATE_NOOP("ffmpeg4","Advanced Simple Profile")); frameMe.swallow(&max_b_frames); frameMe.swallow(&qpel); frameMe.swallow(&gmc); diaElem *diaME[]={&fourMv,&frameMe}; diaElemTabs tabME(QT_TRANSLATE_NOOP("ffmpeg4","Motion Estimation"),2,diaME); /* 3nd Tab : Qz */ diaElem *diaQze[]={&qzM,&rdM,&qminM,&qmaxM,&qdiffM,&trellis}; diaElemTabs tabQz(QT_TRANSLATE_NOOP("ffmpeg4","Quantization"),6,diaQze); /* 4th Tab : RControl */ diaElem *diaRC[]={&filetol,&qzComp,&qzBlur}; diaElemTabs tabRC(QT_TRANSLATE_NOOP("ffmpeg4","Rate Control"),3,diaRC); diaElemTabs *tabs[]={&tabMode,&tabME,&tabQz,&tabRC}; if( diaFactoryRunTabs(QT_TRANSLATE_NOOP("ffmpeg4","libavcodec MPEG-4 configuration"),4,tabs)) { conf->lavcSettings.me_method=(Motion_Est_ID)me; return true; } return false; }
bool ffMpeg2Configure(void) { diaMenuEntry arE[]= { {0,QT_TRANSLATE_NOOP("ffmpeg2","Normal (4:3)")}, {1,QT_TRANSLATE_NOOP("ffmpeg2","Wide (16:9)")} }; diaMenuEntry matrixE[]= { {MPEG2_MATRIX_DEFAULT,QT_TRANSLATE_NOOP("ffmpeg2","Default")}, {MPEG2_MATRIX_TMPGENC,QT_TRANSLATE_NOOP("ffmpeg2","Tmpgenc")}, {MPEG2_MATRIX_ANIME,QT_TRANSLATE_NOOP("ffmpeg2","Animes")}, {MPEG2_MATRIX_KVCD,QT_TRANSLATE_NOOP("ffmpeg2","KVCD")}, }; diaMenuEntry rdE[]={ {0,QT_TRANSLATE_NOOP("ffmpeg2","MB comparison")}, {1,QT_TRANSLATE_NOOP("ffmpeg2","Fewest bits (vhq)")}, {2,QT_TRANSLATE_NOOP("ffmpeg2","Rate distortion")} }; diaMenuEntry threads[]={ {0,QT_TRANSLATE_NOOP("ffmpeg2","One thread")}, {2,QT_TRANSLATE_NOOP("ffmpeg2","Two threads)")}, {3,QT_TRANSLATE_NOOP("ffmpeg2","Three threads")}, {99,QT_TRANSLATE_NOOP("ffmpeg2","Auto (#cpu)")} }; diaMenuEntry interE[]={ {0,QT_TRANSLATE_NOOP("ffmpeg2","Progressive")}, {1,QT_TRANSLATE_NOOP("ffmpeg2","Interlaced")}, }; diaMenuEntry foE[]={ {0,QT_TRANSLATE_NOOP("ffmpeg2","Top Field First")}, {1,QT_TRANSLATE_NOOP("ffmpeg2","Bottom Field First")}, }; mpeg2_encoder *conf=&Mp2Settings; uint32_t me=(uint32_t)conf->lavcSettings.me_method; #define PX(x) &(conf->lavcSettings.x) diaElemBitrate bitrate(&(Mp2Settings.params),NULL); diaElemMenu threadM(PX(MultiThreaded),QT_TRANSLATE_NOOP("ffmpeg2","Threading"),4,threads); diaElemUInteger qminM(PX(qmin),QT_TRANSLATE_NOOP("ffmpeg2","Mi_n. quantizer:"),1,31); diaElemUInteger qmaxM(PX(qmax),QT_TRANSLATE_NOOP("ffmpeg2","Ma_x. quantizer:"),1,31); diaElemUInteger qdiffM(PX(max_qdiff),QT_TRANSLATE_NOOP("ffmpeg2","Max. quantizer _difference:"),1,31); diaElemUInteger bufferS(PX(bufferSize),QT_TRANSLATE_NOOP("ffmpeg2","VBV Buffer Size:"),1,1024); diaElemUInteger maxBitrate(PX(maxBitrate),QT_TRANSLATE_NOOP("ffmpeg2","Max bitrate (kb/s):"),1,50000); diaElemToggle trellis(PX(_TRELLIS_QUANT),QT_TRANSLATE_NOOP("ffmpeg2","_Trellis quantization")); diaElemUInteger max_b_frames(PX(max_b_frames),QT_TRANSLATE_NOOP("ffmpeg2","_Number of B frames:"),0,32); uint32_t widescreen= conf->lavcSettings.widescreen; uint32_t iinterlaced= conf->lavcSettings.interlaced; uint32_t bff= conf->lavcSettings.bff; diaElemMenu rdM(PX(mb_eval),QT_TRANSLATE_NOOP("ffmpeg2","_Macroblock decision:"),3,rdE); diaElemMenu arM(&(widescreen),QT_TRANSLATE_NOOP("ffmpeg2","Aspect ratio:"),2,arE); diaElemMenu matrixM(&(Mp2Settings.matrix),QT_TRANSLATE_NOOP("ffmpeg2","Matrices:"),MPEG2_MATRIX_LAST,matrixE); diaElemUInteger filetol(PX(vratetol),QT_TRANSLATE_NOOP("ffmpeg2","_Filesize tolerance (kb):"),0,100000); diaElemFloat qzComp(PX(qcompress),QT_TRANSLATE_NOOP("ffmpeg2","_Quantizer compression:"),0,1); diaElemFloat qzBlur(PX(qblur),QT_TRANSLATE_NOOP("ffmpeg2","Quantizer _blur:"),0,1); diaElemUInteger GopSize(PX(gop_size),QT_TRANSLATE_NOOP("ffmpeg2","_Gop Size:"),1,30); diaElemMenu interlaced(&(iinterlaced),QT_TRANSLATE_NOOP("ffmpeg2","_Interlaced:"),2,interE); diaElemMenu fieldOrder(&(bff),QT_TRANSLATE_NOOP("ffmpeg2","Field Order:"),2,foE); /* First Tab : encoding mode */ diaElem *diamode[]={&arM,&threadM,&bitrate}; diaElemTabs tabMode(QT_TRANSLATE_NOOP("ffmpeg2","Basic Settings"),3,diamode); /* 2nd Tab : advanced*/ diaElem *diaAdv[]={&bufferS,&matrixM,&max_b_frames,&GopSize,&maxBitrate}; diaElemTabs tabAdv(QT_TRANSLATE_NOOP("ffmpeg2","Adv. Settings"),5,diaAdv); /* 2ndb Tab : interlacing*/ diaElem *diaInter[]={&interlaced,&fieldOrder}; diaElemTabs tabInter(QT_TRANSLATE_NOOP("ffmpeg2","Interlacing"),2,diaInter); /* 3nd Tab : Qz */ diaElem *diaQze[]={&rdM,&qminM,&qmaxM,&qdiffM,&trellis}; diaElemTabs tabQz(QT_TRANSLATE_NOOP("ffmpeg2","Quantization"),5,diaQze); /* 4th Tab : RControl */ diaElem *diaRC[]={&filetol,&qzComp,&qzBlur}; diaElemTabs tabRC(QT_TRANSLATE_NOOP("ffmpeg2","Rate Control"),3,diaRC); diaElemTabs *tabs[]={&tabMode,&tabAdv,&tabInter,&tabQz,&tabRC}; if( diaFactoryRunTabs(QT_TRANSLATE_NOOP("ffmpeg2","libavcodec MPEG-2 configuration"),5,tabs)) { conf->lavcSettings.me_method=(Motion_Est_ID)me; conf->lavcSettings.widescreen= widescreen; conf->lavcSettings.interlaced= iinterlaced; conf->lavcSettings.bff= bff; return true; } return false; }
bool xvid4Configure(void) { diaMenuEntry meE[]={ {0,QT_TRANSLATE_NOOP("xvid4","None")}, {1,QT_TRANSLATE_NOOP("xvid4","Low")}, {2,QT_TRANSLATE_NOOP("xvid4","Medium")}, {3,QT_TRANSLATE_NOOP("xvid4","Full")} }; diaMenuEntry qzE[]={ {0,QT_TRANSLATE_NOOP("xvid4","H.263")}, {1,QT_TRANSLATE_NOOP("xvid4","MPEG")}, {2,QT_TRANSLATE_NOOP("xvid4","Custom")} }; diaMenuEntry profileE[]={ { XVID_PROFILE_S_L0 ,"Simple Level0"}, { XVID_PROFILE_S_L1 ,"Simple Level1"}, { XVID_PROFILE_S_L2 ,"Simple Level2"}, { XVID_PROFILE_S_L3 ,"Simple Level3"}, { XVID_PROFILE_AS_L0 ,"Adv. Simple Level0"}, { XVID_PROFILE_AS_L1 ,"Adv. Simple Level1"}, { XVID_PROFILE_AS_L2 ,"Adv. Simple Level2"}, { XVID_PROFILE_AS_L3 ,"Adv. Simple Level3"}, { XVID_PROFILE_AS_L4 ,"Adv. Simple Level4"}, }; diaMenuEntry rdE[]={ {0,QT_TRANSLATE_NOOP("xvid4","None")}, {1,QT_TRANSLATE_NOOP("xvid4","DCT")}, {2,QT_TRANSLATE_NOOP("xvid4","Qpel16")}, {3,QT_TRANSLATE_NOOP("xvid4","Qpel8")}, {4,QT_TRANSLATE_NOOP("xvid4","Square")} }; diaMenuEntry threads[]={ {1,QT_TRANSLATE_NOOP("xvid4","One thread")}, {2,QT_TRANSLATE_NOOP("xvid4","Two threads)")}, {3,QT_TRANSLATE_NOOP("xvid4","Three threads")}, {99,QT_TRANSLATE_NOOP("xvid4","Auto (#cpu)")} }; diaMenuEntry arModeE[]={ {XVID_PAR_11_VGA,QT_TRANSLATE_NOOP("xvid4","1:1 (PC)")}, {XVID_PAR_43_PAL,QT_TRANSLATE_NOOP("xvid4","4:3 (PAL)")}, {XVID_PAR_43_NTSC,QT_TRANSLATE_NOOP("xvid4","4:3 (NTSC)")}, {XVID_PAR_169_PAL,QT_TRANSLATE_NOOP("xvid4","16:9 (PAL)")}, {XVID_PAR_169_NTSC,QT_TRANSLATE_NOOP("xvid4","16:9 (NTSC)")}, }; #define PX(x) &(xvid4Settings.x) diaElemBitrate bitrate(&(xvid4Settings.params),NULL); diaElemMenu meM(PX(motionEstimation),QT_TRANSLATE_NOOP("xvid4","MotionEstimation"),4,meE); diaElemMenu threadM(PX(nbThreads),QT_TRANSLATE_NOOP("xvid4","Threading"),4,threads); diaElemUInteger qminM(PX(qMin),QT_TRANSLATE_NOOP("xvid4","Mi_n. quantizer:"),1,31); diaElemUInteger qmaxM(PX(qMax),QT_TRANSLATE_NOOP("xvid4","Ma_x. quantizer:"),1,31); /* diaElemUInteger qdiffM(PX(max_qdiff),QT_TRANSLATE_NOOP("xvid4","Max. quantizer _difference:"),1,31); */ diaElemToggle trellis(PX(trellis),QT_TRANSLATE_NOOP("xvid4","_Trellis quantization")); diaElemUInteger max_b_frames(PX(maxBFrame),QT_TRANSLATE_NOOP("xvid4","_Number of B frames:"),0,32); diaElemMenu qzM(PX(cqmMode),QT_TRANSLATE_NOOP("xvid4","_Quantization type:"),2,qzE); diaElemMenu rdM(PX(rdMode),QT_TRANSLATE_NOOP("xvid4","_Macroblock decision:"),5,rdE); diaElemMenu profileM(PX(profile),QT_TRANSLATE_NOOP("xvid4","Profile:"),9,profileE); diaElemMenu par(PX(arMode),QT_TRANSLATE_NOOP("xvid4","Aspect Ratio:"),sizeof(arModeE)/sizeof(diaMenuEntry),arModeE); /* diaElemUInteger filetol(PX(vratetol),QT_TRANSLATE_NOOP("xvid4","_Filesize tolerance (kb):"),0,100000); diaElemFloat qzComp(PX(qcompress),QT_TRANSLATE_NOOP("xvid4","_Quantizer compression:"),0,1); diaElemFloat qzBlur(PX(qblur),QT_TRANSLATE_NOOP("xvid4","Quantizer _blur:"),0,1); */ diaElemUInteger GopSize(PX(maxKeyFrameInterval),QT_TRANSLATE_NOOP("xvid4","_Gop Size:"),1,500); // DIVX or XVID ? diaElemToggle fcc(PX(useXvidFCC),QT_TRANSLATE_NOOP("xvid4","Use XVID fcc (else DIVX)")); /* First Tab : encoding mode */ diaElemFrame frameMe(QT_TRANSLATE_NOOP("xvid4","Advanced Simple Profile")); frameMe.swallow(&profileM); frameMe.swallow(&max_b_frames); frameMe.swallow(&GopSize); frameMe.swallow(&bitrate); frameMe.swallow(&fcc); diaElem *diaME[]={&frameMe}; diaElemTabs tabME(QT_TRANSLATE_NOOP("xvid4","Motion Estimation"),1,diaME); /* 2nd Tab : Qz */ diaElem *diaQze[]={&qzM,&qminM,&qmaxM,&rdM,&meM,&trellis}; diaElemTabs tabQz(QT_TRANSLATE_NOOP("xvid4","Quantization"),6,diaQze); /* 3th Tab : thread */ diaElem *diaThread[]={&threadM}; diaElemTabs tabThread(QT_TRANSLATE_NOOP("xvid4","Threads"),1,diaThread); /** * 4th tab : aspect ratio * @return */ diaElem *diaAR[]={&par}; diaElemTabs tabAR(QT_TRANSLATE_NOOP("xvid4","Aspect Ratio"),1,diaAR); #if 0 diaElem *diaRC[]={&filetol,&qzComp,&qzBlur}; diaElemTabs tabRC(QT_TRANSLATE_NOOP("xvid4","Rate Control"),3,diaRC); #endif diaElemTabs *tabs[]={&tabME,&tabQz,&tabThread,&tabAR}; if( diaFactoryRunTabs(QT_TRANSLATE_NOOP("xvid4","Xvid4 MPEG-4 ASP configuration"),4,tabs)) { return true; } return false; }