When using the -target option, although PAL or NTSC is specified,

the framerate is not set according to the standard
add NTSC-Film framerates.
patch by (Panagiotis Issaris <takis O lumumba o luc o ac o be>)

Originally committed as revision 3763 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Panagiotis Issaris 2004-12-19 15:31:55 +00:00 committed by Michael Niedermayer
parent f0b77c69c1
commit ed2d7a341e
1 changed files with 9 additions and 2 deletions

View File

@ -3684,6 +3684,7 @@ void opt_intra_matrix(const char *arg)
static void opt_target(const char *arg)
{
int norm = -1;
static const char const *frame_rates[] = {"25", "30000/1001", "24000/1001"};
if(!strncmp(arg, "pal-", 4)) {
norm = 0;
@ -3691,6 +3692,9 @@ static void opt_target(const char *arg)
} else if(!strncmp(arg, "ntsc-", 5)) {
norm = 1;
arg += 5;
} else if(!strncmp(arg, "film-", 5)) {
norm = 2;
arg += 5;
} else {
int fr;
/* Calculate FR via float to avoid int overflow */
@ -3727,8 +3731,8 @@ static void opt_target(const char *arg)
}
if(norm < 0) {
fprintf(stderr, "Could not determine norm (PAL/NTSC) for target.\n");
fprintf(stderr, "Please prefix target with \"pal-\" or \"ntsc-\",\n");
fprintf(stderr, "Could not determine norm (PAL/NTSC/NTSC-Film) for target.\n");
fprintf(stderr, "Please prefix target with \"pal-\", \"ntsc-\" or \"film-\",\n");
fprintf(stderr, "or set a framerate with \"-r xxx\".\n");
exit(1);
}
@ -3740,6 +3744,7 @@ static void opt_target(const char *arg)
opt_format("vcd");
opt_frame_size(norm ? "352x240" : "352x288");
opt_frame_rate(frame_rates[norm]);
video_bit_rate = 1150000;
video_rc_max_rate = 1150000;
@ -3765,6 +3770,7 @@ static void opt_target(const char *arg)
opt_format("svcd");
opt_frame_size(norm ? "480x480" : "480x576");
opt_frame_rate(frame_rates[norm]);
opt_gop_size(norm ? "18" : "15");
video_bit_rate = 2040000;
@ -3785,6 +3791,7 @@ static void opt_target(const char *arg)
opt_format("dvd");
opt_frame_size(norm ? "720x480" : "720x576");
opt_frame_rate(frame_rates[norm]);
opt_gop_size(norm ? "18" : "15");
video_bit_rate = 6000000;