Xonotic Forums
Video Creation Tips & Tricks - Printable Version

+- Xonotic Forums (http://forums.xonotic.org)
+-- Forum: Support (/forumdisplay.php?fid=3)
+--- Forum: Xonotic - Configuration Tips (/forumdisplay.php?fid=19)
+--- Thread: Video Creation Tips & Tricks (/showthread.php?tid=916)



Video Creation Tips & Tricks - Antibody - 09-02-2010 11:18 AM

As a few of you know, I've made a couple of video compilations recently. I thought I'd share some of my frustrations with the process and how I got around them. I hope that you will share your tips and tricks too!

Issue: Nexuiz/Xonotic AVIs and OGGs not being recognized by Cinelerra or Kdenlive

To get around this I had to transcode the videos into format supported by both programs. I chose to go with the Xvid codec and the AVI container, as both are widely supported in and out of Linux. One thing, though - Xvid is a lossy codec, meaning that you will lose quality if you don't encode with the correct parameters. You can use the following bash script to encode with the lowest loss of quality (0 loss in PSNR according to the mencoder documentation found here: http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-xvid.html):

Code:
#!/bin/bash

orig=$1
new=$(basename $orig .avi)_xvid


mencoder -o "${new}.avi" -ovc xvid -xvidencopts chroma_opt:vhq=4:bvhq=1:quant_type=mpeg:fixed_quant=1 -oac copy $orig

To use this script, save the above text as "convert2xvid.shl," make it executable, then "convert2xvid.shl dpvideoXXX.avi/ogg" to transcode your video. It will produce a filename similar to the original, but with an "_xvid" suffix.

Take note that this issue is Linux-specific, as Cinelerra is Linux-only and I believe Kdenlive is as well (for now).

Issue: Audio/Video sync in final video output

Both cinelerra and kdenlive default their projects to sample audio at 48000hz. Many other professional audio/video editors do the same (Final Cut, etc). If you are experiencing audio/video sync issues, check that you shouldn't be setting your project to 44100hz instead, as many mp3s use that sample rate. I banged my head against the wall for quite some time until I realized that the sample rate was causing my sync issues.

Issue: Raw video is too big for my HD

Sorry, you'll have to deal with it Sad. Right now there isn't any option for DP to encode to a lossless, compressed video format such as HUFFYUV. What you can do, though, is to trim down on the space incrementally by transcoding your videos to HUFFYUV after you've recorded them to RAW AVI. You can do that with the following ffmpeg cmd:

Quote:ffmpeg -i <input video file name> -vcodec huffyuv -sameq -acodec copy <output vide file name>

Alternatively you can encode using OGG Theora instead of raw AVI, which will save you considerable space. I've found the following settings to be decent at 720P quality when captured at 100fps:

Quote:cl_capturevideo_ogg_theora_quality 63
cl_capturevideo_ogg_theora_keyframe_bitrate_multiplier 2
cl_capturevideo_ogg_theora_keyframe_maxinterval 500 //if you are using 100fps for your capture
cl_capturevideo_ogg_theora_noise_sensitivity 0
cl_capturevideo_ogg_vorbis_quality 10

On my system these settings produce a 3.6GB file for a 20 minute CTF game. YMMV.

Issue: My video is too long for YouTube (etc), but I don't want to re-encode

If you've already encoded your source material into one output video, but that video is too large for the video hosting service you are using (e.g. YouTube's 15 minute limit), you can always split up the video during post processing. They key thing you want to avoid is re-encoding your video (you've already encoded it!), so what you can do is framecopy a subset of your final video instead. Frame copying your codec stream avoids re-compressing your video, thus avoiding both quality degradation and spending a lot of your computing time. To "slice and dice" your video in Linux, you can use mencoder with its "-ss" and "-endpos" options as follows:

Code:
mencoder -ss <start time> -endpos <duration of time to copy> -ovc copy -oac copy <input file> -o <output file>

Both -ss and -endpos take their arguments in the form of "HH:MMConfusedS".

It helps me to set these options if I envision my video on a timeline, with the default markers for capture being at the absolute beginning and the absolute end of the video. If i set -ss to ten minutes (i.e. 00:10:00) I am moving the capture mark ten minutes into the video, and if I set -endpos to ten minutes I am capturing ten minutes of material past wherever my starting marker is (by default at the absolute beginning). For example, if I want to capture only the middle 5 minutes of a 15 minute video, I'd use -ss 00:05:00 and -endpos 00:05:00.


RE: Video Creation Tips & Tricks - MANERS - 09-02-2010 10:50 PM

Please please change that shade of red... it literally hurts my eyes... I was going to read this thread, but... ugh... and this isn't a troll post, either...


RE: Video Creation Tips & Tricks - Rage_ATWM - 09-03-2010 03:11 AM

Good manners with maners please.


RE: Video Creation Tips & Tricks - Antibody - 09-03-2010 07:24 AM

I changed the color to blue. Maybe that is better.


RE: Video Creation Tips & Tricks - Rage_ATWM - 09-03-2010 08:57 AM

but now, everyone wonders whether Maners' eyes like blue color...
Man, what a suspense...

Good post btw, Antibody.


RE: Video Creation Tips & Tricks - Smilecythe - 11-05-2012 04:19 AM

How can I get rid of the hud while still having the frag messages in middle of the screen?

Also, trying to get into free cam, looked up on wiki and camera_free 1 isn't working.


RE: Video Creation Tips & Tricks - Halogene - 11-05-2012 05:01 AM

(11-05-2012 04:19 AM)Smilecythe Wrote:  Also, trying to get into free cam, looked up on wiki and camera_free 1 isn't working.

You'll have to do "camera_enable 1", to enable the camera in the first place.


RE: Video Creation Tips & Tricks - Smilecythe - 11-05-2012 05:27 AM

Okay thanks, works fine now. How about the removal of HUD except the centered frag message?


RE: Video Creation Tips & Tricks - Mr. Bougo - 11-05-2012 12:09 PM

The frag message is part of the hud though, isn't it? I guess you would have to create a hud theme using the hud editor that removes everything except that.


RE: Video Creation Tips & Tricks - kojn^ - 11-07-2012 11:46 AM

Just go into the HUD editor and disable all the panels except for the frag message one Smile


RE: Video Creation Tips & Tricks - rocknroll237 - 11-07-2012 12:33 PM

Scroll to the bottom of this: http://dev.xonotic.org/projects/3/wiki/Democapture