You don’t need any screen capturing Software to make Videos of Urban Terror. I don’t know about Urban Terror with Quake but ioUrbanTerror comes with the ability to record demos as avi files. This should be a little Step by Step Guide, howto create a high quality video within Linux.
Create a Video out of a demo
Open up Urban Terror and change some settings. You want to change the Resolution and you probably want to disable Chat, FPS and hitsounds. If ready go in a terminal into the folder ~/.q3a/q3ut4/demos there you will find all saved demos. Use “demo demo-filename” to find the demo(s) you want to use within the video.
Now as you know which demo(s) you want to use within the video, start it and type in “video” in your game-console. This will make the demo a bit slower because it’s saving the demo to .avi. You can stop using “videostop”. You will find all videos within ~/.q3a/q3ut4/videos.
Video editing
Video editing in Linux could be better at the moment in my humble opinion. You will find better software for other operating systems, anyway here are some nice linux applications which you could use:
I’m using “kino” at the moment, but i think i will soon keep a look at the other editing applications. You will probably start now by triming / slicing some video files and store them as slice0-99 or something. When you’re finished you can put them alltogether, add some nice effects and store it as “pre_movie01.avi”.
Two pass Encoding to h264
The h264 Codec is probably the best for what we wanna do. Though it’s indeed a bit hard to install on some Systems (there are currently some issues in some distributions with ffmpeg/mplayer/x264 – i had to compile those stuff manually). In case you cannot use the h264 Codec, try xvid.
Anyway. We got the finished pre_movie01.avi. As it would be around some hundred megabytes we will encode it now to h264, this will result in a 20-80 MB file.
Croping / Scaling / Aspect Ratio
Run mplayer -vf cropdetect – This will display something like:
[CROP] Crop area: X: 22..697 Y: 0..575 (-vf crop=672:576:24:0).0 [CROP] Crop area: X: 22..697 Y: 0..575 (-vf crop=672:576:24:0).0
We will use this to crop out black borders. Make sure that the width and the height of the resulting video is a multiple of 16. Otherwise it won’t work in every player.
Now let’s scale it to 640:360 using ,scale=640:360
And finally add “-aspect 16:9″ – So the whole line would look like:
-vf crop=672:576:24:0,scale=640:360 -aspect 16:9
Let’s put this together into a variable in the current shell (don’t forget to edit the crop stuff – it’s most likely different for your video)
export CSA="-vf crop=672:576:24:0,scale=640:360 -aspect 16:9"
Encoding pass 1
The following line will create two files. divx2pass.log which is needed for pass 2 encoding, and pre_movie02.avi which can be deleted at this stage.
mencoder -ovc x264 -x264encopts subq=6:partitions=all:8x8dct:me=umh:frameref=5:bframes=3:b_pyramid:weight_b:qp=26:pass=1:turbo=1:threads=auto $CSA -nosound -of rawvideo -noskip -sws 9 pre_movie01.avi -o /dev/null
Encoding pass 2
Now we encode a second time with “pass=2″ and without “turbo=1″. This will higher quality and make the video even a bit more smaller.
mencoder -ovc x264 -x264encopts subq=6:partitions=all:8x8dct:me=umh:frameref=5:bframes=3:b_pyramid:weight_b:qp=26:pass=2:threads=auto $CSA -nosound -of rawvideo -noskip -sws 9 pre_movie01.avi -o output.264
Getting the sound
We need to split the sound out of the original file, this can be done by using the following command:
mplayer -ao pcm:file=audio.wav:fast -vo null pre_movie01.avi
Then we need to change it for use with MP4Box using ffmpeg:
ffmpeg -y -i audio.wav -acodec libfaac -ab 128k sound.aac
That was it.
Making a mp4 out of it
Now we have two files: sound.aac and output.264. We will merge them to movie.mp4:
MP4Box -add output.264 -fps 25 -add sound.aac movie.mp4
Result
(though i didnt used 4000 bitrate and i didnt scaled here, i’ve just set the aspect ratio. Resulting video was 20 MB big, after uploading at youtube quality was first very bad, 10 minutes later it was available in high quality, i dont know whats causing this – so don’t wonder if you still see bad quality.)
