[FFmpeg-trac] #9775(undetermined:new): incorrect duration when start not zero
FFmpeg
trac at avcodec.org
Mon May 9 19:30:18 EEST 2022
#9775: incorrect duration when start not zero
-------------------------------------+-------------------------------------
Reporter: delpeck | Type: defect
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
I am having a problem with the duration field when I am encoding segments
of a HLS - ffmpeg versions greater than 4.3.3 seem to be writing an
erroneous duration (the start + real duration). Try the following:
//ffprobe attached segment-5.ts results:
Input #0, mpegts, from 'segment-5.ts':
Duration: 00:00:04.03, start: 37.136000, bitrate: 5334 kb/s
//encode segment-5.ts
ffmpeg -i segment-5.ts -copyts -map 0:v -c:v libx264 bbb-seg-enc.mp4
/ffprobe the results:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bbb-seg-enc.mp4':
Duration: 00:00:41.17, start: 37.200000, bitrate: 491 kb/s
//encode segment-5.ts without the -copyts
ffmpeg -threads 3 -i segment-5.ts -sws_flags lanczos -map 0:v -c:v libx264
-pix_fmt yuv420p -profile:v main -level:v 3.1 -preset:v slow -crf 19
-threads 2 -an -strict experimental AVC_576_2pass_nocopyts.mp4 -map 0:a:1?
-vn -codec:a copy -bsf:a aac_adtstoasc -strict experimental aac-
audio-64.mp4
//ffprobe results (notice the duration is correct, but start is zero'd
out)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'AVC_576_2pass.mp4':
Duration: 00:00:04.03, start: 0.000000, bitrate: 8535 kb/s
ffmpeg version 4.3.3 and lower write the correct duration and preserve the
start time, is there anyway to write the correct duration and preserve the
start time with ffmpeg 5.0.1?
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9775>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list