Refactor out transcode as a separate library (#597)

* refactoring transcode as library

* refactored as lib

* remove unused deps

* fix imports

* cleanup

* modified README

* run fmt

* make clippy happy

* clippy cd

* use std

* PR comments

* fixit
8 jobs for master in 15 minutes and 4 seconds (queued for 1 second)