[FFmpeg-trac] #10159(undetermined:new): filter trim/concat with single frames not working correctly
FFmpeg
trac at avcodec.org
Sat Jan 28 22:31:52 EET 2023
#10159: filter trim/concat with single frames not working correctly
-------------------------------------+-------------------------------------
Reporter: hoby87 | Owner: (none)
Type: defect | Status: new
Priority: normal | Component:
| undetermined
Version: git-master | Resolution:
Keywords: filter trim | Blocked By:
concat |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Description changed by hoby87:
Old description:
> Summary of the bug: using the filters trim and concat, where trim selects
> single frames and concat should join them, there is an error that only 3
> frames are joined, more are omitted. With selecting more than one frame
> with each trim the problem vanishes. I get the result from the current
> git master windows build. Also older linux builds (4.4) give this result.
> Regardless of the number of trim filter, if they (all) select a single
> frame, the result is 3 frames in the output. The problem is also present
> when selecting single and multiple frames with trim.
>
> How to reproduce (first command selects 5x1 frames, resulting in 3 frames
> in output, second command selects 5x2 frames, resulting in 10 frames):
> {{{
> ffmpeg.exe -report -v 9 -loglevel 99 -i MVI_6289.MOV -filter_complex
> "[0:v]trim=start=3.72:end=3.76,setpts=PTS-
> STARTPTS,format=yuvj420p[1v];[0:v]trim=start=4.04:end=4.08,setpts=PTS-
> STARTPTS,format=yuvj420p[2v];[0:v]trim=start=4.12:end=4.16,setpts=PTS-
> STARTPTS,format=yuvj420p[3v];[0:v]trim=start=4.24:end=4.28,setpts=PTS-
> STARTPTS,format=yuvj420p[4v];[0:v]trim=start=4.32:end=4.36,setpts=PTS-
> STARTPTS,format=yuvj420p[5v];[1v][2v][3v][4v][5v]concat=n=5:v=1[v]" -map
> "[v]" MVI_6289.out.MOV
>
> ffmpeg.exe -report -v 9 -loglevel 99 -i MVI_6289.MOV -filter_complex
> "[0:v]trim=start=3.72:end=3.80,setpts=PTS-
> STARTPTS,format=yuvj420p[1v];[0:v]trim=start=4.04:end=4.12,setpts=PTS-
> STARTPTS,format=yuvj420p[2v];[0:v]trim=start=4.12:end=4.20,setpts=PTS-
> STARTPTS,format=yuvj420p[3v];[0:v]trim=start=4.24:end=4.32,setpts=PTS-
> STARTPTS,format=yuvj420p[4v];[0:v]trim=start=4.32:end=4.40,setpts=PTS-
> STARTPTS,format=yuvj420p[5v];[1v][2v][3v][4v][5v]concat=n=5:v=1[v]" -map
> "[v]" MVI_6289.out.MOV
> }}}
New description:
Summary of the bug: using the filters trim and concat, where trim selects
single frames and concat should join them, there is an error that only 3
frames are joined, more are omitted. With selecting more than one frame
with each trim the problem vanishes. I get the result from the current git
master windows build. Also older linux builds (4.4) give this result.
Regardless of the number of trim filter, if they (all) select a single
frame, the result is 3 frames in the output. The problem is also present
when selecting single and multiple frames with trim.
Edit: I just see, that ffmpeg is dropping the missing frames, as mentioned
in the log file, but why? Is my command incorrect?
How to reproduce (first command selects 5x1 frames, resulting in 3 frames
in output, second command selects 5x2 frames, resulting in 10 frames):
{{{
ffmpeg.exe -report -v 9 -loglevel 99 -i MVI_6289.MOV -filter_complex
"[0:v]trim=start=3.72:end=3.76,setpts=PTS-
STARTPTS,format=yuvj420p[1v];[0:v]trim=start=4.04:end=4.08,setpts=PTS-
STARTPTS,format=yuvj420p[2v];[0:v]trim=start=4.12:end=4.16,setpts=PTS-
STARTPTS,format=yuvj420p[3v];[0:v]trim=start=4.24:end=4.28,setpts=PTS-
STARTPTS,format=yuvj420p[4v];[0:v]trim=start=4.32:end=4.36,setpts=PTS-
STARTPTS,format=yuvj420p[5v];[1v][2v][3v][4v][5v]concat=n=5:v=1[v]" -map
"[v]" MVI_6289.out.MOV
ffmpeg.exe -report -v 9 -loglevel 99 -i MVI_6289.MOV -filter_complex
"[0:v]trim=start=3.72:end=3.80,setpts=PTS-
STARTPTS,format=yuvj420p[1v];[0:v]trim=start=4.04:end=4.12,setpts=PTS-
STARTPTS,format=yuvj420p[2v];[0:v]trim=start=4.12:end=4.20,setpts=PTS-
STARTPTS,format=yuvj420p[3v];[0:v]trim=start=4.24:end=4.32,setpts=PTS-
STARTPTS,format=yuvj420p[4v];[0:v]trim=start=4.32:end=4.40,setpts=PTS-
STARTPTS,format=yuvj420p[5v];[1v][2v][3v][4v][5v]concat=n=5:v=1[v]" -map
"[v]" MVI_6289.out.MOV
}}}
--
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10159#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list