Skip to content

vi/bpg2hevc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bpg2hevc

Command line tool that allows you to losslessly convert compatible BPG files to HEIC format that is more widely supported. The tool itself handles extraction of HEVC stream from BPG files. That stream can be consumed by other tools like FFmpeg or MP4Box.

Example

$ bpgenc sample.png -o sample.bpg
$ bpg2hevc sample.bpg > sample.hvc
$ MP4Box -add-image sample.hvc:primary -new sample.heic

Limitations

The tool was created to process my own files, which are rather uniform, and may fail to handle arbitrary BPG files.

  • Only basic BPG files are supported: no alpha, no animations, only one specific colourspace, etc.
  • Most things are just hard coded - only picture width and height are handled carefully. BPG files that were encoded differently (e.g. non-default -m or -b or not x265 encoder) may fail to be converted.

Installation

Download a pre-built executable from Github releases or install from source code with cargo install --path . or cargo install bpg2hevc.

CLI options

bpg2hevc --help output
ARGS:
    <path>
      BPG file to read and convert to HEVC raw stream to stdout.
      `MP4Box -add-image w.hvc:primary -new w.heic` would help to pack it as a HEIF image.

OPTIONS:
    -h, --help
      Prints help information.

About

Command line tool that reads simple BPG (Better Portable Graphics) files and dumps raw NALs that can be consumed by e.g. FFmpeg.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages