Opened 3 years ago

Last modified 3 years ago

#9013 reopened defect

mpeg4 pts values are not reordered when decoding

Reported by: malaterre Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: asp mkv
Cc: Marton Balint Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

The truncated movie should display nice and smooth using mpv:

% mpv bb2_an2500_copy.mkv

Watch closely as snow falls, or as the scene moves up the cascade. Now try with ffplay

% ffplay bb2_an2500_copy.mkv

The movie display with tiny stop-and-go. In particular the snow does not fall as smoothly as with mpv, same goes for cascade which display with tiny freeze.

Attachments (1)

bb2_an2500_copy.mkv (2.4 MB ) - added by malaterre 3 years ago.

Change History (8)

by malaterre, 3 years ago

Attachment: bb2_an2500_copy.mkv added

comment:1 by malaterre, 3 years ago

Version: 4.1.4git-master

Using instructions from:

I am able to reproduce the bug using:

 ./ffplay -version                
ffplay version N-100064-g3c92268 Copyright (c) 2003-2020 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --prefix=/home/mathieu/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/mathieu/ffmpeg_build/include --extra-ldflags=-L/home/mathieu/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/home/mathieu/bin --enable-gpl --enable-gnutls --disable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --disable-libsvtav1 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
libavutil      56. 61.100 / 56. 61.100
libavcodec     58.113.100 / 58.113.100
libavformat    58. 64.100 / 58. 64.100
libavdevice    58. 11.103 / 58. 11.103
libavfilter     7. 91.100 /  7. 91.100
libswscale      5.  8.100 /  5.  8.100
libswresample   3.  8.100 /  3.  8.100
libpostproc    55.  8.100 / 55.  8.100

comment:2 by Balling, 3 years ago

That happens because by default mpv does not have interpolation at all. And of course, if you display is G-sync, without interpolation it will switch to native frame rate of 25.000 progressive. Ffplay also supports G-sync, but I am not so sure how good does it work. See this discussion https://github.com/mpv-player/mpv/issues/6137

Last edited 3 years ago by Balling (previous) (diff)

comment:3 by Marton Balint, 3 years ago

Cc: Marton Balint added
Component: ffplayundetermined

Timestamps of the decoded frames are wrong and not reordered properly for some reason, so this is not an ffplay bug...

E.g.

ffprobe bb2_an2500_copy.mkv -of xml -show_frames -show_entries frame=best_effort_timestamp_time | grep best
        <frame best_effort_timestamp_time="0.000000">
        <frame best_effort_timestamp_time="0.080000">
        <frame best_effort_timestamp_time="0.040000">
        <frame best_effort_timestamp_time="0.160000">
        <frame best_effort_timestamp_time="0.120000">

in reply to:  2 comment:4 by malaterre, 3 years ago

Component: undeterminedffplay
Resolution: wontfix
Status: newclosed

Replying to Balling:

That happens because by default mpv does not have interpolation at all. And of course, if you display is G-sync, without interpolation it will switch to native frame rate of 25.000 progressive. Ffplay also supports G-sync, but I am not so sure how good does it work. See this discussion https://github.com/mpv-player/mpv/issues/6137

Indeed applying suggestion from:

as:

$ ffmpeg -i bb2_an2500_copy.mkv -filter:v  fps=fps=60 bb2_an2500_copy_60.mkv

does solve the symptoms, at least on my side. I'll close the issue as wontfix.

comment:5 by Marton Balint, 3 years ago

Component: ffplayundetermined
Resolution: wontfix
Status: closedreopened
Summary: ffplay: Stop-and-go display / mpeg4mpeg4 pts values are not reordered when decoding

No, this looks like a real bug with mpeg4 pts values, so reponeded it with updated description.

comment:6 by Balling, 3 years ago

So it should have reordered the frames
1, 3;
2, 5;
4, 7;
6, 9; ...

Really? Apparently mpv does "mkv: Discarding potentially broken or useless index" while ffplay does not do it, so the file is just broken. LOL.

comment:7 by Carl Eugen Hoyos, 3 years ago

Keywords: asp mkv added
Note: See TracTickets for help on using tickets.