Opened 7 years ago
Last modified 7 years ago
#7306 new defect
Seeking problem: -ss as output parameter at a key frame of a mp4 and -c copy result in droping of video frames
Reported by: | Duan Yao | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | ffmpeg |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
How to reproduce:
% ffmpeg -report -y -i neck5.mp4 -ss 0 -t 1 -c copy neck5-1.mp4 Or % ffmpeg -report -y -i neck5.mp4 -ss 2.36 -t 1 -c copy neck5-1.mp4
The 2 key frames of neck5.mp4 (5s length, 25fps) locate at 0s, 2.36s, respectively.
Expected result: neck5-1.mp4 contains ~1s audio and video.
Actual result: neck5-1.mp4 contains only audio and no video.
To workaround this problem, I have to minus time of key frame by at least 2*pkt_duration_time, i.e. -0.08s:
% ffmpeg -report -y -i neck5.mp4 -ss -0.08 -t 1 -c copy neck5-1.mp4 Or % ffmpeg -report -y -i neck5.mp4 -ss 2.28 -t 1 -c copy neck5-1.mp4
Attachments (5)
Change History (7)
by , 7 years ago
by , 7 years ago
Attachment: | ffmpeg-20180706-212532.log added |
---|
ffmpeg -i neck5.mp4 -ss 0 -t 1 -c copy neck5-1.mp4
by , 7 years ago
Attachment: | ffmpeg-20180706-212524.log added |
---|
ffmpeg -i neck5.mp4 -ss 2.36 -t 1 -c copy neck5-1.mp4
by , 7 years ago
Attachment: | ffmpeg-20180706-212026.log added |
---|
ffmpeg -report -y -i neck5.mp4 -ss 0 -t 1 -c copy neck5-1.mp4
by , 7 years ago
Attachment: | ffmpeg-20180706-212302.log added |
---|
ffmpeg -report -y -i neck5.mp4 -ss 2.36 -t 1 -c copy neck5-1.mp4
comment:1 by , 7 years ago
By the way, -ss as an input parameter doesn't drop frames, but result in much longer duration (3.44s):
ffmpeg -report -y -ss 2.36 -t 1 -i neck5.mp4 -c copy neck5-1.mp4
comment:2 by , 7 years ago
For -ss 2.36
, this is not a regression, I wonder if it is related to B-frames.
neck5.mp4 (input sample)