On https://github.com/AOMediaCodec/libavif/issues/289 @cconcolato suggested the following command line for making the first frame of an AV1 video into the still image for an AVIF:

```
MP4Box -add-image ref:primary:tk=1:samp=1 -ab avif -ab miaf chimera.mp4
```
Unfortunately, something goes wrong if you don't specify "-out [new_file]" with that command:

```
$ avifdec.exe -i four-colors-flip.avif
ERROR: Failed to decode image: BMFF parsing failed
```

The output is 87 bytes shorter when not using the -out command when converting this test image: https://storage.googleapis.com/dalecurtis/four-colors-flip.mp4



Rewriting an AV1 MP4 file in-place to add a image track for AVIF compatibility breaks.
This is a GitHub Issue
repo:gpac
owner:gpac
Title : Rewriting an AV1 MP4 file in-place to add a image track for AVIF compatibility breaks.
Issue date:

--- start body ---
On https://github.com/AOMediaCodec/libavif/issues/289 @cconcolato suggested the following command line for making the first frame of an AV1 video into the still image for an AVIF:

```
MP4Box -add-image ref:primary:tk=1:samp=1 -ab avif -ab miaf chimera.mp4
```
Unfortunately, something goes wrong if you don't specify "-out [new_file]" with that command:

```
$ avifdec.exe -i four-colors-flip.avif
ERROR: Failed to decode image: BMFF parsing failed
```

The output is 87 bytes shorter when not using the -out command when converting this test image: https://storage.googleapis.com/dalecurtis/four-colors-flip.mp4



--- end body ---
