Log in

View Full Version : Recording 10 Boxing - Far Beyond Simple FRAPS



Xzin
08-04-2007, 12:46 AM
I happen to have a quad core processor and several other multi core computers and tons of free disk space on a ~ 500 meg per second array of drives. I also happen to know a thing or two about video transcoding.

What I wanted to do originally was to just use FRAPS, encode the video and be done with it.

However, FRAPS has some limitations. It can't real time encode. It limits your options to full size or half size only and even though it can display or disable the cursor and record sound, it cannot do anything like mux 5 or 10 streams together or most importantly for me - real time encoding. Plus, it costs money :)

I want to take 1600 x 1280 video and encode it down in real time. I have the processing power to do so - WoW and everything else uses about 15% of my quad core system. Testing shows this is doable with reasonable quality without maxing out my system.

What I am thinking about doing is using VLC to rip the video (which requires cropping the video first as I play on half of the 30" displays. The downside is if anything pops onto the screen, VLC will record it since it does not "hook" into the DX like FRAPS does.

That aside, I could use 10 copies of VLC running and scrape each and realtime encode them (first pass encoding) to something manageable.

My end goal? Create a real time 3d view of myself PvPing. With 10 "views" all offset by 36 degrees, I should be able to create a rather incredible 360 degree view of the game, unlike anything that anybody has ever seen before. Not sure yet how to stitch that together but I am sure I can come up with something :) 180 degrees would be perfectly possible as well.... I could even set my UIs to off on 9 of the boxes and do something like 270 degrees and leave the 10th UI on but not record that one..... heh this sounds like a fun project.

BUT in order to do so, I need to either FRAPS everything (possible but will run out of space pretty quickly even at half size we are talking about 363 megs per 30 seconds PER box - so 3.63 GIGS per 30 seconds! I have a few TB handy but heh... thats a bit much.

So - enter VLC.

I don't even use Windows Media Player anymore. VLC plays, transcodes, streams and filters almost anything. No DRM, no junk, command line friendly - I have used it for years and it keeps getting better and better.

It plays on nearly any OS out there - linux, windows, mac, you name it. Get it at www.videolan.org.

Anyway, VLC crops the image, transcodes it in real time and saves it across the network What used to be 363 megs winds up being somewhere around 2 megs per 30 seconds (or 20 megs for all 10).

Now, all I need to do is setup some UI mods to force the viewport to a fixed yaw and pitch (doable with API calls) and do some trial runs.

Any other ideas? Brad? I know you are pretty prolific in the video editing department? I wonder how much of the view fustrum that WoW displays?

Not much to look at right now though - my locks are still 35. Arena fights and AV should be pretty amazing though!

Edit: Another idea I had - was since I have 5 "displays"all side by side (and then another row above) was to create a virtual 1600 x 6400 "arc" that would allow me to expand my field of vision to be pretty much the same as my actual peripheral vision. Then on the other 5 monitors, flip the camera such that I can see a complete "rear view" camera view. Might not be needed though as I normally play zoomed out enough that I can see most all of the battlefield anyway. Would be an interesting first person style of play though :)

Transcode Wiki:
http://wiki.videolan.org/index.php/Transcode

http://www.videolan.org/images/documentation/global-diagram.jpg

Lastly, these were such a pain to find - posting them here. You cannot use video filters to crop and then not display video and transcode and expect it to only transcode what you cropped. Which is perfect. But you have to use transcode options to crop then transcode. Here are the options:

--sout-transcode-vfilter <string>
Video filter
Video filters will be applied to the video
streams (after overlays are applied). You
must enter a comma-separated list of filters.
--sout-transcode-croptop <integer>
Video crop (top)
Number of pixels to crop at the top of the
video.
--sout-transcode-cropleft <integer>
Video crop (left)
Number of pixels to crop at the left of the
video.
--sout-transcode-cropbottom <integer>
Video crop (bottom)
Number of pixels to crop at the bottom of the
video.
--sout-transcode-cropright <integer>
Video crop (right)
Number of pixels to crop at the right of the
video.

HPAVC
08-04-2007, 01:24 AM
In my mind I am picturing an addon like this (http://www.wowinterface.com/downloads/fileinfo.php?id=6715) (note the coords option) to a degree.

We would modify this so that it always points forward on the lead character (Xzin), and the other toons all then have 'ping' directions to Xzin. These would be on a private data channel to for the group/raid however. Then potentially we need to manipulate the camera to key to the pointer clues on where Xzin is and thus where Xzin is pointing/facing.

As long as you used the saved views we could also communicate when you changed the views, so when Xzin pressed home or end (what the default keys are I forget) the other toons would zoom in or out over that same data channel.

Xzin
08-04-2007, 01:28 AM
Ooooo sexy... I like it.

This would be better than simply /following - which does sync up the cameras to a common view point once you start moving a bit.

I wonder what would happen when one character was feared? I assume it would simply move it back in line?

Seems like a lot of this code is already written and could be borrowed for use in this mod. How do you find these amazing little mods .. that actually WORK with 2.0?!?

HPAVC
08-04-2007, 01:14 PM
I might have gotten lost somewhere on what the intent is. Its obviously a highly visual thing and intimidatingly abstract with the 10 monitor thing as well. So I will try again.

* We have the potential to have characters have directional coordinates and some basic measure of distance between each other. (the various compass, catrography mods do this)

* We also have the ability for them to zoom in and out camera distances (saved camera angles)

* We also have the ability for the camera to rotate left or right (as you quoted from wowwiki api)

What we are lacking is an indication of the camera direction. We would have to fudge a 'how many left or ticks does it take to make a 45,90,180,360 camera change' and then map that to a 'ok the other player is 48 degrees to my left, how many left ticks do I need to make (lets say 10) we might call DoLeftTicks(10) where this pseudo-code would handle it.

function doLeftTicks(numTicks)
for i=1, numTicks do
MoveViewLeftStart()
MoveViewLeftStop()
end
end

Note that once we mess with the camera, it will get further and further out of alignment until we zero it again with ResetView().

This should provide a basis for having a single character being filmed by nine cameramen. Because of the poor resolution of the WoW distances and the bogus 'tick' calibration (which might be different at different distances, and would be effected by objects that conflict with the camera) you might not have good camera views. Not to mention most likely you would have a lot of co-stars infront of the stars.

It would be spooky to see a single button do 'set focus to target, all cameras pan on focus' with 10 toons at various positions. Even with characters one various sides and positions of WSG you would all see a camera angle pointed toward the focus. Though some cameras would be pointed toward walls, trees, etc.

Perhaps I am wrong and the Yaw could be used better than the tick method. But still, there is no GetCameraAngle() so that needs to be derived somehow.

zanthor
08-07-2007, 11:23 AM
Any chance you could give a tutorial on how to setup this to record from a single instance of WoW?

I have a 2nd pc with a dual core proc and pleanty of space, would be SO nice to be able to record realtime without worrying about fraps's huge files. I like the full screen 1280x1024 recordings because I can actually analyze my fights...

Steph
08-07-2007, 12:14 PM
Xzin, I am missing the point a bit here. Lets assume for a moment you had the cropping, encoding and stroage problems solved.

What about playback? Are you considering to cut a movie together from the different cams, giving you more raw footage, but a regular single view at a time output, or are you renting 360 degree cinemas for all those who want to watch your clips? :wink:

Since Fraps creates a new file every 4GB and does not really cost much performance when dumping these files, maybe an easy solution would be to run fraps and then run an encoder that converts these files as per your choice and deletes the temporary fraps dump?

webology
08-12-2007, 12:56 AM
Any chance you could give a tutorial on how to setup this to record from a single instance of WoW?


VLC has a poorly documented option of "screen://" which you can use to capture your full screen. By using the "Transcode/Save to file" option from the wizard you can next set your stream to "screen://" and then choose to save it to a movie file. I played around with this tonight and it seemed really straight forward.

Strangely enough, I can stream movies via the network in Windows XP but I'm not able to stream my screen. I haven't tried on my Mac or Ubuntu machines yet so it's probably just a WinXP code bug. I was using VLC 0.8.4 on both machines.

zanthor
08-13-2007, 08:46 PM
Still having difficulty with this, of course my 2nd machine is dead at the moment so I'm trying to transcode straight from the screen (is this possible? Google seems to think so).

vlc screen://

Starts and I can see the video but once I go through the wizard the video disappears and I have the Pause/Stop/etc buttons... it does create a file, but the best I was able to get was an absolute horrible lossy 3 second video with lots of blackspace when the screen wasn't all black...

Ok, maybe not... I just tried outside of wow, and it appears I may need to tell it how many FPS to record at... since http://www.botbh.com/files/testing.avi is what I got for my work...

Any assistance would be appreciated... /grovel.

Bradster
08-13-2007, 10:18 PM
I happen to have a quad core processor and several other multi core computers and tons of free disk space on a ~ 500 meg per second array of drives. I also happen to know a thing or two about video transcoding.

What I wanted to do originally was to just use FRAPS, encode the video and be done with it.

However, FRAPS has some limitations. It can't real time encode. It limits your options to full size or half size only and even though it can display or disable the cursor and record sound, it cannot do anything like mux 5 or 10 streams together or most importantly for me - real time encoding. Plus, it costs money :)

I want to take 1600 x 1280 video and encode it down in real time. I have the processing power to do so - WoW and everything else uses about 15% of my quad core system. Testing shows this is doable with reasonable quality without maxing out my system.

What I am thinking about doing is using VLC to rip the video (which requires cropping the video first as I play on half of the 30" displays. The downside is if anything pops onto the screen, VLC will record it since it does not "hook" into the DX like FRAPS does.

That aside, I could use 10 copies of VLC running and scrape each and realtime encode them (first pass encoding) to something manageable.

My end goal? Create a real time 3d view of myself PvPing. With 10 "views" all offset by 36 degrees, I should be able to create a rather incredible 360 degree view of the game, unlike anything that anybody has ever seen before. Not sure yet how to stitch that together but I am sure I can come up with something :) 180 degrees would be perfectly possible as well.... I could even set my UIs to off on 9 of the boxes and do something like 270 degrees and leave the 10th UI on but not record that one..... heh this sounds like a fun project.

BUT in order to do so, I need to either FRAPS everything (possible but will run out of space pretty quickly even at half size we are talking about 363 megs per 30 seconds PER box - so 3.63 GIGS per 30 seconds! I have a few TB handy but heh... thats a bit much.

So - enter VLC.

I don't even use Windows Media Player anymore. VLC plays, transcodes, streams and filters almost anything. No DRM, no junk, command line friendly - I have used it for years and it keeps getting better and better.

It plays on nearly any OS out there - linux, windows, mac, you name it. Get it at www.videolan.org.

Anyway, VLC crops the image, transcodes it in real time and saves it across the network What used to be 363 megs winds up being somewhere around 2 megs per 30 seconds (or 20 megs for all 10).

Now, all I need to do is setup some UI mods to force the viewport to a fixed yaw and pitch (doable with API calls) and do some trial runs.

Any other ideas? Brad? I know you are pretty prolific in the video editing department? I wonder how much of the view fustrum that WoW displays?

Not much to look at right now though - my locks are still 35. Arena fights and AV should be pretty amazing though!

Edit: Another idea I had - was since I have 5 "displays"all side by side (and then another row above) was to create a virtual 1600 x 6400 "arc" that would allow me to expand my field of vision to be pretty much the same as my actual peripheral vision. Then on the other 5 monitors, flip the camera such that I can see a complete "rear view" camera view. Might not be needed though as I normally play zoomed out enough that I can see most all of the battlefield anyway. Would be an interesting first person style of play though :)

Transcode Wiki:
http://wiki.videolan.org/index.php/Transcode

http://www.videolan.org/images/documentation/global-diagram.jpg

Lastly, these were such a pain to find - posting them here. You cannot use video filters to crop and then not display video and transcode and expect it to only transcode what you cropped. Which is perfect. But you have to use transcode options to crop then transcode. Here are the options:

--sout-transcode-vfilter <string>
Video filter
Video filters will be applied to the video
streams (after overlays are applied). You
must enter a comma-separated list of filters.
--sout-transcode-croptop <integer>
Video crop (top)
Number of pixels to crop at the top of the
video.
--sout-transcode-cropleft <integer>
Video crop (left)
Number of pixels to crop at the left of the
video.
--sout-transcode-cropbottom <integer>
Video crop (bottom)
Number of pixels to crop at the bottom of the
video.
--sout-transcode-cropright <integer>
Video crop (right)
Number of pixels to crop at the right of the
video.



I'll send you a AIM message.