torsdag 17 oktober 2013

Extract clips of a video and put them together in a single video in terminal

So during a group assignment i needed to clip some videos of youtube. This is how I did it:

First i got the file from youtube using the download helper. Excellent tool by the way. (I downloaded the videos as flv, when downloading them as avi, i got some strange audio synching issues.)

Then I wrote a script to extract my clips from the video. (That was after trying every gui based solution to extract clips)

#!/bin/bash

declare -a startt=(
2:24
5:22
10:32
16:04
16:53
20:00
22:18
);

declare -a lent=(
02:57
03:33
00:46
00:15
02:03
01:45
00:57
);


for I in 0 1 2 3 4 5 6
do
avconv -i Presentationsfilmer/edge.flv -ss 00:${startt[$I]} -t 00:${lent[$I]} -vcodec  copy -acodec copy "clip$I.flv"
done


I got the start and the end times by watching the videos. Then i calculated the length, as needed by the script using Libre Office Calc.. I did not want to do it in my head.

And then for putting it all together... I never did it.. It seamed impossible to find a tool to just merge the different clips.. So I just made a playlist in totem instead. I guess that that gives the video editing in Linux a Failed grade, unfortunately....

So the result.. I still hate to edit movies in Linux, it took much more time than I possibly could imagine. In the future i would probably just use Youtubes video editing tool... That's it for today. So long!

Inga kommentarer:

Skicka en kommentar