[FFmpeg-user] Conversion to MP4 fails with non-monotonic DTS error

Tobias Rapp t.rapp at noa-archive.com
Fri Sep 11 11:37:03 EEST 2020


On 09.09.2020 11:50, Tobias Rapp wrote:
> [...]
> 
> When looking at the first few audio packets with 
> ffprobe the DTS values seem to be in increasing order:
> 
> [PACKET]
> codec_type=audio
> stream_index=0
> pts=0
> pts_time=0.000000
> dts=0
> dts_time=0.000000
> duration=170
> duration_time=0.170000
> convergence_duration=N/A
> convergence_duration_time=N/A
> size=1366
> pos=93710
> flags=K_
> [/PACKET]
> [PACKET]
> codec_type=audio
> stream_index=0
> pts=128
> pts_time=0.128000
> dts=128
> dts_time=0.128000
> duration=170
> duration_time=0.170000
> convergence_duration=N/A
> convergence_duration_time=N/A
> size=1366
> pos=114110
> flags=K_
> [/PACKET]
> [PACKET]
> codec_type=audio
> stream_index=0
> pts=298
> pts_time=0.298000
> dts=298
> dts_time=0.298000
> duration=170
> duration_time=0.170000
> convergence_duration=N/A
> convergence_duration_time=N/A
> size=1366
> pos=120910
> flags=K_
> [/PACKET]
> [PACKET]
> codec_type=audio
> stream_index=0
> pts=437
> pts_time=0.437000
> dts=437
> dts_time=0.437000
> duration=170
> duration_time=0.170000
> convergence_duration=N/A
> convergence_duration_time=N/A
> size=1366
> pos=134510
> flags=K_
> [/PACKET]
> 
> [...]
> 

The problem seems to be that DTS increases in different steps than what 
is reported in "duration". When I add a filter option string like 
"asetpts=N/SR/TB" the transcoding succeeds but there is a noticeable A/V 
delta of about 2 video frames.

Does anybody know if the wmav2 decoder produces some codec delay and how 
to compensate that?

Regards, Tobias



More information about the ffmpeg-user mailing list