View Full Version : less than good results with gaming footage


alea35
21st January 2006, 03:19
im making a frag movie from cs:s

getting uncompressed footage at 1280x960 then resizing to 720x544. the results aren't exactly great.

!!!!UPDATE!!!!

http://www.filanthropy.com/alea/pics/alpha3noblur.mp4 <- NEW RENDER WITH NO MOTION BLUR. it looks a lot better but still some blockiness at 3200 bitrate.

http://www.filanthropy.com/alea/pics/alpha3.mp4

heres the batch file i used

@echo off
:-------------------
: See http://wiki.meaz.org/index.php?title=Codecs:x264 for laalpha3 info
:-------------------

:START
:-------------------
: Start Configuration
:-------------------
: You need to export your movie as an avi with a filename.
: You need to export your movie sound as a wav with the same filename.
: Set the filename you will use on here.

set alpha3=alpha3

:-------------------
:set the audio bitrate to use here
:-------------------

set myabitrate=192

:-------------------
:set the video bitrate to use here
:-------------------

set myvbitrate=3000

:-------------------
:set the video frame rate you used here
:-------------------

set myfps=29.970

:-------------------
:End Configuration
:-------------------


mkdir temp
cls

echo AVISource("%alpha3%.avi") >> "%alpha3%.avs"
echo Crop(0,0,-0,-0) >> "%alpha3%.avs"
echo LanczosResize(720,544) >> "%alpha3%.avs"
echo ConvertToYV12() >> "%alpha3%.avs"

echo ======Encoding AAC audio======
"bin\faac.exe" -b %myabitrate% -o "temp\%alpha3%.m4a" "%alpha3%.wav"
echo ==============================
echo.

echo ======= x264 pass 1/2 ========
"bin\x264.exe" --pass 1 --bitrate 3400 --stats ".stats" --bframes 3 --b-pyramid --filter -2,-1 --subme 1 --analyse none --me dia --threads 2 --progress --no-psnr --output NUL "alpha3.avs"
echo ==============================
echo.

echo ======= x264 pass 2/2 ========
"bin\x264.exe" --pass 2 --bitrate 3400 --stats ".stats" --ref 16 --mixed-refs --bframes 3 --b-pyramid --filter -2,-1 --subme 7 --b-rdo --weightb --trellis 2 --analyse all --8x8dct --me umh --threads 2 --progress --no-psnr --output "temp\alpha3.264" "G:\x264\alpha3.avs"
echo ==============================
echo.


echo === Muxing Audio and Video ===
"bin\mp4box" -new -add "temp\%alpha3%.264#video" -add "temp\%alpha3%.m4a#audio" -fps %myfps% "%alpha3%.mp4"
echo ==============================
echo.

if EXIST "%alpha3%.mp4" rmdir /S /Q temp
del "%alpha3%.avs"

:END
echo If you have any errors, you haven't edited makemp4.bat correctly!!!
echo Otherwise the video is now done and can be found with the filename:
echo %alpha3%.mp4
echo.
pause



how could i decrease the blockiness and make the crosshair actually show up well?

alea35
21st January 2006, 05:13
for reference here's what it looks like uncompressed

http://www.filanthropy.com/alea/pics/Image0.png

asdfsauce
21st January 2006, 09:00
Capture at the resolution you want to encode at so you don't have to resize - that's what's messing up your crosshair.

As for poor quality, maybe try one of the MeGUI profiles (you can just copy the cmd line options, you don't actually have to use the program to encode) to rule out any bad settings. Also, try lowering the FPS at which you capture to 24 instead of 30 to increase the total bits devoted to each frame. A buddy of mine uses 24 FPS for his CS:S videos and they look great. In the end though, theres always more bitrate. Video games have a lot of action usually, and consequently consume a lot of bandwidth.

Good luck.

scharfis_brain
21st January 2006, 09:19
The reason for the bad quality of gaming footage is caused by its zero shutter behaviour: All frames are clean and motion blur is absent.

SOme weeks ago I made some experiments with my brothers gaming stuff and found out that motion blur effectively yields in bitrate savings of factors ranging from 2x to 4x.
I used Quake3 for the test. I let my brother record a demo (is it called this way?) afterwards he forced Quake3 to render 1000 fps offline into *.tga images.
After that I merged them together using a simple AVISynth script.
I decided for 25 fps output with 50% shutter emulation (filmlike motion blur).
It looked much smoother than the same video with 30 fps without motion blur.

But after asking some gamers it seems that they all dislike the motion blur thing.

So it is up to you, alea35, whether you give this method a shot or not.

Multimon
21st January 2006, 11:38
If you don't need all the details you can always use a filter to eliminate everything unnecessary and make the job easier for the codec so you will be less likely to find blocking.
You could also try setting the inloop filter to lower values, with so much fine details I'm not sure that it's not trying to blur them away, thinking they are noise.
If nothing else helps you will just have to increase bitrate (or find a better codec than x264 Oo)...

nm
21st January 2006, 11:54
The reason for the bad quality of gaming footage is caused by its zero shutter behaviour: All frames are clean and motion blur is absent.
Taking a look at the clip makes me wonder if the problem actually is bad motion blur that constantly changes the texture on the walls. I'm not sure what causes this very artificial-looking blur though. Perhaps the capture process?

foxyshadis
21st January 2006, 12:17
Bad floating point calculations in the GPU, and often the game engine, for speed. In gameplay shifting texels is so common we almost completely blank it out.

Try capture with anistropic filtering and antialiasing on. (It looks like antialiasing is, but anistropic isn't.) That way there won't be so many problematic extremely sharp lines all over; they'll fade and blur just a bit with distance, which no script could replicate, and will let the codec compress better.

DarkNite
21st January 2006, 12:22
Capture at the resolution you want to encode at

I'm not so sure he can do that, unless he would like gaming in a window that's 720x544 (I would just go down to 640x480). The "startmovie filename avi" (or "startmovie filename raw") cvar would just dump the engines output at whatever resolution he was playing at.

My experience with the source engine is very limited though. I could be wrong altogether. I wouldn't know any better because I never made it past the initial bold print, red letter console error message "FIXME: only DivX for now" before I just started dumping raw tga's and falling back on imagesource to give me something decent to work with.

foxyshadis might be right concerning the anisotropic filtering since I've never had any shifting effects like those in my captures. How do you capture? Perhaps we need to know more about the before process so we can try to help you more with the after effects.

Also, I just noticed the build of x264 included with that batch you linked to is a bit old.

scharfis_brain
21st January 2006, 12:29
the time I wrote my 1st post in this thread I hadn't seen the clip.

Now I have seen it. It has a lot of weird ghosting in it (maybe 2 to 4 frames merged together).
Try to disable this kind of fake-motionblur and see whether it gets better or not.

If you like to get a motionblur, and if you have the option to disable the motionblur and an option to raise the rendering framerate to 1000 fps (or more!), then you can create clips with real motionblur instead of this ghost-crap.

A reasonable motionblur needs at least 20 consecutive frames to be merged.

scharfis_brain
21st January 2006, 13:00
Here is a sample without motion blur (7.7 MB, 8.8Mbps):
http://rapidshare.de/files/11485955/test25p.avi.html

And this is the motion blurred version (4.0 MB, 4.5 MBps):
http://rapidshare.de/files/11486119/test25p-mbl.avi.html

Both files had been encoded with constant quantizer to show the impact on bitrate/filesize of the motion blur.

(When you visit the Download site scroll down and press "free". After a short period of waiting you need to enter the colored chars before downloading the file)

xDrJx
21st January 2006, 14:54
I encountered the same problem with my CS:S captures. And while I'm using an ASP codec the only solution I found was to increase the bitrate at least to ~2200 and decrease the res a little (576x464) for an acceptable output.:(

PS: nice AWP'in :sly:

alea35
21st January 2006, 17:07
i've been capturing at 90 fps :( then rendering at 30 fps to create the motion blur. in other games it'll look fine but in cs:s it does seem more like just ghosting. how could i create a better motion blur? i'm not understanding all of your directions :o

thank you for the help so far

alea35
21st January 2006, 17:19
i took that crappy motion blur off and already it's 100000000000X better!

Razorholt
21st January 2006, 18:02
What's the command line to disable motion blur and set it to 0?

Thanks,
-Dan

alea35
21st January 2006, 18:53
i created the motion blur by capturing at 90 fps then rendering at 30

Razorholt
21st January 2006, 19:35
ooh I see. Thanks alea35!

scharfis_brain
22nd January 2006, 00:24
alea35: try rendering at 900 fps and then reduce it to 30 fps.
this will blend 30 frames into one single frame which comes close to natural motionblur and saves bitrate.

which program do you use to blend 90fps into 30 fps?

alea35
22nd January 2006, 00:58
how do i render at 900 fps? the way i was doing it now is capture at 90 fps then in sony vegas 6.0 i set the undersample rate to .333 so the fps would then be 29.970. i dont think i have the disc space for 900 fps? or is there another way to do it?

bkman
22nd January 2006, 04:16
What software did you use to apply the motion blur, scharfis? Is there an avisynth plugin to do it?

alea35
22nd January 2006, 05:01
i created the motion blur by capturing at 90 fps then rendering at 30


see there ^

bkman
22nd January 2006, 05:33
I mean for the quake 3 footage he had. He didn't use a capture device, but just compiled the TGA's. I want to know how he created the motion blurred footage out of it.

scharfis_brain
22nd January 2006, 12:27
imagereader("BLAH.tga", start=..., end=...", fps=x)

#2:1 framerate reduction:
last.merge(last.trim(1,0)).selecteven()

#(2*n+1):1 framerate reduction (n=1..7)
temporalsoften(n,255,255).selectevery(2*n+1,n)

repeat and concatenate thes both lines until you result in your wished framerate.

if you want lesser motionblur just chain them so that you achive the double framerate of your target and then add another selecteven() at the end.

for the quake video I used this script:

imagereader("BLAH.tga", start=..., end=...", fps=1000)
# for 50% shutter, we need a reduction to 50 fps, meaning a factor of 20

#5:1 framerate reduction (n=1..7)
temporalsoften(2,255,255).selectevery(5, 2)

#2:1 framerate reduction:
last.merge(last.trim(1,0)).selecteven()

#2:1 framerate reduction:
last.merge(last.trim(1,0)).selecteven()

# now lets reduce the 50 fps to 25 fps without further blurring:
selecteven()

alea35
22nd January 2006, 19:55
imagereader("BLAH.tga", start=..., end=...", fps=x)

#2:1 framerate reduction:
last.merge(last.trim(1,0)).selecteven()

#(2*n+1):1 framerate reduction (n=1..7)
temporalsoften(n,255,255).selectevery(2*n+1,n)

repeat and concatenate thes both lines until you result in your wished framerate.

if you want lesser motionblur just chain them so that you achive the double framerate of your target and then add another selecteven() at the end.

for the quake video I used this script:

imagereader("BLAH.tga", start=..., end=...", fps=1000)
# for 50% shutter, we need a reduction to 50 fps, meaning a factor of 20

#5:1 framerate reduction (n=1..7)
temporalsoften(2,255,255).selectevery(5, 2)

#2:1 framerate reduction:
last.merge(last.trim(1,0)).selecteven()

#2:1 framerate reduction:
last.merge(last.trim(1,0)).selecteven()

# now lets reduce the 50 fps to 25 fps without further blurring:
selecteven()


this might sound kind of dumb but how do you use this script? when you are encoding it to x264? by any chan are you on aol instant messanger? i would love to get this to work

scharfis_brain
22nd January 2006, 22:17
I prefer keeping my IM private.

Amyways. A howto cam be found here: www.avisynth.org .

alea35
22nd January 2006, 22:39
this is the script i was trying
imagereader("shot0000.tga", start=shot0000.tga, end=shot0175.tga", fps=1000)
# for 50% shutter, we need a reduction to 50 fps, meaning a factor of 20

#5:1 framerate reduction (n=1..7)
temporalsoften(2,255,255).selectevery(5, 2)

#2:1 framerate reduction:
last.merge(last.trim(1,0)).selecteven()

#2:1 framerate reduction:
last.merge(last.trim(1,0)).selecteven()

# now lets reduce the 50 fps to 25 fps without further blurring:
selecteven()

virtual dub couldn't open it. i'm not sure what the first line should look like

[)370|\|470!2
22nd January 2006, 23:29
imagereader("<path>\shot0%d.tga", 000, 175, 1000)

<path> - put there exact location of images, e.g, C:\VIDEO\shot0%d.tga

alea35
23rd January 2006, 00:23
do i need an extra plugin? i only have a default avisynth install

lexor
23rd January 2006, 04:36
imagereader("BLAH.tga", start=..., end=...", fps=x)
ahoi mr. brainly, how come there is an " after end=..., there is no opener for it, what is it closing?

/edit: forgot to mention, alea, it shouldn't need any extra plugins.

scharfis_brain
23rd January 2006, 06:17
:rolleyes: even mr. brain can do typos

lexor
23rd January 2006, 15:08
:rolleyes: even mr. brain can do typos
my point is that alea35 copied your typo, that's why it doesn't work :)

bkman
23rd January 2006, 15:39
It needs to be like: imagereader("<path>\shot%.4d.tga", start=0, end=<amount of frames>, fps=1000)

You can also change the amount of digits in the count by changing the %.4d to some other number.

Dumping 1000fps is really slow, btw, and eats up space like crazy. :scared:

alea35
25th January 2006, 04:28
thank you guys! i will try this out this weekend :D

alea35
26th January 2006, 05:39
check this clip out

http://www.filanthropy.com/alea/pics/spec.mp4

i did in widescreen 1280x800 and it looks SOOOOOOOOOO much better. i think it's because it's a natural mod 16 resolution.

asdfsauce
26th January 2006, 09:02
It's because you didn't resize.

alea35
26th January 2006, 20:38
i didn't resize one other time but idk i think this is still the best

smok3
7th July 2006, 09:40
info:
ok, so i have a similar 'problem', iam working on a little video project, but i would like to keep the entire internal pipeline vectorized (for variety of outputs, like web, print, ect...), however the main application is still tv out, so i would like to add some motion blur to that version (25fps)...,

questions:
what framerate should i work in internaly? (should 100 fps suffice?), also what script/procedure is suggested for 'in100fps>(addmotionblur)>out25fps') procedure?

scharfis_brain
7th July 2006, 14:40
if you do 300 fps internal, you can put out any framerate:
PAL: 50 and 25 fps
NTSC: 60, 30 and 24 fps
WEB: 15 fps.

smok3
8th July 2006, 20:05
ntsc wont get used at all, also web version doesnt have to have a proper speed (there will be no audio in that version.)

scharfis: what script do you suggest for 100>25?

scharfis_brain
9th July 2006, 00:47
why not 50 fps?

what kind of image do you want to achieve? do you want motion blur?

smok3
10th July 2006, 20:00
yes, motion blur i want! (otherwise i would just work in 25fps)

alea35
24th July 2006, 06:44
here's one of the latest things i've made. seems the x264 codec has progressed quite a bit

http://www.filanthropy.com/alea/videos/newmill.mp4

3 pass HQ-Slower preset. bitrate around 3800. anyone notice that the crosshair sometimes leaves parts of green on other surfaces when it moves quickly? kinda like smearing? anyway enjoy