| View previous topic :: View next topic |
| Author |
Message |
otherside Apprentice


Joined: 01 Jul 2002 Posts: 179
|
|
| Back to top |
|
 |
otherside Apprentice


Joined: 01 Jul 2002 Posts: 179
|
Posted: Thu Mar 30, 2006 9:46 am Post subject: |
|
|
I've just uploaded a new version (to the same URL), now you can convert the videos to the AVI format and reencode them to XviD or anything else using mencoder.
again, read the README..
yReplay still doesn't care about the timestamps, but it's easier to convert the video to AVI and replay it using mplayer. |
|
| Back to top |
|
 |
asiobob Veteran


Joined: 29 Oct 2003 Posts: 1375 Location: Bamboo Creek
|
Posted: Sun Apr 02, 2006 11:46 am Post subject: |
|
|
| thanks, will try it out |
|
| Back to top |
|
 |
neuron Advocate


Joined: 28 May 2002 Posts: 2371
|
Posted: Sat May 27, 2006 2:42 am Post subject: |
|
|
bumping this old thread, this software works for me on amd64+twinview+nvidia, unlike xvidcap (xwd works, but is a huuuuge resource drain).
Took me ages to set it up properly, but in chroot I can now record movies from wine running an opengl application rather painless.
You really should pickup development on this again, a lot of people are missing something like this! (and a LOT of people are having tons of issues with xvidcap). |
|
| Back to top |
|
 |
otherside Apprentice


Joined: 01 Jul 2002 Posts: 179
|
Posted: Sat May 27, 2006 9:57 pm Post subject: |
|
|
| neuron wrote: |
Took me ages to set it up properly...
|
Why? what problems did you have?
| neuron wrote: |
You really should pickup development on this again, a lot of people are missing something like this! |
I wanted to make it a Google SoC project.. but somehow I didn't submit my proposal.. |
|
| Back to top |
|
 |
neuron Advocate


Joined: 28 May 2002 Posts: 2371
|
Posted: Sat May 27, 2006 10:02 pm Post subject: |
|
|
| otherside wrote: | | neuron wrote: |
Took me ages to set it up properly...
|
Why? what problems did you have?
|
I had no problems at all setting it up to record from glxgears, but I wanted to set it up to record from wine, and I'm on amd64, which complicates things. And cross compliling some of the dependencies (ffmpeg in particular) was.. well, I gave up :p. After I setup 32bit chroot and built everything there things went pretty smooth though  |
|
| Back to top |
|
 |
otherside Apprentice


Joined: 01 Jul 2002 Posts: 179
|
Posted: Sun May 28, 2006 12:33 am Post subject: |
|
|
| neuron wrote: |
I'm on amd64, which complicates things. And cross compliling some of the dependencies (ffmpeg in particular) was.. well, I gave up :p. |
I'm on amd64, too, this worked for me:
| Code: | | ./configure --extra-cflags="-L/emul/linux/x86/usr/lib -m32 -O3 -pipe" --extra-ldflags="-L/emul/linux/x86/usr/lib -m32 -O3 -pipe" --disable-debug --enable-xvid --enable-gpl --cpu=x86 --enable-shared |
and then copy
| Code: | ./libavcodec/libavcodec.so
./libavformat/libavformat.so
./libavutil/libavutil.so |
to
| Code: |
/emul/linux/x86/usr/lib/libav*.so.* |
(see next step how to name the files)
and make symlinks:
| Code: | lrwxrwxrwx 1 root root 40 Apr 26 22:08 /emul/linux/x86/usr/lib/libavcodec.so -> /emul/linux/x86/usr/lib/libavcodec.so.51
-rwxr-xr-x 1 root root 3770348 Apr 27 14:58 /emul/linux/x86/usr/lib/libavcodec.so.51
lrwxrwxrwx 1 root root 41 Apr 26 22:09 /emul/linux/x86/usr/lib/libavformat.so -> /emul/linux/x86/usr/lib/libavformat.so.50
-rwxr-xr-x 1 root root 581519 Apr 27 14:57 /emul/linux/x86/usr/lib/libavformat.so.50
lrwxrwxrwx 1 root root 39 Apr 26 22:09 /emul/linux/x86/usr/lib/libavutil.so -> /emul/linux/x86/usr/lib/libavutil.so.49
-rwxr-xr-x 1 root root 28923 Apr 27 14:57 /emul/linux/x86/usr/lib/libavutil.so.49 |
|
|
| Back to top |
|
 |
neuron Advocate


Joined: 28 May 2002 Posts: 2371
|
Posted: Sun May 28, 2006 10:11 pm Post subject: |
|
|
thanks! That'd be a much cleaner aproach than a chroot for it  |
|
| Back to top |
|
 |
otherside Apprentice


Joined: 01 Jul 2002 Posts: 179
|
Posted: Fri Jul 21, 2006 2:54 pm Post subject: |
|
|
Because encoding to xvid/ffv1 right away requires a fast CPU and coding that was real pain because the ffmpeg libs are so badly documented, I've decided to drop that feature and now I'm saving the stream uncompressed. To convert the raw stream to something useful, you have to use a modified x264 encoder which can convert the stream to MP4 (even in lossless mode if you want). The new version also lets you save the stream to another computer over network (if the network is fast enough), saving it over NFS is too slow, I had to write my own server.
If someone is interested in the new vesion, send me a PM.
If you want to see another video captured with yukon, here is a World of Warcraft video, my guild against C'Thun:
http://files.filefront.com/FS_vs_CThunmp4/;5281983;;/fileinfo.html |
|
| Back to top |
|
 |
nullkey n00b


Joined: 09 Oct 2005 Posts: 37 Location: Oulu, Finland
|
Posted: Sat Jul 22, 2006 4:46 pm Post subject: |
|
|
Man, have you read my mind ? I was planning to write something like this (hooking glXSwapBuffers and so on), but you were faster . The current status of gameplay capturing in linux is horrible (xvidcap is not an acceptable solution), so your work is really important.
About your code... I didn't test it but I can tell some problems just by looking at the source. You should trash your plans concerning yPatcher. Most online games have their anti-cheat protections that ban users with modified game binaries / libraries. There is much easier and cleaner way to hook needed functions: hook dlsym and detour functions run-time. That approach is used in nearly all known linux online-gaming cheats and it works well. Some of them are even released under GPL license (like etglhack).
Happy hacking and keep posting updates! |
|
| Back to top |
|
 |
otherside Apprentice


Joined: 01 Jul 2002 Posts: 179
|
Posted: Sat Jul 22, 2006 11:28 pm Post subject: |
|
|
| nullkey wrote: | You should trash your plans concerning yPatcher. Most online games have their anti-cheat protections that ban users with modified game binaries / libraries. There is much easier and cleaner way to hook needed functions: hook dlsym and detour functions run-time.
|
Thanks for the information!
But there are more issues, for example I'd like to use some king of compression, preferably a lossless codec but I have yet to find one that is opensource and usable under linux as a standalone library (see this). Capturing sound would be nice, too, but since I'm saving the video in my own proprietary file format I don't know how that could be done...
And last but not least, it's working for me and that's why I'm not working actively on it anymore, though the code is in a SVN repo and I'd gladly give access to someone who'd like to help me improving it. |
|
| Back to top |
|
 |
otherside Apprentice


Joined: 01 Jul 2002 Posts: 179
|
Posted: Sat Aug 19, 2006 4:02 pm Post subject: |
|
|
I just implemented a simple huffman compression, it reduces the video to ~50% which is fine since the most important thing is that it needs to be realtime and it is! The algorithm is written mostly in assembler, only the x86 decompression function isn't finished yet (it's written in C) but who cares, I'm on amd64
If you want to try it out, send me a PM... |
|
| Back to top |
|
 |
rig0r n00b

Joined: 25 Mar 2004 Posts: 73
|
Posted: Sun Aug 20, 2006 4:23 pm Post subject: |
|
|
| Should this work with cedega ? Afaik cedega uses opengl to replace the directx calls. When I try it I do get the yukon hook message, but ctrl-shft-f1 and f2 do nothing. |
|
| Back to top |
|
 |
otherside Apprentice


Joined: 01 Jul 2002 Posts: 179
|
Posted: Sun Aug 20, 2006 9:20 pm Post subject: |
|
|
| set the 'yukonOverride' environment variable, you won't be able to stop the recording though, it will simply record everything. |
|
| Back to top |
|
 |
rig0r n00b

Joined: 25 Mar 2004 Posts: 73
|
Posted: Mon Aug 21, 2006 11:05 am Post subject: |
|
|
Yeah, tried that, but nothing gets recorded. When I start the cedega game (EVE online in this case) I get the yukon hook message twice, maybe that's a problem ?
| Code: | spja@styx ~/Desktop/current/build/amd64 $ yukonOverride=1 LD_PRELOAD=./yPreload.amd64.so cedega -run "EVE Online" "Play EVE"
yukon hooks established !
yukonOverride enabled, capturing all windows !
yukon hooks established !
yukonOverride enabled, capturing all windows !
spja@styx ~/Desktop/current/build/amd64 $ |
|
|
| Back to top |
|
 |
otherside Apprentice


Joined: 01 Jul 2002 Posts: 179
|
Posted: Mon Aug 21, 2006 11:41 am Post subject: |
|
|
The same 'bug' was in wine, but fortunately wine is opensource and my patch to fix this was accepted.
It's because cedega opens libGL.so directly and loads their glXSwapBuffers function, and I have no way of overriding that. Wine also dlopen()'s libGL, but uses RTLD_DEFAULT instead of the real handle and can so load my hooked glXSwapBuffers function.
I'd suggest you contact transgaming and tell them to fix their code
Another way is to use a patcher to modify the cedega executables/libraried, but that'd be too much work since you'd have to find out which executable/library to patch.. just tell transgaming to fix their code, it's much easier |
|
| Back to top |
|
 |
rig0r n00b

Joined: 25 Mar 2004 Posts: 73
|
Posted: Mon Aug 21, 2006 1:14 pm Post subject: |
|
|
Thanks, support request has been made.
I'll see if I can get the patcher to work in the meantime, haven't been able to find which executable to use yet tho. |
|
| Back to top |
|
 |
otherside Apprentice


Joined: 01 Jul 2002 Posts: 179
|
Posted: Mon Aug 21, 2006 2:11 pm Post subject: |
|
|
| rig0r wrote: | | I'll see if I can get the patcher to work in the meantime, haven't been able to find which executable to use yet tho. |
Google for 'anandtech framegetter', download the software and use their patcher (since my patcher is non-existant in the package). Then you can follow the instructions in the README file.
You have to find which executable/library from cedega contains the string 'libGL.so', patch it and then move yPreload.x86.so to /usr/lib/libFG.so |
|
| Back to top |
|
 |
otherside Apprentice


Joined: 01 Jul 2002 Posts: 179
|
Posted: Wed Aug 23, 2006 11:44 am Post subject: |
|
|
if you know how to use svn, here is the repository:
svn://dbservice.com/big/svn/yukon/trunk
it has a completely different design now and the readme isn't correct anymore!
The stupid ffmpeg dependency has been removed, so you shouldn't have any problems compiling it
To convert the videos to mp4 you'll need gpac (is in the portage tree) and x264 from svn (svn://svn.videolan.org/x264/trunk) and patch it with http://dbservice.com/ftpdir/tom/yukon.patch
To build yukon, you need:
scons (newest version from portage shoudl work)
yasm (you'll need version 0.5.0 or later, I have 0.5.0rc1)
so you'll have to do more or less this:
| Code: |
$ mkdir ~/devel
$ cd ~/devel
$ svn co svn://dbservice.com/big/svn/yukon/trunk yukon
$ cd yukon
$ scons
$ cd ..
$ svn co svn://svn.videolan.org/x264/trunk x264
$ cd x264
$ patch -p1 < /path/to/yukon.patch
$ ./configure --enable-mp4-output
$ make
|
now you need to start the yServer in a separate console:
| Code: |
$ ~/devel/yukon/build/amd64/yServer 9000
|
in the main console, you can now setup yukon and start the game:
| Code: |
$ mkdir ~/.yukon
$ echo "127.0.0.1 9000" > ~/.yukon/server
$ echo "half" > ~/.yukon/scale
$ mkdir ~/yukonOutput
$ LD_PRELOAD=~/devel/yukon/build/x86/yPreload.x86.so wine /path/to/WoW.exe
|
[play the game, use CTRL+SHIFT+F1/F2 to start/stop caturing]
to replay the video, use yReplay:
| Code: |
$ ~/devel/yukon/build/amd64/yReplay ~/yukonOutput/2006-???
|
it will first analyze the video and print out something along:
| Code: |
analysing video... done
5452 frames, 336 seconds, 16.2 fps, 15.3 MiB/s
ratio: 0.502
|
ratio means how much did huffman compress the video. you can use 'f' to toggle fullscreen, 'o' to resize to original size, 'space' to toggle pause, and arrows to skip frames left/right skips one, up/down 10 frames, just keep the buttons pressed to go fast forward etc. you also can pause the video and go one frame back/forwards if you want to
to convert it to mp4, use x264:
| Code: |
$ ~/devel/x264/x264 --progress --bframes 20 -o ~/output.mp4 ~/yukonOutput/2006-???
|
use
| Code: |
$ ~/devel/x264/x264 --help
|
to find out which other options are available, you can use all of them EXCEPT '--bpyramid' !!
happy capturing 
Last edited by otherside on Wed Aug 23, 2006 1:36 pm; edited 1 time in total |
|
| Back to top |
|
 |
rig0r n00b

Joined: 25 Mar 2004 Posts: 73
|
Posted: Wed Aug 23, 2006 1:14 pm Post subject: |
|
|
Getting a compile error:
| Code: |
spja@styx ~/development/yukon $ scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
yasm -f elf64 -o build/amd64/asm/amd64/huffman.o build/amd64/asm/amd64/huffman.asm
yasm: FATAL: unrecognized object format `elf64'
scons: *** [build/amd64/asm/amd64/huffman.o] Error 1
scons: building terminated because of errors.
|
|
|
| Back to top |
|
 |
otherside Apprentice


Joined: 01 Jul 2002 Posts: 179
|
Posted: Wed Aug 23, 2006 1:23 pm Post subject: |
|
|
to build only the x86 version. I need to add a architecture check and build only what's possible. Until then, use 'scons x86' ot 'scons amd64' if you need to build for the specific architecture |
|
| Back to top |
|
 |
rig0r n00b

Joined: 25 Mar 2004 Posts: 73
|
Posted: Wed Aug 23, 2006 1:27 pm Post subject: |
|
|
Forgot to add, already tried that. Getting the same error
| Code: |
spja@styx ~/development/yukon $ scons amd64
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
yasm -f elf64 -o build/amd64/asm/amd64/huffman.os build/amd64/asm/amd64/huffman.asm
yasm: FATAL: unrecognized object format `elf64'
scons: *** [build/amd64/asm/amd64/huffman.os] Error 1
scons: building terminated because of errors.
|
and
| Code: |
spja@styx ~/development/yukon $ scons x86
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -std=c99 -pipe -O3 -m32 -fPIC -Iinclude -I/usr/include/ffmpeg -c -o build/x86/yukonPreload/yEngine.os build/x86/yukonPreload/yEngine.c
gcc -std=c99 -pipe -O3 -m32 -fPIC -Iinclude -I/usr/include/ffmpeg -c -o build/x86/yukonPreload/yHooks.os build/x86/yukonPreload/yHooks.c
gcc -std=c99 -pipe -O3 -m32 -fPIC -Iinclude -I/usr/include/ffmpeg -c -o build/x86/yukonPreload/server.os build/x86/yukonPreload/server.c
gcc -std=c99 -pipe -O3 -m32 -fPIC -Iinclude -I/usr/include/ffmpeg -c -o build/x86/yukonCore/yStream.os build/x86/yukonCore/yStream.c
gcc -std=c99 -pipe -O3 -m32 -fPIC -Iinclude -I/usr/include/ffmpeg -c -o build/x86/yukonCore/yBuffer.os build/x86/yukonCore/yBuffer.c
gcc -std=c99 -pipe -O3 -m32 -fPIC -Iinclude -I/usr/include/ffmpeg -c -o build/x86/yukonCore/yTime.os build/x86/yukonCore/yTime.c
gcc -std=c99 -pipe -O3 -m32 -fPIC -Iinclude -I/usr/include/ffmpeg -c -o build/x86/yukonCore/yConfig.os build/x86/yukonCore/yConfig.c
gcc -std=c99 -pipe -O3 -m32 -fPIC -Iinclude -I/usr/include/ffmpeg -c -o build/x86/yukonCore/yLicense.os build/x86/yukonCore/yLicense.c
gcc -std=c99 -pipe -O3 -m32 -fPIC -Iinclude -I/usr/include/ffmpeg -c -o build/x86/yukonCore/yCompressor.os build/x86/yukonCore/yCompressor.c
yasm -f elf32 -o build/x86/asm/x86/huffman.os build/x86/asm/x86/huffman.asm
yasm: FATAL: unrecognized object format `elf32'
scons: *** [build/x86/asm/x86/huffman.os] Error 1
scons: building terminated because of errors.
|
I emerged yasm because I didn't have it installed. Didn't see any USE flags i could use. |
|
| Back to top |
|
 |
otherside Apprentice


Joined: 01 Jul 2002 Posts: 179
|
Posted: Wed Aug 23, 2006 1:30 pm Post subject: |
|
|
| rig0r wrote: | | I emerged yasm because I didn't have it installed. Didn't see any USE flags i could use. |
I have yasm 0.5.0rc1... you'll have to unmask yasm, seems like 0.4.0 doesn't understand the options elf32/elf64 |
|
| Back to top |
|
 |
rig0r n00b

Joined: 25 Mar 2004 Posts: 73
|
Posted: Wed Aug 23, 2006 1:37 pm Post subject: |
|
|
Ah
I was using 0.4.0. Added to package.keywords and 0.5.0rc1 is installed now. Build goes fine now. Thx  |
|
| Back to top |
|
 |
otherside Apprentice


Joined: 01 Jul 2002 Posts: 179
|
Posted: Wed Aug 23, 2006 1:48 pm Post subject: |
|
|
the project now has a trac webpage: http://dbservice.com/projects/yukon/
I'm still looking for someone to help me maintaining it.. if you feel brave enough, contact me: tom@dbservice.com |
|
| Back to top |
|
 |
|