testscript: add encode test and get video content from bee server

1. use psnr to test yamiencode
2. get video content from bee server
almost duplicate code as below, can we use a functions?