diff options
-rw-r--r-- | recordmydesktop/doc/recordmydesktop.1 | 7 | ||||
-rw-r--r-- | recordmydesktop/include/recordmydesktop.h | 3 | ||||
-rw-r--r-- | recordmydesktop/src/init_encoder.c | 2 | ||||
-rw-r--r-- | recordmydesktop/src/parseargs.c | 5 |
4 files changed, 13 insertions, 4 deletions
diff --git a/recordmydesktop/doc/recordmydesktop.1 b/recordmydesktop/doc/recordmydesktop.1 index 809077e..5853662 100644 --- a/recordmydesktop/doc/recordmydesktop.1 +++ b/recordmydesktop/doc/recordmydesktop.1 @@ -235,6 +235,11 @@ Encoding Options: .br .TP .B + \-\-no\-framedrop + Do not allow theora encoder to drop frames(this can raise proccessing times enough). +.br +.TP +.B \-s_quality n Desired audio quality(\-1 to 10). .br @@ -278,7 +283,7 @@ If no other option is specified, filename can be given without the \-o switch. .br \-display DISPLAY| \-x X| \-y Y|\-width N| \-height N| \-fps N(number>0)| .br -\-v_quality n| \-s_quality n| \-v_bitrate n| \-dummy\-cursor color| \-\-no\-dummy\-cursor| +\-v_quality n| \-s_quality n| \-v_bitrate n| \-\-no\-framedrop| \-dummy\-cursor color| \-\-no\-dummy\-cursor| .br \-freq N(number>0)| \-channels N(number>0)| \-device SOUND_DEVICE| \-\-nosound| .br diff --git a/recordmydesktop/include/recordmydesktop.h b/recordmydesktop/include/recordmydesktop.h index 98344c4..6d97462 100644 --- a/recordmydesktop/include/recordmydesktop.h +++ b/recordmydesktop/include/recordmydesktop.h @@ -116,6 +116,7 @@ typedef struct _ProgArgs{ int scshot; //take screenshot and exit(default 0) int scale_shot; //screenshot subscale factor(default 1) int v_bitrate,v_quality,s_quality;//video bitrate,video-sound quality + int dropframes; //option for theora encoder }ProgArgs; @@ -262,7 +263,7 @@ int avd; (args)->windowid=(args)->x=(args)->y\ =(args)->width=(args)->height=(args)->quietmode\ =(args)->nosound=(args)->scshot=(args)->full_shots=0;\ - (args)->noshared=(args)->scale_shot=1;\ + (args)->noshared=(args)->scale_shot=(args)->dropframes=1;\ (args)->filename=(char *)malloc(8);\ strcpy((args)->filename,"out.ogg");\ (args)->encoding=OGG_THEORA_VORBIS;\ diff --git a/recordmydesktop/src/init_encoder.c b/recordmydesktop/src/init_encoder.c index 8995f6d..1be51c3 100644 --- a/recordmydesktop/src/init_encoder.c +++ b/recordmydesktop/src/init_encoder.c @@ -57,7 +57,7 @@ void InitEncoder(ProgData *pdata,EncData *enc_data_t){ (enc_data_t)->m_th_inf.pixelformat=OC_PF_420; (enc_data_t)->m_th_inf.target_bitrate=(pdata)->args.v_bitrate; (enc_data_t)->m_th_inf.quality=(pdata)->args.v_quality; - (enc_data_t)->m_th_inf.dropframes_p=0; + (enc_data_t)->m_th_inf.dropframes_p=(pdata)->args.dropframes; (enc_data_t)->m_th_inf.quick_p=1; (enc_data_t)->m_th_inf.keyframe_auto_p=1; (enc_data_t)->m_th_inf.keyframe_frequency=64; diff --git a/recordmydesktop/src/parseargs.c b/recordmydesktop/src/parseargs.c index ea82920..d524c35 100644 --- a/recordmydesktop/src/parseargs.c +++ b/recordmydesktop/src/parseargs.c @@ -33,7 +33,7 @@ int ParseArgs(int argc,char **argv,ProgArgs *arg_return){ char *usage="\nUsage:\n" "\trecordmydesktop [-h| --help| --version| -delay n[H|h|M|m]| -windowid id_of_window|\n" "\t-display DISPLAY| -x X| -y Y|-width N| -height N| -fps N(number>0)|\n" - "\t -v_quality n| -s_quality n| -v_bitrate n| -dummy-cursor color| --no-dummy-cursor|\n" + "\t -v_quality n| -s_quality n| -v_bitrate n| --no-framedrop| -dummy-cursor color| --no-dummy-cursor|\n" "\t -freq N(number>0)| -channels N(number>0)| -device SOUND_DEVICE| --nosound|\n" "\t --with-shared| --full-shots| --scshot| -scale-shot N| -o filename]^filename\n\n\n" @@ -64,6 +64,7 @@ int ParseArgs(int argc,char **argv,ProgArgs *arg_return){ "Encoding Options\n" "\t-v_quality n\t\tA number from 0 to 63 for desired encoded video quality(default 63).\n" "\t-v_bitrate n\t\tA number from 45000 to 2000000 for desired encoded video bitrate(default 45000).\n" + "\t--no-framedrop\t\tDo not allow theora encoder to drop frames.\n" "\t-s_quality n\t\tDesired audio quality(-1 to 10).\n\n" "Misc Options:\n" @@ -357,6 +358,8 @@ int ParseArgs(int argc,char **argv,ProgArgs *arg_return){ } else if(!strcmp(argv[i],"--nosound")) arg_return->nosound=1; + else if(!strcmp(argv[i],"--no-framedrop")) + arg_return->dropframes=0; else if(!strcmp(argv[i],"--with-shared")) arg_return->noshared=0; else if(!strcmp(argv[i],"--full-shots")) |