[FFmpeg-trac] #9775(undetermined:new): incorrect duration when start not zero
FFmpeg
trac at avcodec.org
Mon May 9 23:46:27 EEST 2022
#9775: incorrect duration when start not zero
-------------------------------------+-------------------------------------
Reporter: delpeck | Owner: (none)
Type: defect | Status: new
Priority: normal | Component:
| undetermined
Version: unspecified | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Description changed by delpeck:
Old description:
> Hello-
> 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-3.ts results:
> Input #0, mpegts, from 'segment-3.ts':
> Duration: 00:00:07.35, start: 21.512000, bitrate: 1651 kb/s
>
> //encode segment-3.ts
> ffmpeg -i segment-3.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:28.87, start: 21.566016, bitrate: 345 kb/s
>
> //encode segment-3.ts without the -copyts
> ffmpeg -i segment-3.ts -copyts -map 0:v -c:v libx264 bbb-seg-enc2.mp4
>
> //ffprobe results (notice the duration is correct, but start is zero'd
> out)
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bbb-seg-enc.mp4':
> Duration: 00:00:07.30, start: 0.000000, bitrate: 1367 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?
New description:
Hello-
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-3.ts results:
Input #0, mpegts, from 'segment-3.ts':
Duration: 00:00:07.35, start: 21.512000, bitrate: 1651 kb/s
//encode segment-3.ts
ffmpeg -i segment-3.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:28.87, start: 21.566016, bitrate: 345 kb/s
//encode segment-3.ts without the -copyts
ffmpeg -i segment-3.ts -map 0:v -c:v libx264 bbb-seg-enc2.mp4
//ffprobe results (notice the duration is correct, but start is zero'd
out)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bbb-seg-enc.mp4':
Duration: 00:00:07.30, start: 0.000000, bitrate: 1367 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#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list