Firstly you need all you video files names. Go to your files with "cd and file path"

The write "ls > file.txt" to make a text file with all your videos.

Go through ftp and open this file and edit with an text editor, before of every file put "flvtool2 -U"

files should look like this
flvtool2 -U 1.flv
flvtool2 -U 2.flv

Then copy - paste to ssh.