Usage instructions for OMAF Creator Still Image file creation - nokiatech/omaf GitHub Wiki

Single image mode

Assuming the input is a mono 360 JPEG image.

  1. Use a HEVC encoder, e.g. ffmpeg with X.265 or Kvazaar.
    ffmpeg -i image360.jpg -c:v libx265 -crf 20 image360.265

  2. Create OMAF Still image file with omafimage.exe
    omafimage.exe --single image360.265 --output image360.heic

The input is a top-bottom 360 JPEG image.

  1. Use a HEVC encoder, e.g. ffmpeg with X.265 or Kvazaar.
    ffmpeg -i image360tb.jpg -c:v libx265 -crf 20 image360tb.265

  2. Create OMAF Still image file with omafimage.exe
    omafimage.exe --single tb:image360tb.265 --output image360tb.heic

Image sequence mode

The example is for mono. Stereo top-bottom or side-by-side would need additional tb: or lr: prefix to the input image parameter. Technically you can also mix mono and stereo images to the same sequence.

  1. Use a HEVC encoder, e.g. ffmpeg with X.265 or Kvazaar. Repeat for all input images:
    ffmpeg -i image360_1.jpg -c:v libx265 -crf 20 image360_1.265
    ffmpeg -i image360_2.jpg -c:v libx265 -crf 20 image360_2.265

  2. Create OMAF Still image sequence file with omafimage.exe
    omafimage.exe --single image360_1.265 --single image360_2.265 --output image360sequence.heic

Image grid mode

We don't use HEVC tiles for this at the moment, since the idea of HEIF grid is to bypass HEVC level restrictions by splitting large resolution images to smaller ones. Instead, you should divide input image to tiles and encode each tile separately. However, the encoder should be able to avoid any references outside picture boundaries, which in still image case is relevant only with intra prediction.

One way to preprocess large JPG input to multiple HEVC streams is the following:

  1. Use ImageMagick to do the tiling
    magick.exe convert image360.jpg -crop 2220x1110 -gravity northwest -extent 2220x1110 image-tile.png

  2. Use a HEVC encoder, e.g. ffmpeg with X.265 or Kvazaar encoder (impact of intra prediction outside picture boundaries is not verified). Note: as step 3 does not let user to specify input file extension, it assumes .hevc and that should hence be used as output filename extension when encoding. Loop through all the created tiles:
    ffmpeg -i image-tile-0.png -c:v libx265 -crf 20 -pix_fmt yuv420p image-tile-0.hevc

  3. Create OMAF Still image grid file with omafimage.exe (full resolution 13320x6660)
    omafimage.exe --tiled 13320x6660,mono:image-tile- --output imagegrid360.heic

⚠️ **GitHub.com Fallback** ⚠️