SDB:Making a video clip

Jump to: navigation, search

This page is for some clues on how to create a video clip. An example is given with a very small clip showing an invitation for the 2011 OSC (openSUSE Conference).

The example is there:


This video is targetted as web show. We need an as good as possible result to view on Youtube, DaylyMotion or any like. We will try to use multilangage by subtitle use.

Shooting the source video

The source video can be made with nearly any video source: webcam, smartphone (on the example, a Samsung S), camera or of course camcorder.

If using a camera or a camcorder, don't forget that the usual looking of video clips is horizontal, 16x9 format. Do not keep your phone on the vertical position you use to call! It's possible to rotate a video 90°, but the result is suboptimal.

Try to use this 16x9 format. It's the modern one, much better than the old 4x3 of tube TV's.

Try to setup your source camera to have right away this format. It's often possible, but not always. If you can't, don't worry too much, avidemux is able to convert mostly anything to anything :-).

When shooting you often have to work blindly, because most camera have only one screen and only camcorder can reverse the screen. It's more easy than expected to have a good result, try until you have.

Converting right now

It's impossible (for us) to predicate what format you will end with. There are many street formats, but we must always have the same one for working easily, so we will convert any format you have to "mpg". Mpg is the dvd video format. It's much too good for web diffusion, but it's very easy to edit and share, and as we wont do long clips, the fact that it's a bit large is unsignificant.

If you have a lot of files to convert to mpg, it's simpler to use a script like this one:

# echo usage: *.MOV

for a ; do
	b=`echo "$a" | cut -d'.' -f1` ;
	ffmpeg -i $a -target pal-dvd -b 6000k -aspect 16:9 -g 1 $b.mpg ;

If you have only one file to manage, it's simpler to copy/paste directly the ffmpeg line, replacing $a with the source file name and $b.mpg by the target one. The ";" is not necessary in this case (but it don't harm).

This script was created to convert files with the "MOV" extension, but work with any kind of video file as long as you can read this file with your openSUSE.

6000 is related to the quality. It's a very good quality, enough to be called "HD" on the web (on the web only).

Editing the video file

You have probably parts of the video that you don't want to keep, for example at the beginning and at the end.

Load your video with Avidemux. do not change the default setup (copy). Read the video until the place you want to start, clic on "A" on the center of the Avidemux window, go to the place you want to stop, clic on "B", write the resulting file (it's usually very fast). It's done.

You can have a much better result settting A and B on a "key frame". You can reach one in Avidemux clicking on "<<" or ">>".

In a mpg video file, the only complete images are key frames. The other frames are calculated from the key ones, so cutting a file between key frames make some sort of garbage.

If ever you wont follow exactly this Howto, don't forget to remove any "black border" filter for borders up and down the image (you may need some at left and right if your original was vertical). There is no filter at all in copy mode.

The mpeg 16x9 image is a 720x404 image written as 720x576 (anamorphic), with a 16x9 tag in the file.

Adding subtitles

Subtitles are usefull for audio impaired people and for easy translation. It's much easier to translate subtitles than to try to understand the audio.

The tool of choice for subtitle is gnome-subtitle. Install it and launch it. open the video file (final version - on the video menu), and clic on the big green "+" to add the first subtitle.

If you already have a subtitle file, go to file, open and load it, then go to file, translation, new.

Subtitles are summaries of what the people on screen say (or whatever comment you want to add). They are stored in a separate file. It's a text file, very simple, giving the subtitle number/rank, the time of beginning, the time of ending and the subtitle content. The most used format is "srt".

It's ususally not a good idea to insert subtitles directly in the video file, because it prevent using other langages with the same video and most video readers can load the subtitles automatically if the names are the same. But if ever you need it see the next paragraph.

Making subtitles permanent

Simply use Avidemux. You only have to know that you have to make a conversion to have access to the subtitles, go to "auto" and choose "dvd". Then go to filter, subtitle and choose the "srt" type. After that you have to choose a font, Avidemux have no default and if you don't you wont have any subtitle. Fonts are in ttf files (true type fonts), somewhere in /usr/share/fonts.

Publishing your work

Youtube, for example, allow the use of subtitles. As of August 2011 the Youtube interface is horrible, so you may take some time before finding the subtitle files load menu :-(. On my config it's just above the video.

If you have several subtitles files loaded, the little "cc" button on the video taskbar allows you to change.

Notice that the automatic transcode of voice to text Youtube do is horrible. The automatic translation is horrible also.