Conversion to MP4 fails with non-monotonic DTS error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Conversion to MP4 fails with non-monotonic DTS error

Tobias Rapp-2
Hello list,

when I try to convert the audio stream of a WMV input file to MP4/AAC an
error "non-monotonous DTS in output stream" is raised.

FFmpeg command line:
$ ffmpeg -i INPUT_FILE.wmv -f mp4 -map 0:a -codec:a aac -b:a 128k \
    -t 1.0 -y OUTPUT_FILE.mp4 -loglevel +debug -xerror -nostdin -nostats

Console output see attached log file.

Adding "-fflags +igndts" to input or output context does not seem to
make any difference. 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]

Is there any CLI option to work-around the DTS issue?

Regards,
Tobias

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

preview-test01.log (9K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Conversion to MP4 fails with non-monotonic DTS error

Tobias Rapp-2
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

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".