* [FFmpeg-devel] [PATCH 1/5] lavfi/vf_framepack: properly set output duration for framesequence output
@ 2022-10-11 9:54 Anton Khirnov
2022-10-11 9:54 ` [FFmpeg-devel] [PATCH 2/5] lavfi/vf_deinterlace_qsv: set output frame durations Anton Khirnov
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Anton Khirnov @ 2022-10-11 9:54 UTC (permalink / raw)
To: ffmpeg-devel
Output has to be CFR in this case.
---
libavfilter/vf_framepack.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavfilter/vf_framepack.c b/libavfilter/vf_framepack.c
index f30909ccff..6ea88df8b2 100644
--- a/libavfilter/vf_framepack.c
+++ b/libavfilter/vf_framepack.c
@@ -329,8 +329,10 @@ static int try_push_frame(AVFilterContext *ctx)
for (i = 0; i < 2; i++) {
// set correct timestamps
- if (pts != AV_NOPTS_VALUE)
+ if (pts != AV_NOPTS_VALUE) {
s->input_views[i]->pts = i == 0 ? pts * 2 : pts * 2 + av_rescale_q(1, av_inv_q(outlink->frame_rate), outlink->time_base);
+ s->input_views[i]->duration = av_rescale_q(1, av_inv_q(outlink->frame_rate), outlink->time_base);
+ }
// set stereo3d side data
stereo = av_stereo3d_create_side_data(s->input_views[i]);
--
2.35.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 5+ messages in thread
* [FFmpeg-devel] [PATCH 2/5] lavfi/vf_deinterlace_qsv: set output frame durations
2022-10-11 9:54 [FFmpeg-devel] [PATCH 1/5] lavfi/vf_framepack: properly set output duration for framesequence output Anton Khirnov
@ 2022-10-11 9:54 ` Anton Khirnov
2022-10-11 9:54 ` [FFmpeg-devel] [PATCH 3/5] lavfi/vf_frei0r: set frame durations for frei0r_src Anton Khirnov
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Anton Khirnov @ 2022-10-11 9:54 UTC (permalink / raw)
To: ffmpeg-devel
---
libavfilter/vf_deinterlace_qsv.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavfilter/vf_deinterlace_qsv.c b/libavfilter/vf_deinterlace_qsv.c
index 3065d6ac95..98ed7283ad 100644
--- a/libavfilter/vf_deinterlace_qsv.c
+++ b/libavfilter/vf_deinterlace_qsv.c
@@ -516,6 +516,11 @@ static int process_frame(AVFilterContext *ctx, const AVFrame *in,
out->pts++;
s->last_pts = out->pts;
+ if (outlink->frame_rate.num && outlink->frame_rate.den)
+ out->duration = av_rescale_q(1, av_inv_q(outlink->frame_rate), outlink->time_base);
+ else
+ out->duration = 0;
+
ret = ff_filter_frame(outlink, out);
if (ret < 0)
return ret;
--
2.35.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 5+ messages in thread
* [FFmpeg-devel] [PATCH 3/5] lavfi/vf_frei0r: set frame durations for frei0r_src
2022-10-11 9:54 [FFmpeg-devel] [PATCH 1/5] lavfi/vf_framepack: properly set output duration for framesequence output Anton Khirnov
2022-10-11 9:54 ` [FFmpeg-devel] [PATCH 2/5] lavfi/vf_deinterlace_qsv: set output frame durations Anton Khirnov
@ 2022-10-11 9:54 ` Anton Khirnov
2022-10-11 9:54 ` [FFmpeg-devel] [PATCH 4/5] lavfi/vf_minterpolate: set output frame durations Anton Khirnov
2022-10-11 9:54 ` [FFmpeg-devel] [PATCH 5/5] lavfi/src_avsynctest: set video " Anton Khirnov
3 siblings, 0 replies; 5+ messages in thread
From: Anton Khirnov @ 2022-10-11 9:54 UTC (permalink / raw)
To: ffmpeg-devel
This source produces CFR output.
---
libavfilter/vf_frei0r.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c
index 1e01114b76..66351d6678 100644
--- a/libavfilter/vf_frei0r.c
+++ b/libavfilter/vf_frei0r.c
@@ -488,6 +488,7 @@ static int source_request_frame(AVFilterLink *outlink)
frame->sample_aspect_ratio = (AVRational) {1, 1};
frame->pts = s->pts++;
+ frame->duration = 1;
s->update(s->instance, av_rescale_q(frame->pts, s->time_base, (AVRational){1,1000}),
NULL, (uint32_t *)frame->data[0]);
--
2.35.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 5+ messages in thread
* [FFmpeg-devel] [PATCH 4/5] lavfi/vf_minterpolate: set output frame durations
2022-10-11 9:54 [FFmpeg-devel] [PATCH 1/5] lavfi/vf_framepack: properly set output duration for framesequence output Anton Khirnov
2022-10-11 9:54 ` [FFmpeg-devel] [PATCH 2/5] lavfi/vf_deinterlace_qsv: set output frame durations Anton Khirnov
2022-10-11 9:54 ` [FFmpeg-devel] [PATCH 3/5] lavfi/vf_frei0r: set frame durations for frei0r_src Anton Khirnov
@ 2022-10-11 9:54 ` Anton Khirnov
2022-10-11 9:54 ` [FFmpeg-devel] [PATCH 5/5] lavfi/src_avsynctest: set video " Anton Khirnov
3 siblings, 0 replies; 5+ messages in thread
From: Anton Khirnov @ 2022-10-11 9:54 UTC (permalink / raw)
To: ffmpeg-devel
This filter produces CFR output.
---
libavfilter/vf_minterpolate.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavfilter/vf_minterpolate.c b/libavfilter/vf_minterpolate.c
index 97d0e96c59..f2de61ca39 100644
--- a/libavfilter/vf_minterpolate.c
+++ b/libavfilter/vf_minterpolate.c
@@ -1189,6 +1189,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *avf_in)
av_frame_copy_props(avf_out, mi_ctx->frames[NB_FRAMES - 1].avf);
avf_out->pts = mi_ctx->out_pts++;
+ avf_out->duration = 1;
interpolate(inlink, avf_out);
--
2.35.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 5+ messages in thread
* [FFmpeg-devel] [PATCH 5/5] lavfi/src_avsynctest: set video frame durations
2022-10-11 9:54 [FFmpeg-devel] [PATCH 1/5] lavfi/vf_framepack: properly set output duration for framesequence output Anton Khirnov
` (2 preceding siblings ...)
2022-10-11 9:54 ` [FFmpeg-devel] [PATCH 4/5] lavfi/vf_minterpolate: set output frame durations Anton Khirnov
@ 2022-10-11 9:54 ` Anton Khirnov
3 siblings, 0 replies; 5+ messages in thread
From: Anton Khirnov @ 2022-10-11 9:54 UTC (permalink / raw)
To: ffmpeg-devel
This filter produces CFR video output.
---
libavfilter/src_avsynctest.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavfilter/src_avsynctest.c b/libavfilter/src_avsynctest.c
index c78e517ac3..78e4a2ba50 100644
--- a/libavfilter/src_avsynctest.c
+++ b/libavfilter/src_avsynctest.c
@@ -348,6 +348,7 @@ static int video_frame(AVFilterLink *outlink)
}
out->pts = s->vpts++;
+ out->duration = 1;
return ff_filter_frame(outlink, out);
}
--
2.35.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-10-11 9:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-11 9:54 [FFmpeg-devel] [PATCH 1/5] lavfi/vf_framepack: properly set output duration for framesequence output Anton Khirnov
2022-10-11 9:54 ` [FFmpeg-devel] [PATCH 2/5] lavfi/vf_deinterlace_qsv: set output frame durations Anton Khirnov
2022-10-11 9:54 ` [FFmpeg-devel] [PATCH 3/5] lavfi/vf_frei0r: set frame durations for frei0r_src Anton Khirnov
2022-10-11 9:54 ` [FFmpeg-devel] [PATCH 4/5] lavfi/vf_minterpolate: set output frame durations Anton Khirnov
2022-10-11 9:54 ` [FFmpeg-devel] [PATCH 5/5] lavfi/src_avsynctest: set video " Anton Khirnov
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git