Merge commit 'fb722a900fc5cc9e003b9fef25b27ed7fc5547a2'
* commit 'fb722a900fc5cc9e003b9fef25b27ed7fc5547a2': avconv: remove -same_quant Conflicts: Changelog doc/faq.texi ffmpeg.c ffmpeg.h ffmpeg_opt.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
b7ebb49d03
@ -10,6 +10,7 @@ version next:
|
|||||||
- Pinnacle TARGA CineWave YUV16 decoder
|
- Pinnacle TARGA CineWave YUV16 decoder
|
||||||
- TAK demuxer, decoder and parser
|
- TAK demuxer, decoder and parser
|
||||||
- DTS-HD demuxer
|
- DTS-HD demuxer
|
||||||
|
- remove -same_quant, it hasn't worked for years
|
||||||
|
|
||||||
|
|
||||||
version 1.0:
|
version 1.0:
|
||||||
|
@ -297,7 +297,7 @@ mkfifo intermediate2.mpg
|
|||||||
ffmpeg -i input1.avi -qscale:v 1 -y intermediate1.mpg < /dev/null &
|
ffmpeg -i input1.avi -qscale:v 1 -y intermediate1.mpg < /dev/null &
|
||||||
ffmpeg -i input2.avi -qscale:v 1 -y intermediate2.mpg < /dev/null &
|
ffmpeg -i input2.avi -qscale:v 1 -y intermediate2.mpg < /dev/null &
|
||||||
cat intermediate1.mpg intermediate2.mpg |\
|
cat intermediate1.mpg intermediate2.mpg |\
|
||||||
ffmpeg -f mpeg -i - -qscale:v 2 -c:v mpeg4 -acodec libmp3lame -q:a 4 output.avi
|
ffmpeg -f mpeg -i - -c:v mpeg4 -acodec libmp3lame output.avi
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@subsection Concatenating using raw audio and video
|
@subsection Concatenating using raw audio and video
|
||||||
@ -327,7 +327,7 @@ cat temp1.a temp2.a > all.a &
|
|||||||
cat temp1.v temp2.v > all.v &
|
cat temp1.v temp2.v > all.v &
|
||||||
ffmpeg -f u16le -acodec pcm_s16le -ac 2 -ar 44100 -i all.a \
|
ffmpeg -f u16le -acodec pcm_s16le -ac 2 -ar 44100 -i all.a \
|
||||||
-f yuv4mpegpipe -i all.v \
|
-f yuv4mpegpipe -i all.v \
|
||||||
-qscale:v 2 -y output.flv
|
-y output.flv
|
||||||
rm temp[12].[av] all.[av]
|
rm temp[12].[av] all.[av]
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
@ -470,11 +470,6 @@ Disable video recording.
|
|||||||
|
|
||||||
@item -vcodec @var{codec} (@emph{output})
|
@item -vcodec @var{codec} (@emph{output})
|
||||||
Set the video codec. This is an alias for @code{-codec:v}.
|
Set the video codec. This is an alias for @code{-codec:v}.
|
||||||
@item -same_quant
|
|
||||||
Use same quantizer as source (implies VBR).
|
|
||||||
|
|
||||||
Note that this is NOT SAME QUALITY. Do not use this option unless you know you
|
|
||||||
need it.
|
|
||||||
|
|
||||||
@item -pass[:@var{stream_specifier}] @var{n} (@emph{output,per-stream})
|
@item -pass[:@var{stream_specifier}] @var{n} (@emph{output,per-stream})
|
||||||
Select the pass number (1 or 2). It is used to do two-pass
|
Select the pass number (1 or 2). It is used to do two-pass
|
||||||
|
17
ffmpeg.c
17
ffmpeg.c
@ -773,8 +773,7 @@ static void do_subtitle_out(AVFormatContext *s,
|
|||||||
|
|
||||||
static void do_video_out(AVFormatContext *s,
|
static void do_video_out(AVFormatContext *s,
|
||||||
OutputStream *ost,
|
OutputStream *ost,
|
||||||
AVFrame *in_picture,
|
AVFrame *in_picture)
|
||||||
float quality)
|
|
||||||
{
|
{
|
||||||
int ret, format_video_sync;
|
int ret, format_video_sync;
|
||||||
AVPacket pkt;
|
AVPacket pkt;
|
||||||
@ -878,9 +877,7 @@ static void do_video_out(AVFormatContext *s,
|
|||||||
big_picture.top_field_first = !!ost->top_field_first;
|
big_picture.top_field_first = !!ost->top_field_first;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* handles same_quant here. This is not correct because it may
|
big_picture.quality = ost->st->codec->global_quality;
|
||||||
not be a global option */
|
|
||||||
big_picture.quality = quality;
|
|
||||||
if (!enc->me_threshold)
|
if (!enc->me_threshold)
|
||||||
big_picture.pict_type = 0;
|
big_picture.pict_type = 0;
|
||||||
if (ost->forced_kf_index < ost->forced_kf_count &&
|
if (ost->forced_kf_index < ost->forced_kf_count &&
|
||||||
@ -1043,9 +1040,7 @@ static int reap_filters(void)
|
|||||||
if (!ost->frame_aspect_ratio)
|
if (!ost->frame_aspect_ratio)
|
||||||
ost->st->codec->sample_aspect_ratio = picref->video->sample_aspect_ratio;
|
ost->st->codec->sample_aspect_ratio = picref->video->sample_aspect_ratio;
|
||||||
|
|
||||||
do_video_out(of->ctx, ost, filtered_frame,
|
do_video_out(of->ctx, ost, filtered_frame);
|
||||||
same_quant ? ost->last_quality :
|
|
||||||
ost->st->codec->global_quality);
|
|
||||||
break;
|
break;
|
||||||
case AVMEDIA_TYPE_AUDIO:
|
case AVMEDIA_TYPE_AUDIO:
|
||||||
avfilter_copy_buf_props(filtered_frame, picref);
|
avfilter_copy_buf_props(filtered_frame, picref);
|
||||||
@ -1556,7 +1551,6 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output)
|
|||||||
int i, ret = 0, resample_changed;
|
int i, ret = 0, resample_changed;
|
||||||
int64_t best_effort_timestamp;
|
int64_t best_effort_timestamp;
|
||||||
AVRational *frame_sample_aspect;
|
AVRational *frame_sample_aspect;
|
||||||
float quality;
|
|
||||||
|
|
||||||
if (!ist->decoded_frame && !(ist->decoded_frame = avcodec_alloc_frame()))
|
if (!ist->decoded_frame && !(ist->decoded_frame = avcodec_alloc_frame()))
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
@ -1577,8 +1571,6 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
quality = same_quant ? decoded_frame->quality : 0;
|
|
||||||
|
|
||||||
if(ist->top_field_first>=0)
|
if(ist->top_field_first>=0)
|
||||||
decoded_frame->top_field_first = ist->top_field_first;
|
decoded_frame->top_field_first = ist->top_field_first;
|
||||||
|
|
||||||
@ -1631,9 +1623,6 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output)
|
|||||||
int changed = ist->st->codec->width != ist->filters[i]->filter->outputs[0]->w
|
int changed = ist->st->codec->width != ist->filters[i]->filter->outputs[0]->w
|
||||||
|| ist->st->codec->height != ist->filters[i]->filter->outputs[0]->h
|
|| ist->st->codec->height != ist->filters[i]->filter->outputs[0]->h
|
||||||
|| ist->st->codec->pix_fmt != ist->filters[i]->filter->outputs[0]->format;
|
|| ist->st->codec->pix_fmt != ist->filters[i]->filter->outputs[0]->format;
|
||||||
// XXX what an ugly hack
|
|
||||||
if (ist->filters[i]->graph->nb_outputs == 1)
|
|
||||||
ist->filters[i]->graph->outputs[0]->ost->last_quality = quality;
|
|
||||||
|
|
||||||
if (!frame_sample_aspect->num)
|
if (!frame_sample_aspect->num)
|
||||||
*frame_sample_aspect = ist->st->sample_aspect_ratio;
|
*frame_sample_aspect = ist->st->sample_aspect_ratio;
|
||||||
|
2
ffmpeg.h
2
ffmpeg.h
@ -301,7 +301,6 @@ typedef struct OutputStream {
|
|||||||
int top_field_first;
|
int top_field_first;
|
||||||
|
|
||||||
float frame_aspect_ratio;
|
float frame_aspect_ratio;
|
||||||
float last_quality;
|
|
||||||
|
|
||||||
/* forced key frames */
|
/* forced key frames */
|
||||||
int64_t *forced_kf_pts;
|
int64_t *forced_kf_pts;
|
||||||
@ -377,7 +376,6 @@ extern int debug_ts;
|
|||||||
extern int exit_on_error;
|
extern int exit_on_error;
|
||||||
extern int print_stats;
|
extern int print_stats;
|
||||||
extern int qp_hist;
|
extern int qp_hist;
|
||||||
extern int same_quant;
|
|
||||||
extern int stdin_interaction;
|
extern int stdin_interaction;
|
||||||
extern int frame_bits_per_raw_sample;
|
extern int frame_bits_per_raw_sample;
|
||||||
extern AVIOContext *progress_avio;
|
extern AVIOContext *progress_avio;
|
||||||
|
@ -83,7 +83,6 @@ int debug_ts = 0;
|
|||||||
int exit_on_error = 0;
|
int exit_on_error = 0;
|
||||||
int print_stats = 1;
|
int print_stats = 1;
|
||||||
int qp_hist = 0;
|
int qp_hist = 0;
|
||||||
int same_quant = 0;
|
|
||||||
int stdin_interaction = 1;
|
int stdin_interaction = 1;
|
||||||
int frame_bits_per_raw_sample = 0;
|
int frame_bits_per_raw_sample = 0;
|
||||||
|
|
||||||
@ -989,7 +988,7 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
|
|||||||
}
|
}
|
||||||
|
|
||||||
MATCH_PER_STREAM_OPT(qscale, dbl, qscale, oc, st);
|
MATCH_PER_STREAM_OPT(qscale, dbl, qscale, oc, st);
|
||||||
if (qscale >= 0 || same_quant) {
|
if (qscale >= 0) {
|
||||||
st->codec->flags |= CODEC_FLAG_QSCALE;
|
st->codec->flags |= CODEC_FLAG_QSCALE;
|
||||||
st->codec->global_quality = FF_QP2LAMBDA * qscale;
|
st->codec->global_quality = FF_QP2LAMBDA * qscale;
|
||||||
}
|
}
|
||||||
@ -2390,10 +2389,6 @@ const OptionDef options[] = {
|
|||||||
"rate control override for specific intervals", "override" },
|
"rate control override for specific intervals", "override" },
|
||||||
{ "vcodec", OPT_VIDEO | HAS_ARG | OPT_PERFILE, { .func_arg = opt_video_codec },
|
{ "vcodec", OPT_VIDEO | HAS_ARG | OPT_PERFILE, { .func_arg = opt_video_codec },
|
||||||
"force video codec ('copy' to copy stream)", "codec" },
|
"force video codec ('copy' to copy stream)", "codec" },
|
||||||
{ "sameq", OPT_VIDEO | OPT_BOOL | OPT_EXPERT , { &same_quant },
|
|
||||||
"use same quantizer as source (implies VBR)" },
|
|
||||||
{ "same_quant", OPT_VIDEO | OPT_BOOL | OPT_EXPERT, { &same_quant },
|
|
||||||
"use same quantizer as source (implies VBR)" },
|
|
||||||
{ "timecode", OPT_VIDEO | HAS_ARG | OPT_PERFILE, { .func_arg = opt_timecode },
|
{ "timecode", OPT_VIDEO | HAS_ARG | OPT_PERFILE, { .func_arg = opt_timecode },
|
||||||
"set initial TimeCode value.", "hh:mm:ss[:;.]ff" },
|
"set initial TimeCode value.", "hh:mm:ss[:;.]ff" },
|
||||||
{ "pass", OPT_VIDEO | HAS_ARG | OPT_SPEC | OPT_INT, { .off = OFFSET(pass) },
|
{ "pass", OPT_VIDEO | HAS_ARG | OPT_SPEC | OPT_INT, { .off = OFFSET(pass) },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user