[FFmpeg-trac] #7306(ffmpeg:new): Seeking problem: -ss as output parameter at a key frame of a mp4 and -c copy result in droping of video frames

FFmpeg trac at avcodec.org
Fri Jul 6 16:59:29 EEST 2018


#7306: Seeking problem: -ss as output parameter at a key frame of a mp4 and -c
copy result in droping of video frames
---------------------------------+--------------------------------------
             Reporter:  duanyao  |                     Type:  defect
               Status:  new      |                 Priority:  normal
            Component:  ffmpeg   |                  Version:  git-master
             Keywords:           |               Blocked By:
             Blocking:           |  Reproduced by developer:  0
Analyzed by developer:  0        |
---------------------------------+--------------------------------------
 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
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7306>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list