add video saving and uploading support to train_* scripts
#524
+326
−87
train_* scripts
#524