Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#7913 closed defect (invalid)

Muxing SVT-AV1 output via -vcodec copy into webm resulted in badly seekable files

Reported by: Andrew-R Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mkv av1
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug: remuxing AV1 video into webm/mp4 resulted in badly seekable file
How to reproduce:

% ffmpeg -i ../out-1.ivy -vcodec copy -v verbose ../av1_svt_0.5_1000frames.webm

ffmpeg version N-92713-gfbdb3aa179
built on May, 20 2019

attempt at seeking in resulted file in ffplay (arrow key up) resulted in

./ffplay ../av1_svt_0.5_1000frames.webm
ffplay version N-92713-gfbdb3aa179 Copyright (c) 2003-2019 the FFmpeg developers

built with gcc 5.5.0 (GCC)
configuration: --enable-libdav1d
libavutil 56. 28.100 / 56. 28.100
libavcodec 58. 52.101 / 58. 52.101
libavformat 58. 27.103 / 58. 27.103
libavdevice 58. 7.100 / 58. 7.100
libavfilter 7. 53.101 / 7. 53.101
libswscale 5. 4.101 / 5. 4.101
libswresample 3. 4.100 / 3. 4.100

[libdav1d @ 0xf0102840] libdav1d 0.3.1 vq= 0KB sq= 0B f=0/0
Input #0, matroska,webm, from '../av1_svt_0.5_1000frames.webm':/0

Metadata:

ENCODER : Lavf58.27.103

Duration: 00:00:33.33, start: 0.000000, bitrate: 2885 kb/s

Stream #0:0: Video: av1 (Main), yuv420p(tv), 1280x720, SAR 1:1 DAR 16:9, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)
Metadata:

DURATION : 00:00:33.333000000

[libdav1d @ 0xf0103400] libdav1d 0.3.1
[matroska,webm @ 0xf01004c0] Element at 0xb76f83 ending at 0xb76f94 exceeds containing master element ending at 0xb76f7e
[matroska,webm @ 0xf01004c0] Element at 0xb76f83 ending at 0xb76f94 exceeds containing master element ending at 0xb76f7e

Last message repeated 2 times

../av1_svt_0.5_1000frames.webm: error while seeking
[matroska,webm @ 0xf01004c0] Element at 0xb76f83 ending at 0xb76f94 exceeds containing master element ending at 0xb76f7e

Last message repeated 1 times

[matroska,webm @ 0xf01004c0] Element at 0xb76f83 ending at 0xb76f94 exceeds containing master element ending at 0xb76f7e

Last message repeated 1 times

../av1_svt_0.5_1000frames.webm: error while seeking
[matroska,webm @ 0xf01004c0] Element at 0xb76f83 ending at 0xb76f94 exceeds containing master element ending at 0xb76f7e
[matroska,webm @ 0xf01004c0] Element at 0xb76f83 ending at 0xb76f94 exceeds containing master element ending at 0xb76f7e
[matroska,webm @ 0xf01004c0] Element at 0xb76f83 ending at 0xb76f94 exceeds containing master element ending at 0xb76f7e

Last message repeated 1 times

[matroska,webm @ 0xf01004c0] Element at 0xb76f83 ending at 0xb76f94 exceeds containing master element ending at 0xb76f7e
[matroska,webm @ 0xf01004c0] Element at 0xb76f83 ending at 0xb76f94 exceeds containing master element ending at 0xb76f7e
../av1_svt_0.5_1000frames.webm: error while seeking
[matroska,webm @ 0xf01004c0] Element at 0xb76f83 ending at 0xb76f94 exceeds containing master element ending at 0xb76f7e

Last message repeated 1 times

[matroska,webm @ 0xf01004c0] Element at 0xb76f83 ending at 0xb76f94 exceeds containing master element ending at 0xb76f7e

Last message repeated 1 times

../av1_svt_0.5_1000frames.webm: error while seeking

3.94 M-V: 0.009 fd= 6 aq= 0KB vq= 0KB sq= 0B f=0/0

/ffprobe ../out-1.ivy
ffprobe version N-92713-gfbdb3aa179 Copyright (c) 2007-2019 the FFmpeg developers

built with gcc 5.5.0 (GCC)
configuration: --enable-libdav1d
libavutil 56. 28.100 / 56. 28.100
libavcodec 58. 52.101 / 58. 52.101
libavformat 58. 27.103 / 58. 27.103
libavdevice 58. 7.100 / 58. 7.100
libavfilter 7. 53.101 / 7. 53.101
libswscale 5. 4.101 / 5. 4.101
libswresample 3. 4.100 / 3. 4.100

[libdav1d @ 0xb2e8b40] libdav1d 0.3.1
Input #0, ivf, from '../out-1.ivy':

Duration: N/A, start: 0.000000, bitrate: N/A

Stream #0:0: Video: av1 (Main) (AV01 / 0x31305641), yuv420p(tv), 1280x720, 30 tbr, 30 tbn, 30 tbc

[libdav1d @ 0xb331040] libdav1d 0.3.1

File was created by using this command line (in 64-bit Slackware 14.2):

ffmpeg -i /home/guest/20160802_185428.MOV -nostdin -f rawvideo -pix_fmt yuv420p - | ./SvtAv1EncApp -i stdin -n 1000 -w 1280 -h 720 -b out-1.ivy

where SVT-AV1 encoder was compiled from just released 0.5.0 sources.

Change History (9)

comment:1 by James, 3 years ago

Can you provide the out-1.ivy sample? Or any other that works to reproduce this.

in reply to:  1 comment:2 by Andrew-R, 3 years ago

Replying to jamrial:

Can you provide the out-1.ivy sample? Or any other that works to reproduce this.

https://yadi.sk/d/qu7qMKRB5M-9Eg

(12 Mb, sha256sum 27f78168c046df042bacffe0349da1352ac383ccf147578083e3a4a56877defc out-1.ivy )

Last edited 3 years ago by Andrew-R (previous) (diff)

comment:3 by Carl Eugen Hoyos, 3 years ago

Keywords: mov av1 added

comment:4 by James, 3 years ago

Component: undeterminedavformat
Keywords: mkv added; mov removed

The issue, if any, is not in the muxer but in the demuxer instead. Using mkvtoolnix to remux the sample creates a matroska file with the same issues during seeking. The "Element exceeds containing master element" spam is unrelated.

out-1.ivy has a single keyframe, and both libavformat and mkvtoolnix create a single Cue element for it. I'm not sure if our demuxer and/or ffplay is capable of seeking to arbitrary positions without cues, so that may be the problem. A sample with a single key frame in any case will not get smooth seeking on anything.

comment:5 by Andrew-R, 3 years ago

https://yadi.sk/d/y_MMRKxzqbEJ1w - out-3.ivy, encoded with "-intra-period 30 -irefresh-type 2" as suggested at https://github.com/OpenVisualCloud/SVT-AV1/issues/257

sha256sum out-3.ivy

d8b643c3e33cbc7cf02d0fa467140d42ede1ce177e7ac675d5483ba844e7e1ca

It was remuxed by ffmpeg
./ffmpeg -i ../out-3.ivy -vcodec copy -v verbose ../av1_svt_0.5_1000frames-3.web

and after this my test application (https://www.cinelerra-gg.org/bugtracker/view.php?id=214 - see here my hack for dav1d decode) play resulted webm correctly (even backward), and can seek without problems.

ffplay still gives errors at seeking attempt:

/ffplay ../av1_svt_0.5_1000frames-3.webm
ffplay version N-92713-gfbdb3aa179 Copyright (c) 2003-2019 the FFmpeg developers

built with gcc 5.5.0 (GCC)
configuration: --enable-libdav1d
libavutil 56. 28.100 / 56. 28.100
libavcodec 58. 52.101 / 58. 52.101
libavformat 58. 27.103 / 58. 27.103
libavdevice 58. 7.100 / 58. 7.100
libavfilter 7. 53.101 / 7. 53.101
libswscale 5. 4.101 / 5. 4.101
libswresample 3. 4.100 / 3. 4.100

[libdav1d @ 0xf0102980] libdav1d 0.3.1
Input #0, matroska,webm, from '../av1_svt_0.5_1000frames-3.webm':

Metadata:

ENCODER : Lavf58.27.103

Duration: 00:00:33.33, start: 0.000000, bitrate: 3080 kb/s

Stream #0:0: Video: av1 (Main), yuv420p(tv), 1280x720, SAR 1:1 DAR 16:9, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)
Metadata:

DURATION : 00:00:33.333000000

[libdav1d @ 0xf0103580] libdav1d 0.3.1
[matroska,webm @ 0xf01004c0] Element at 0xc3d73e ending at 0xc3d9af exceeds containing master element ending at 0xc3d738

Last message repeated 3 times

[matroska,webm @ 0xf01004c0] Element at 0xc3d73e ending at 0xc3d9af exceeds containing master element ending at 0xc3d738

Last message repeated 3 times

../av1_svt_0.5_1000frames-3.webm: error while seeking
[matroska,webm @ 0xf01004c0] Element at 0xc3d73e ending at 0xc3d9af exceeds containing master element ending at 0xc3d738

Last message repeated 3 times

../av1_svt_0.5_1000frames-3.webm: error while seeking
[matroska,webm @ 0xf01004c0] Element at 0xc3d73e ending at 0xc3d9af exceeds containing master element ending at 0xc3d738

Last message repeated 3 times

[matroska,webm @ 0xf01004c0] Element at 0xc3d73e ending at 0xc3d9af exceeds containing master element ending at 0xc3d738

Last message repeated 3 times

../av1_svt_0.5_1000frames-3.webm: error while seeking
[matroska,webm @ 0xf01004c0] Element at 0xc3d73e ending at 0xc3d9af exceeds containing master element ending at 0xc3d738

Last message repeated 3 times

../av1_svt_0.5_1000frames-3.webm: error while seeking

42.54 M-V: 5.848 fd= 81 aq= 0KB vq= 0KB sq= 0B f=0/0


comment:6 by Andrew-R, 3 years ago

https://yadi.sk/d/PHmSoodtkEVzyQ - av1_svt_0.5_1000frames-3.webm

sha256sum av1_svt_0.5_1000frames-3.webm
0c871032d65ae467fd6a2dcfa63f2c84a022011264993280ccb722709288672d

comment:7 by James, 3 years ago

Resolution: invalid
Status: newclosed

The "Element at xxxxxx ending at xxxxxx exceeds containing master element ending at xxxxxx" lines are bogus unrelated warnings. There's a patchset that fixes them being reviewed.

Do the "error while seeking" errors happen to you only when you try to seek forward after you've reached the end of the video? That seems to be the seeking behavior of ffplay for every sample, and not a bug related to you video. But seeking still works despite that.

comment:8 by Andrew-R, 3 years ago

ah, it was just ffplay trying to seek beyond 30 second mark (arrow up key was trying to seek +30 seconds, and after this visible image just stopped... same if I seek beyond file duration - 30 sec - by left-right (10 sec) arrow keys).

So, this one can be closed as not ffmpeg bug?

comment:9 by James, 3 years ago

Already did, yes :)

Thanks for the svt-av1 created samples in any case.

Note: See TracTickets for help on using tickets.