[FFmpeg-trac] #7662(avfilter:new): When using video filter fps, provide an option to retain actual pts, and pts_time for frames
FFmpeg
trac at avcodec.org
Thu Jan 10 11:48:45 EET 2019
#7662: When using video filter fps, provide an option to retain actual pts, and
pts_time for frames
------------------------------------+------------------------------------
Reporter: vishal733 | Owner:
Type: defect | Status: new
Priority: normal | Component: avfilter
Version: git-master | Resolution:
Keywords: fps | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+------------------------------------
Comment (by vishal733):
So here is what I'm asking.
Say fps=2 is set
(1) Original frames (all of them):
{{{
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 0 pts: 12012 pts_time:0.125125
pos: 2753847
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 1 pts: 16016 pts_time:0.166833
pos: 2754781
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 2 pts: 20020 pts_time:0.208542
pos: 2754812
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 3 pts: 24024 pts_time:0.25025
pos: 2754843
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 4 pts: 28028 pts_time:0.291958
pos: 2754874
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 5 pts: 32032 pts_time:0.333667
pos: 2754905
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 6 pts: 36036 pts_time:0.375375
pos: 2754936
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 7 pts: 40040 pts_time:0.417083
pos: 2754967
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 8 pts: 44044 pts_time:0.458792
pos: 2754998
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 9 pts: 48048 pts_time:0.5005
pos: 2754750
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 10 pts: 52052 pts_time:0.542208
pos: 2755029
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 11 pts: 56056 pts_time:0.583917
pos: 2755345
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 12 pts: 60060 pts_time:0.625625
pos: 2755376
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 13 pts: 64064 pts_time:0.667333
pos: 2755407
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 14 pts: 68068 pts_time:0.709042
pos: 2755438
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 15 pts: 72072 pts_time:0.75075
pos: 2755469
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 16 pts: 76076 pts_time:0.792458
pos: 2755500
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 17 pts: 80080 pts_time:0.834167
pos: 2754718
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 18 pts: 84084 pts_time:0.875875
pos: 2755600
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 19 pts: 88088 pts_time:0.917583
pos: 2755631
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 20 pts: 92092 pts_time:0.959292
pos: 2755662
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 21 pts: 96096 pts_time:1.001
pos: 2755933
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 22 pts: 100100 pts_time:1.04271
pos: 2755964
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 23 pts: 104104 pts_time:1.08442
pos: 2755995
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 24 pts: 108108 pts_time:1.12613
pos: 2756026
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 25 pts: 112112 pts_time:1.16783
pos: 2756057
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 26 pts: 116116 pts_time:1.20954
pos: 2755568
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 27 pts: 120120 pts_time:1.25125
pos: 2756088
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 28 pts: 124124 pts_time:1.29296
pos: 2756119
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 29 pts: 128128 pts_time:1.33467
pos: 2756150
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 30 pts: 132132 pts_time:1.37637
pos: 2756181
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 31 pts: 136136 pts_time:1.41808
pos: 2756212
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 32 pts: 140140 pts_time:1.45979
pos: 2756243
[Parsed_showinfo_2 @ 0x7f9cbd601380] n: 33 pts: 144144 pts_time:1.5015
pos: 2756516
}}}
(2) Current output after passing through fps=2 filter:
{{{
[Parsed_showinfo_4 @ 0x7f9cbd601c00] n: 0 pts: 0 pts_time:0
pos: 2754812
[Parsed_showinfo_4 @ 0x7f9cbd601c00] n: 1 pts: 1 pts_time:0.5
pos: 2755438
[Parsed_showinfo_4 @ 0x7f9cbd601c00] n: 2 pts: 2 pts_time:1
pos: 2755568
}}}
(3) Desired out I'm asking for (via some configuration) fps=2 filter :
{{{
[Parsed_showinfo_4 @ 0x7f9cbd601c00] n: 0 pts: 20020
pts_time:0.208542 pos: 2754812
[Parsed_showinfo_4 @ 0x7f9cbd601c00] n: 1 pts: 68068
pts_time:0.709042 pos: 2755438
[Parsed_showinfo_4 @ 0x7f9cbd601c00] n: 2 pts: 116116
pts_time:1.20954 pos: 2755568
}}}
(2) Is the current output. And is at 2fps(cfr)
(3) is my desired output. And what I'm calling 2fps(vfr).
Difference between (2), and (3) is that in (3) the pts_time is unaltered.
But (3) is effectively still at 2fps (vfr).
While (3) can be achieved even now (-r option), but it's not possible to
apply any video filters afer doing a -r.
Let me know what you think now..
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7662#comment:6>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list