I usually find myself in the following situation: I have, say, 650 MB MPEG-2. AVI video file from the camera. Then I use ffmpeg2theora to convert it to Theora.ogv video file, say about 150 MB. Finally, I want to upload this .ogv file to the server ssh.
Let's say the encoding process ffmpeg2theoratakes about 15 minutes on my PC. On the other hand, downloading continues at a speed of about 60 KB / s, which takes about 45 minutes (for 150 MB .ogv). So: if I first encode and wait for the encoding process to complete and then load, it will take about
15 min + 45 min = 1 hr
to complete the operation.
So, I thought it would be better if I could somehow start the download, in parallel with the encoding operation; then, in principle, since the loading process is slower (in terms of transmitted bytes / sec) than the encoding one (in terms of the generated bytes / sec) - the loading process will always be “behind” the encoding, and therefore the complete operation (enc + upl ) will be completed in just 45 minutes (that is, only the boot process time +/- several minutes depending on the actual situation with the download on the wire).
My first idea was to output the output ffmpeg2theorato tee(to save a local copy of .ogv) and then continue the output to ssh- as in:
./ffmpeg2theora-0.27.linux32.bin -v 8 -a 3 -o /dev/stdout MVI.AVI | tee MVI.ogv | ssh user@ssh.server.com "cat > ~/myvids/MVI.ogv"
- ffmpeg2theora , ffmpeg2theora 1 ; , -, enc + upl. ( , , - , ffmpeg2theora , pipe, ACK, , ssh... ffmpeg2theora . , , , 45 mins - dunno, , 1 Ctrl-C;)...)
, , :
./ffmpeg2theora-0.27.linux32.bin -v 8 -a 3 MVI.AVI # MVI.ogv is auto name for output
... , scp, ( "" "" ):
scp MVI.ogv user@ssh.server.com:~/myvids/
: , scp ffmpeg2theora 5 .ogv. scp 5 - , 5 ; ffmpeg2theora, , 15 , scp 5 .ogv 20 .
(joen.dk "Tip: scp Resume), rsync " " ,
rsync --partial --progress myFile remoteMachine:dirToPutIn/
..., rsync scp - , , , scp , : , .
, : , ?
, , :
- ( ),
scp/rsync - ( ) - A bash script; ,
rsync --partial while, , .ogv ( , , , rsync --partial - , , , , ) - (
scp/rsync), " " / "" (, , , , )
... , - - 1 , ( , , 45- - ):)
, , , , ;)
,
!