You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
af_asyncts: add first_pts option
This allows for padding/trimming at the start of stream. By default, no assumption is made about the first frame's expected pts, so no padding or trimming is done.
This commit is contained in:
@@ -205,6 +205,13 @@ adding/dropping samples.
|
|||||||
@item max_comp
|
@item max_comp
|
||||||
Maximum compensation in samples per second.
|
Maximum compensation in samples per second.
|
||||||
|
|
||||||
|
@item first_pts
|
||||||
|
Assume the first pts should be this value.
|
||||||
|
This allows for padding/trimming at the start of stream. By default, no
|
||||||
|
assumption is made about the first frame's expected pts, so no padding or
|
||||||
|
trimming is done. For example, this could be set to 0 to pad the beginning with
|
||||||
|
silence if an audio stream starts after the video stream.
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@section channelsplit
|
@section channelsplit
|
||||||
|
@@ -49,6 +49,7 @@ static const AVOption options[] = {
|
|||||||
{ "min_delta", "Minimum difference between timestamps and audio data "
|
{ "min_delta", "Minimum difference between timestamps and audio data "
|
||||||
"(in seconds) to trigger padding/trimmin the data.", OFFSET(min_delta_sec), AV_OPT_TYPE_FLOAT, { 0.1 }, 0, INT_MAX, A },
|
"(in seconds) to trigger padding/trimmin the data.", OFFSET(min_delta_sec), AV_OPT_TYPE_FLOAT, { 0.1 }, 0, INT_MAX, A },
|
||||||
{ "max_comp", "Maximum compensation in samples per second.", OFFSET(max_comp), AV_OPT_TYPE_INT, { 500 }, 0, INT_MAX, A },
|
{ "max_comp", "Maximum compensation in samples per second.", OFFSET(max_comp), AV_OPT_TYPE_INT, { 500 }, 0, INT_MAX, A },
|
||||||
|
{ "first_pts", "Assume the first pts should be this value.", OFFSET(pts), AV_OPT_TYPE_INT64, { AV_NOPTS_VALUE }, INT64_MIN, INT64_MAX, A },
|
||||||
{ NULL },
|
{ NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -73,8 +74,6 @@ static int init(AVFilterContext *ctx, const char *args)
|
|||||||
}
|
}
|
||||||
av_opt_free(s);
|
av_opt_free(s);
|
||||||
|
|
||||||
s->pts = AV_NOPTS_VALUE;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user