Wednesday, July 14, 2010

Some Blender Sequence Editor Notes

Currently playing around with the non-linear video editor in Blender, aka the Sequence Editor, as I ran into a bunch of trouble, here some notes (still a work in progress, so some stuff in here might not actually be true).

Convert your videos
The sequence editor works on frames, not time, this means when you simply import a video that has a framerate different from your target framerate, the audio will go out of sync, as blender will handle each frame in the input as one frame and ignore the duration it has on screen. Furthermore the audio will also go out of sync when your video contains duplicate frames, but doesn't actually store the frames in the container, this happens for example when you slowed down a video with mencoder and -speed 0.5, thus every second frame is duplicate and won't be stored or when you used mencoder mf://.. to generate your video. To fix this you have to convert the video with the harddup option:

mencoder input.avi -o output.avi -ofps 30 -vf harddup -ovc lavc -lavcopts vcodec=ljpeg -oac copy

So you basically have decide on the resolution and framerate of your output before you start working and then convert all the material you want to import accordingly. Not sure which codec is best, ffv1 seems to lead to extremely slow seek, ljpeg seems to work so far.

While you can mirror, flip, crop and translate a video easily in the sequence editor, you can't scale it easily, so you might want to do that outside of blender as well.

When you want to cut your videos into chunks beforehand, note that you can't use mencoders -ss and -endpos to cut your videos, as mencoder will cut by keyframes, not exact time, so you are also a random amount of from where you placed the cut, use avidemux instead and convert to ffv1 if needed, as avidemux won't let you cut h.264 video easily either.

Convert your Sound
Blender can import audio directly from video, but that is broken in Blender 2.49b, if you look at the wave forms you will see that Blender cuts out a 0.5sec piece at the start and adds garbage to the end. I haven't tried all possible formats and codecs, but so far I haven't found one that works. Solution is to separate audio and video each into its own file. This can be done with:

mplayer -vc dummy -ao pcm:file=out.wav:fast input.wav

and then add it with "Audio (HD)".

Input Codec Pro/Contra
  • ffv1 seems to lead to extremely slow seek, so it is unusable for practical use
  • ljpeg is more then twice the size as ffv1, but seems to allow fast seeks and encodes 20% faster then ffv1
  • raw is fasted to encode (third of the time ljpeg takes), but four times bigger then ljpeg, raw is also a little faster to seek then ljpeg
  • jpeg image sequence seems to work
Best Encoding
  • raw is fast to encode and fast to use in Blender
  • raw is lossless
  • format=yv12 is needed sometimes because videos might be in a colorspace that blender does not understand
  • harddup to make sure that the video file has a frame for each frame and doesn't ignore duplicates which confuses Blender
mencoder -ovc raw -vf format=yv12:harddup -oac pcm input.avi -o output.avi

Don't forget to...
  • click "Do Sequence" to actually render your videos via the animate button
  • set the output to a video format or else you will just get a bunch of jpegs in your /tmp/ directory
Important keys
  • space - lets you add a strip
  • c - lets you change the type of strip later on
  • m - lets you group strips into a meta strip
  • shift-k soft cuts the selected strip (soft cuts contain the full video, hard cuts only the necessary frames)
  • ctrl-leftclick - lets you place a node in the curve editor
Blue/Green Screen
Effects like color-keying, aka blue/green screen, can be done in node editor, but not in the sequence editor. Not sure if there is any way to use both of those together in a single session or if one has to save the results of the node editor first and then import them as normal avi back into the sequence editor.

Notes about Sound
Using "Audio (RAM)" gives you a nice wave form in the sequence editor, using "Audio (HD)" just gives you a block. Haven't yet tested if that relates to out of sync issues.

Getting Sound to Work
No idea how to get sound to work, all I get is:

Couldn't open audio: No available audio device

If I load a sound block, I can play it, but the sequence editor stays silent, even with scrubbing enabled.

After a serious of murder attempts at pulseaudio and using play 0001_0250.wav before starting blender, sound now works, but that is smudgy and non-reproducible. Using blender -g noaudio might also help in some situations.

Problems with Workarounds/Fixes
  • there doesn't seem to be a way to change the length of an effect-strip, the length is automatically determined from the overlap from the two child strips, splitting the strip is usable as workaround, but adds some complications
  • you can stack normal strips and set their blend mode, but you can't do that with effect strips, their blend mode seems to be limited to "replace", grouping them as meta-strip however gives you all the other blendmodes back
  • the Blender 2.49b that ships with Ubuntu 10.04 is broken, all videos except image sequences come out in very low image quality, looks like the pixels get ordered incorrectly, the official Blender 2.49b release seems to work fine
  • Even with all the conversion done and the movie and sound showing up in Blender with the same length, there is still a audio delay in the end, this seems like a bug, splitting the wav data and importing is separately from the video helps
  • alpha blending seems broken, placing a RGBA image over a sequence sort of works, but only with borked alpha, enabling SequencerButtons/Filter/Premult seems to fix it
  • you can't make meta-strip out of "Audio (RAM)" and video, but you can do a meta strip out of "Audio (HD)" and video, so its probably best to avoid "Audio (RAM)"
Problems
  • marking a strips file location as "Relative" doesn't seem to work
  • What is the best way to handle RGBA movie sequences? PNG files?
  • Is there a way to set the output filename to a fixed one? It is kind of annoying to have the filename switch when the number of frames change
  • Blender is suppossed to be able to play sound, but doesn't play any, even when sound is enabled and "scrub" is activated for the wav, seems to be a issue with pulseaudio, yet again
  • something as simple as a text overlay seems to be quite complicated to do in Blender, as there aren't really any proper 2D editing capabilities in the sequence editor
  • building a proxy for a strip doesn't seem to have any effect, the jpegs for each frame are generated fine, but doesn't seem to speed anything up
  • there seems to be a 2GB limit for AVI RAW files, making them mostly useless

Tuesday, July 13, 2010

Review: Lair (PS3)

Lair was released back in 2007 and planed to be one of the Playstations 3's exclusive flagship titles, but turned out to be the game that bankrupted Factor 5 in the end. The game follows straight into the footsteps of the earlier Factor 5 games such as Rogue Leader, just instead of having a Star Wars setting, the game takes place in a fantasy world filled with dragons and other mystical creatures. This by todays standards seems a little odd, as most games today have moved away from the arcade-like linear level structure and moved to a more open world structure and even games that are strictly linear generally avoid the "Mission Successful" screens and instead at least try to give the impression of one huge world. Lair on the other side is basically build around that arcade concept and provides medals, scoreboards and unlockables thus providing plenty of incentive to replay a level. Inside a given level you are also limited to three lives and when you lose them all, you have to restart that level, just as you had to back in the day. Later levels however provide mid-level continues, so I never found that to be much of an issue as far as difficulty is concerned.

The story of Lair feels a lot tighter and well thought out then that of Rogue Leader, which was more or less a collection of your favorite Star Wars moments. What Lair provides is more akin to what you see in other story driven video games these days and is overall quite well done and told through a mix of in-game graphics and pre-rendered cut scenes. The story isn't ground braking, but for an arcade title it does its job very well.

On the technical side Lair is somewhat special, as it makes full use of Playstation 3 features. It is one of the very few games that allows you to use Playstation Portables remote play feature, that allows you to play a Playstation 3 game on your PSP via video streaming, however I found that to be to laggy to be of much use. And it is also, as far as I know, the only big Playstation 3 title that is completly build around Sixaxis motion controls. The basic flight controls of your dragon work by tilting the controller while some quick time events require you to jam the controller to the left/right or up/down. The motion controls where one of the most criticized parts of the game on its release, but I had no problems with them at all. The flight controls work just fine, they are responsive and do exactly what you want. The by far biggest problem I had with them was simply that it takes a bit to relearning, especially in tricky situations your thumb will reach out for the analogstick by instinct (which now controls the camera) and it will take a while till that stops, but thats not a fault of the game. The game is also in large part build around lock-on and auto-aiming, so you don't need to aim pixel-perfect at another dragon, instead you can lock-on and circle around it while you shoot at it. The game is also very forgiving in its collisions, so you won't die once you touch a building or mountain. The one place where the motion controls could be criticized are the dash and 180 turns, which require you to pull the controller up or down, those always felt a little unresponsive, as the game took a moment to figure out if you wanted to do a normal move or one of those special maneuvers, but thanks to the patch/DLC you don't have to use them, they are directly mapped to the dpad and can now be triggered by the press of a button.

The game also comes with an option to use normal analog stick controls instead, an option that wasn't present in the release version but only came later with a patch, but so far I haven't really used it, as I never had any issues with the Sixaxis controls. There is also a rumor floating around that the game was build with a firmware upgrade in mind that then didn't ship in time before the game was released, thus leaving gamers with broken motion control, which might explain the bad reviews, but today everything works quite fine.

The missions in Lair are pretty varied, you will fight a giant sea worm, protect ships, fight armies or bomb cities or even a volcano. The game doesn't waste any of your time and will always put you pretty much right into the battle and quite frequently it will have you battle at multiple fronts at once, which gives the game an intensity that you don't see often these days. The game itself isn't very long, featuring 15 missions that will take you around 5-20mins each, but due to its intensity it never felt short and there wasn't a second of it that wasn't exciting. On top of that the game provides quite a bit of replay value as you have full audio commentary for each level and there is plenty of bonus material. On top of that you also can hunt for high scores.

On the graphics side Lair can't quite keep up with current day Playstation 3 titles and some of the explosions and particle effects look a little cheap, but in terms of scale Lair is still easily one of the most impressive titles around. The cities and monsters you will fight look gigantic and while you can fly high up in the air, you can also go down and up close, land and eat enemy soldiers with your dragon. It is a sense of scale that one simply doesn't see often in games and the only comparable game that comes to mind would be Shadow of the Colossus, but that one of course doesn't allow you to take your dragon and fly high up in the air.

Overall I had a hell of a lot more fun with this game then expected. The controls work, the story is good and the missions provide a ton of variety. The art direction and atmosphere are also fantastic, providing the best dragons I have seen in gaming so far and an universe filled with interesting locations and creatures. The one big fault the game has is that it is basically the exact same type of game that Factor 5 has developed for the last 10 years and I have never been that big of a fan of the arcade-like structure of that type of Factor 5 flying games in the first place, but here however it didn't bother me that much. Thanks to the dynamics of the battles that keep you busy on multiple fronts the game feels often more like an X-Wing or Crimson Skies, then a Rogue Leader. But just like in Rogue Leader the game is a bit to heavy on the action, leaving you little time to actually appreciate the world around you, which is sad, as the level of detail in the world can be pretty mind boggling if you actually slow down and look around.

PS: The DLC for this game, which is completly free, got me a little trouble. There are basically three downloadable things: the official patch which will install automatically, an DLC pack that adds analog controls that you have to download from the Playstation Shop (this seems to be the same thing as the patch) and a DLC pack that adds two extra dragons that you have to download from the Playstation Shop. The DLC seems to be picky about the region, so you have to download it from the same region as your game. Not sure what exactly happened for me, but I think I downloaded the controller DLC assuming that it contained the two dragons, which then didn't show up, so while looking again for more DLC I used the US shop, which downloaded and installed fine, but again lead to no new dragons. I finally downloaded the DLC from the UK shop and the dragons now show up. Looks like console gaming is getting more and more like PC gaming when it comes to patches and downloads and stuff :(

Anyway, after four weeks I am still playing the game and having fun, I am now at 13 gold and 1 platinum medals. About the difficulty, the bronze ones can be often obtained on a first playthrough, the silver ones are also easy and can be obtained by just replaying a level for a second or third time, the gold ones are a little more tricky and require some practice, but after having already collected all silver medals before, the gold ones didn't gave me all that much trouble. The platinum medals on the other side are a little crazy and require near perfect execution and according to the leaderboards there are only a handful of people that got them all. Overall Lair isn't a hard game, it is simply a game that requires some learning, but once you get the hang of it, it won't give you much problems.

About the unlockables, you can unlock artwork, trailers, music and new combo moves. Having regularly finishing the game a lot of stuff will be unlocked, after getting all the silver medals almost everything will be unlocked except "Miscellaneaus", which requires three gold medals or a gold medal in Blood River (not sure which of those two). Incineration Strike was the last one locked for me and got unlocked at some other point when collecting gold medals.

PS2: I now played the game a without the patch, the only instantly noticeable difference is that dash and 180 turns can only be triggered with up/down controller movements, not with the dpad and while the 180 turns weren't much of a problem with the patch, without it things get a little messy, as the game often confuses the 180 turns with the dash move or visa verse (i.e. to jam the controller down you naturally move it up first, which can be misinterpreted as an 180 turn). With the patch the game no longer allows dashing via a gesture, thus reducing any possible confusion. The normal flight controls on the other side work with and without the patch exactly the same.

Sunday, July 11, 2010

YouTube quality problems when using x264 and 640x480

A little YouTube video quality problem is puzzling me right now, if I upload a 480p video I get what looks like artifacts produced by a bad de-interlacing algorithm:



If I however scale the video to 1280x1024 before the upload, the result in 480p on YouTube looks fine and close to the original 480p data:



Searching around on the net hasn't brought any clues so far. The original video was produced with HandBrake and matches from what I can tell YouTubes recommended video formats.

Uploading the video as 360p directly doesn't seem to have this problem, but that of course means lower quality then 480p.

Update: I still have no idea on the cause of the pixelation or how to fix it without reencoding, a rencoding of the video into flv however seems to work:

mencoder inputvideo.mkv -oac mp3lame -ovc lavc -lavcopts vcodec=flv:vbitrate=500:trell:v4mv:mv0:mbd=2:cbp:aic:cmp=3:subcmp=3 -o outputvideo.flv

Update: The problem seems to be h.264/x264 specific, Using MPEG4 as codec works as well:

mencoder raw.avi -o mplayer-mpeg4.avi -oac mp3lame -ovc lavc -lavcopts vcodec=mpeg4:mbd=1:vbitrate=800

Update: I solved the problem now with the MPEG4 codec for those of my videos that had that issue. While doing so I ran into the problem that Youtube doesn't offer import/export of annotations, thus no way to copy over annotations from the badly encoded video to the cleaned up one, luckily there is a workaround. This video explains how one can import and export annotations. Short summary, use
http://www.google.com/reviews/y/read2?video_id=YOUR_VIDEO_ID_HERE to get an xml of your annotation and then the Firefox Tamper Data Add-On to fudge your annotations into a POST request.

Update: Two questions on the YouTube help forum referencing this problem:

Saturday, July 10, 2010

Review: Brütal Legend (PS3)

In Brütal Legend you take control of Eddie Riggs, who is a roadie that gets thrown into a heavy metal inspired universe where he has to fight demons and other bad guys. The game combines aspects of open world, with hack&slash and real time strategy aspects.

In terms of character design and dialog the game delivers as usual for a Tim Schafer game. The graphics also look rather good from a technical point of view and provide some great facial animation, nice floating hair and shiny looking metal.

The gameplay aspects of the game however are more then a little uneven. While the game does give the impression of an open world game in the beginning, this is for most part an illusion. You can drive around just fine, but there simply is absolutely nothing to discover and nowhere interesting to go. The side quests that are there basically boil down to the same three missions over and over again, they don't even featuring unique dialog or story bits, they are quite literally copy&paste. So you end up spending most of your time driving directly from one main mission to the next, as there simply is no point in exploring the world. Another annoying aspect of the open world is that its layout is rather chaotic, clearly visible roads are missing for most part, so you end up bouncing a lot around on grass planes or other uneven ground.

The fighting in this game starts hack&slash like with a simple axe swing and a lighting strike, but soon you get other helper characters that will fight with you in battles and that you can command. Control of those other units follows simple attack/follow/defense commands, where your commands automatically apply to the units next to you. Later in the game you will also get the ability to fly, which also you to get much quicker around to command your units. While there is regular monster slashing throughout the game, the main part of the fighting takes place in RTS-like stage battles. In those you have to take control of fan-geysers which will provide you currency which you can then use to buy more units or upgrade your stage. The setup of those levels is very simple, as most of the time you and the enemy have a stage and whoever destroys the other persons stage wins. There is no base building or deeper strategy, so its mostly about getting control over the geysers and building enough units to rush the enemy and while it is possible to give commands to subgroups of units, its very awkward and not very practical.

Another big issue with the game is the health display, as there simply is none. Health follows the current day standard of auto-recharging when you stay out of combat for a while, but it is incredible hard to tell how near you are to death or how to avoid it. This issue becomes worth due to the way your special attacks are implemented, to perform them you have to player a little bit of a song Zelda:OOT-style, but in that time the game does neither pause, nor does it interrupt your play when you are under attack. So it happens quite frequently that you perform an action and then die directly afterwards.

In the end the by far biggest problem with the game is its length or lack there of. Doing the main quest takes less then six hours and in that time the game doesn't even really manage to get out of tutorial mode. You basically have a constant flux of new units, actions and things, but for most of them you simply don't have much use. You get introduced to something in one mission and then never use it again. After finishing the game I couldn't even tell you what half the units do, as there is just way to little time to actually experiment with them. The game also has a shop system which allows you to upgrade your car and weapons, but over the course of the whole game I only used it twice, exactly then when the game told me to use it. And this getting told what to do carries throughout the whole game. There is never really a moment in which you have space to experiment or explore.

The adventure-like elements and puzzles that where still present in Psychonauts are completly missing here. There is quite literally not a single puzzle in the whole game and neither are there branching dialog trees or anything else that would allows free exploration. Given that before a battle all characters will stand around in the environment and even allow you to "talk" to them, it is just disappoint that the conversation is limited to a single repeating sentence, instead of a meaningful conversation. Considering that a game like Dragon Age manages to fill 40 hours with decent dialog, it is rather sad that Brütal Legend stumbles in that area with just six hours. Aside from the main story cutscenes, there just isn't much conversation to be found in the game.

Overall Brütal Legend is an odd game, it is odd because it is not broken due to the lack of polish, but due to its overall game design that seems broken beyond hope. The open world aspect feels tacked on and doesn't really add anything and the whole RTS gameplay feels completly overdone for a hack&slash game, yet underdelivers for the RTS genre. The story also feels rushed. There is just way to much stuff happening in way to short a time and a method of slowly discovering it is missing. Brütal Legend feels like the story and setting would have been a much better fit for a Zelda like action adventure game then this odd linear RTS open world mix. As is, Brütal Legend just isn't very good, even when you can look past all the faults in the gameplay, the shortness of the game just leaves a bad aftertaste, it is like a great 20 hour game where somebody has cut out 3/4 of the game, it simply feels incomplete.

The game also features a multiplayer component, which if rumor is true, is actually the core part of the game, which would explain the lack luster implementation of the single player, but it just seems odd to through such good character design into a game targeted for multiplayer. Anyway, I haven't tried the multiplayer yet.

Monday, July 05, 2010

Review: Dragon Age: Origins (PS3)

Dragon Age: Origins is BioWare's latest run into the storydriven fantasy RPG genre, it was released back at the end of 2009. I played through the Playstaion 3 version of the game, the PC version has some bigger changes in the interface, which I can't comment on, as I haven't played it.

The game starts with a typical character creation screen, like in so many other RPGs, this is the only place where you can customize your character, later changes of haircut or such are impossible. I don't really get why as it wouldn't hurt to allow customization later on, yet it would make it much easier to fix early mistakes. Depending on which race you chose you will see a different Origin story, i.e. around an hour of the game that is completly unique per race. After that hour the different races path will cross and the rest of the game will be more or less the same for everybody.

The overall structure of the game is very similar to Mass Effect, the game is build around a global worldmap from which you quick travel to locations in which you can then talk to people or solve quests. The worldmap itself is purely a GUI element and you are always restricted to the rather small locations, there is no huge open world that you can freely traverse in this game. This allows the game to be rather story focused, as you don't have much chance to wonder off from the given path, but you are free to tackle most quests in whatever order you desire. This also has the consequence that the game is basically grind free, as there are simply no endlessly respawning monster hordes.

The dialog system in the game is basically the same as in earlier BioWare titles, you don't have a Mass Effect-like dialog wheel, but classic dialog trees. Unlike previous titles however I found the dialogs to be much more natural in this game. There is no longer a clear split between good and evil answers, most of the time at least. There is also no longer a one dimensional good/evil meter, instead your party members approve or disapprove your actions individually and thus there is a bar that indicates how much they like you. One big downside of the dialog system is that your main character is mute again. Voiced dialog only comes from the NPCs or your party members, this steals a good bit of the authenticity that the dialogs had in Mass Effect and makes everything feel more game like and less movie like.

The story is a bit of a mixed bag, it is not bad, but neither is it as gripping as Mass Effects. It also developers rather uneven. The main story is rather uninteresting and boils down to basically slaying a single dragon, but a few subplots can be quite interesting, but even there I missed a satisfying explanation for the bad guys motivation, searching around on the Internet it seems that there are two prequel books that give some further insight into that, but something like that should really be part of the core game.

The fight system in the game is functional in that it lets you smash enemies, but on the consoles it just feels weird. You have direct third person control over your character at all times and also the ability to switch to other party members and control them, yet the fighting itself while played in realtime is mostly dice rolling. You have the ability to pause the game at any time to assign different actions, but a way to command your party members to go to a specific position seems missing. Your members will act intelligent enough that this doesn't become much of a practical issue for most part, but sometimes they just end up running all over the place and it would be nice if there would be a way to tell them "Go there". What makes the fight system especially weird is the mix of realtime and dice rolling, some of your spells depend on the exact position of enemies, but many other spells and attacks just home on you and you can't dodge them, they will even fly through walls, so that taking cover is close to impossible. Another problem with the system is that the outcome just felt to random, sometimes I was beaten by a foe without a chance and on the next reload I bit him without a problem, without a clear indication what I did different. This randomness is enhanced due to the lack of mid-fight revival early in the game, as when an important character dies the fight might be as good as lost. The fight thus becomes a game of drinking your potions fast enough. Another issue with the fight system is that I found the most successful tactic with bigger foes is to simply run away, if you are lucky the foe will run after you and you can simply run in circles while one of your mages or archers is shooting him from a safe distance. This however also works the other way around, if a foe runs away, it is nearly impossible to hit him with a sword, as sword attacks only seem to work when both parties stand still. If you press attack on a fleeing enemy, your character will simply run after him. These annoyances caused me to switch to the casual difficulty, as there just isn't much point in doing lots of load and save to make it past and uninteresting fight. On the positive side however the game automatically refreshes your health and mana after each fight, so you don't have to mess around with potions between fights and your characters will automatically be revived if a single member survives the fight. This is basically the same system used in Mass Effect and it removes a good part of annoying micromanagement.

The items system in the game suffers from the usual issues, such as having an always full inventory. This can be somewhat fixed by buying backpacks that enlarge your inventory and buy selling old unneeded stuff, which the game handles well in that it allows you to sort unneeded stuff into a "junk" category from which you can then destroy them or sell them later when you meet a salesperson. There are also just to many items in the game without a clear use, they might come into use for other classes or higher difficulties, but on the lower difficulties I simply ended up collecting a lot of stuff that I never used and the game didn't do much to explain what they are for. The game also has rather uninteresting weapons and armor, not once in the game did I need to buy a weapon or a piece of armor, as everything I found randomly was simply good enough, so I allocated plenty of money without nothing to buy. And just like Mass Effect the game gives you way more party members then you can use. What's the point of having eight members when you can only ever use three of them? Even worse there actually is a single point where you need to use them all, right at the end, which of course sucks when you haven't bothered to level up and equip the people you never used. On the positive side however, all party members gain experience, even when not used.

On the technical side the game is ok, but not great, the graphics especially suffer from slowdowns/loading times when you want to cast a bigger spell and the texture resolution is quite low when it comes to character close ups. Object also pop-in at quite a short distance. But overall it works, the slowdowns don't bother duo to the dice-rolling nature of most of the fighting and you simply get used to the low-res textures.
The loading times in the game are acceptable, but the startup time however is horrible, as the game spends a really good long while on checking your save games and connecting to the online service for DLC, so much that you get the feel that the thing crashed.

Just like Mass Effect 2 the game comes with codes for DLC in the box. Those are used to give you an incentive to buy the game new, as the codes can only be used once, but as if those codes weren't already annoyingly enough, they also have an expire date of 30. April 2010. So at this point you can just buy it used. There is also extra pay-DLC for the game, which is advertised by characters in the game itself, this is among the most stupid and annoying things that I have seen in gaming so far, it however only happens in two places as far as I can tell, so you can easily avoid it once you know where they are.

Overall the game is really good. It took me around 40h to finish the game the first time through and there is still plenty of replay value with all the different dialog choices and races. It however never quite reached the quality of Mass Effect, neither in terms of graphics, gameplay nor story. It falls into a few common RPG pitfalls, but for most part avoids them well enough, especially on the lower difficulties you can simply play it, have fun and enjoy characters, dialogs and the story, without ever feeling overwhelmed or being required to do any grinding or to many fetch quests. When it comes to value for the money, this game is hard to beat, just don't expect anything revolutionary, as this game follows for most part the traditional and familiar BioWare formula.

Thursday, July 01, 2010

Time Lapse Fun

Played a bit around with creating some time lapse shots with my Logitech C300 webcam, results are below. Scripts to generate them where:

uvcdynctrl --set "Exposure, Auto" 3
uvcdynctrl --set "Exposure, Auto Priority" 1
uvccapture -m -w -x1280 -y1024 -q80 -t10 -o/tmp/webcam-temp.jpg -c/home/ingo/bin/webcam-move.sh

$ cat /home/ingo/bin/webcam-move.sh
#!/bin/sh

if [ ! $# -eq 1 ]; then
echo "Usage: $0 FILENAME"
exit 1
else
FINAL="/home/ingo/screenshots/webcam-$(date +"%F-T%T").jpg"
mv "$1" "$FINAL"
echo "Moved $1 to ${FINAL}"
exit 0
fi

mplayer mf://webcam*.jpg -fps 30 -vf crop=1280:720:0:200


One could of course also record things directly with mplayer/mencoder or guvview or other tools, I chose the single-image route because it is more robust and flexible, for example guvview seems to have trouble with mkv video files over 2GB, mplayer doesn't accept very low fps rates and things like that. The single-image route 'just works' and there is no risk of losing a recording due to a corrupt video file in the end.





Flattr this