[FFmpeg-trac] #8464(undetermined:new): `outpoint` directive of `concat` demuxer may be off by 1 frame
FFmpeg
trac at avcodec.org
Wed Jan 8 01:43:24 EET 2020
#8464: `outpoint` directive of `concat` demuxer may be off by 1 frame
-------------------------------------+-------------------------------------
Reporter: gdgsdg123 | Type: defect
Status: new | Priority: normal
Component: | Version: git-
undetermined | master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
X.txt:
{{{
file 'merge.avi'
inpoint 87.05
outpoint 88.116667
}}}
[[BR]]
{{{
ffmpeg -y -f concat -safe 0 -i "X.txt" -c copy "temp.avi"
}}}
{{{
ffmpeg version git-2020-01-02-81172b5 Copyright (c) 2000-2020 the FFmpeg
developers
built with gcc 9.2.1 (GCC) 20191125
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-
fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-
libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
--enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-
libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
--enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
--enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc
--enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
--enable-amf
libavutil 56. 38.100 / 56. 38.100
libavcodec 58. 65.102 / 58. 65.102
libavformat 58. 35.101 / 58. 35.101
libavdevice 58. 9.102 / 58. 9.102
libavfilter 7. 70.101 / 7. 70.101
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
[avi @ 00000000003ca900] decoding for stream 0 failed
Input #0, concat, from 'X.txt':
Duration: 00:00:01.07, bitrate: 0 kb/s
Stream #0:0: Video: h264 (High 4:4:4 Intra) (H264 / 0x34363248),
gbrp(tv, gbr/unknown/unknown, progressive), 1920x1080, 377584 kb/s, 60
fps, 30 tbr, 60 tbn, 120 tbc
Output #0, avi, to 'temp.avi':
Metadata:
ISFT : Lavf58.35.101
Stream #0:0: Video: h264 (High 4:4:4 Intra) (H264 / 0x34363248),
gbrp(tv, gbr/unknown/unknown, progressive), 1920x1080, q=2-31, 377584
kb/s, 60 fps, 30 tbr, 60 tbn, 60 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[avi @ 00000000003cf100] Timestamps are unset in a packet for stream 0.
This is deprecated and will stop working in the future. Fix your code to
set the timestamps properly
frame= 33 fps=0.0 q=-1.0 Lsize= 96767kB time=00:00:01.08
bitrate=731740.7kbits/s speed=8.74x
video:96760kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.007367%
}}}
The frame at `outpoint` is included, while according to the
[http://ffmpeg.org/ffmpeg-formats.html#concat documentation] it
shouldn't... And the behavior is inconsistent with different timestamp
values.
[[BR]]
[[BR]]
{{{
ffmpeg -ss 87.05 -to 88.116667 -i "merge.avi" -an -c copy "to.avi"
}}}
{{{
ffmpeg version git-2020-01-02-81172b5 Copyright (c) 2000-2020 the FFmpeg
developers
built with gcc 9.2.1 (GCC) 20191125
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-
fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-
libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
--enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-
libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
--enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
--enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc
--enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
--enable-amf
libavutil 56. 38.100 / 56. 38.100
libavcodec 58. 65.102 / 58. 65.102
libavformat 58. 35.101 / 58. 35.101
libavdevice 58. 9.102 / 58. 9.102
libavfilter 7. 70.101 / 7. 70.101
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
[avi @ 00000000006504c0] decoding for stream 0 failed
Input #0, avi, from 'merge.avi':
Metadata:
encoder : Lavf58.29.100
Duration: 00:05:24.67, start: 0.000000, bitrate: 377573 kb/s
Stream #0:0: Video: h264 (High 4:4:4 Intra) (H264 / 0x34363248),
gbrp(tv, gbr/unknown/unknown, progressive), 1920x1080, 377584 kb/s, 60
fps, 30 tbr, 60 tbn, 120 tbc
Output #0, avi, to 'to.avi':
Metadata:
ISFT : Lavf58.35.101
Stream #0:0: Video: h264 (High 4:4:4 Intra) (H264 / 0x34363248),
gbrp(tv, gbr/unknown/unknown, progressive), 1920x1080, q=2-31, 377584
kb/s, 60 fps, 30 tbr, 60 tbn, 60 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[avi @ 000000000315c900] Timestamps are unset in a packet for stream 0.
This is deprecated and will stop working in the future. Fix your code to
set the timestamps properly
frame= 32 fps=0.0 q=-1.0 Lsize= 93969kB time=00:00:01.05
bitrate=733139.1kbits/s speed=9.13x
video:93962kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.007536%
}}}
This approach seemed to produce a reliable output with various `-to`
values tried. (not intensively tested)
[[BR]]
[[BR]]
[[BR]]
[[BR]]
For obvious reason I'm not gonna upload the "merge.avi"... But I believe
the problem can be reproduced with different input and timestamp values.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8464>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list