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 seemed 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 YouTube's video editing tool... That's it for today. So long!
Andra inlägg från bloggen
2024
Använda cpp som ett skriptspråk (2024-12-03)
Mekaniskt tangentbord Lasersköld L1 del 1 (2024-11-14)
Alphasmart neo 2 font editor (2024-10-11)
Bloggen är äntligen fyttad (2024-09-24)
2022
Figurer i skuggan (2022-06-04)
2018
prestandatest pa morgonen c (2018-11-21)
2017
Framsteg och frustration (2017-08-31)
2015
fix audacity startup bug on ubuntu 1510 (2015-11-24)
git subtree (2015-06-21)
add native code to android studio (2015-06-21)
2014
Ingenting (2014-11-08)
Äldre inlägg...