Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#8924 closed defect (needs_more_info)

Concat demuxer shifts video stream start time

Reported by: Yuanjing Zhao Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

After processing an mp4 file with the concat demuxer and using -c copy flag, the start_pts and start_time of the output file becomes shifted. This causes the output file to initially display a blank frame when it is first opened.

Ffmpeg version used:

ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with Apple clang version 11.0.3 (clang-1103.0.32.62)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
libavutil      56. 51.100 / 56. 51.100
libavcodec     58. 91.100 / 58. 91.100
libavformat    58. 45.100 / 58. 45.100
libavdevice    58. 10.100 / 58. 10.100
libavfilter     7. 85.100 /  7. 85.100
libavresample   4.  0.  0 /  4.  0.  0
libswscale      5.  7.100 /  5.  7.100
libswresample   3.  7.100 /  3.  7.100
libpostproc    55.  7.100 / 55.  7.100

How to reproduce:

Given an mp4 file containing video and audio stream before.mp4

Run command ffprobe before.mp4 -show_streams, observe that video stream start_time and start_pts are 0.

Given a txt file concat.txt with content:

file before.mp4

Run command ffmpeg -f concat -i concat.txt concat.mp4

Run command ffprobe concat.mp4 -show_streams, observe that video stream start_pts and start_time are now non-zero.

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Attachments (5)

before.mp4 (792.5 KB ) - added by Yuanjing Zhao 3 years ago.
Input file to concat demuxer
concat.txt (16 bytes ) - added by Yuanjing Zhao 3 years ago.
configuration file for concat demuxer
concat.mp4 (792.6 KB ) - added by Yuanjing Zhao 3 years ago.
output file of concat demuxer
before.info (1.9 KB ) - added by Yuanjing Zhao 3 years ago.
ffprobe -show_streams output for before.mp4
concat.info (1.9 KB ) - added by Yuanjing Zhao 3 years ago.
ffprobe -show_streams output for concat.mp4

Download all attachments as: .zip

Change History (8)

by Yuanjing Zhao, 3 years ago

Attachment: before.mp4 added

Input file to concat demuxer

by Yuanjing Zhao, 3 years ago

Attachment: concat.txt added

configuration file for concat demuxer

by Yuanjing Zhao, 3 years ago

Attachment: concat.mp4 added

output file of concat demuxer

by Yuanjing Zhao, 3 years ago

Attachment: before.info added

ffprobe -show_streams output for before.mp4

by Yuanjing Zhao, 3 years ago

Attachment: concat.info added

ffprobe -show_streams output for concat.mp4

comment:1 by Yuanjing Zhao, 3 years ago

Resolution: needs_more_info
Status: newclosed

comment:2 by Cigaes, 3 years ago

ffmpeg sets the start PTS to 0 by default, this is not related to the concat demuxer. See -copyts.

comment:3 by Carl Eugen Hoyos, 3 years ago

Keywords: concat demuxer start_pts start_time shift removed
Note: See TracTickets for help on using tickets.