Hi,
I started to implement the support to record videos natively in Uzem using ffmpeg. Unfortunately I had no time to keep going with the implementation for the next weeks, so I'm posting here a patch with what I have been doing in the case someone wants to give a try.
This is a video of Megatris recorded using Uzem:
[youtube]http://www.youtube.com/watch?v=KZ6VYWxXj8w[/youtube]
As you can see, the current code records just video with no audio support (the audio in the video is from youtube audio library). The implementation is far from be completed and the patch is a bit "dirty". I'm still learning ffmpeg and video formats. To add audio I expect some big changes in the patch.
The Makefile patched is for Linux, but if someone try to get involved using Windows, I hope that setup the ffmpeg dev package should be the minor of the problems
Hope you enjoy the partial work. Contributions are welcome. Actually I'm posting this work because it is stopped here for some time and I though someone would like to get involved.
Cheers,
Filipe Rinaldi
Support for Video Recording
Support for Video Recording
- Attachments
-
- patch_Uzem_Video_r165.diff.zip
- Patch based on version r165
- (5.87 KiB) Downloaded 529 times
Re: Support for Video Recording
Wow thanks, that's awesome! My capture card died some months ago and I really wanted to make some video of the games. I won't have time either in the next weeks but I will indeed have a look at your code, ffmpeg is something I wanted to fiddle with for some time.
-Uze
-Uze
Re: Support for Video Recording
Great stuff, filipe.
The only way I know how to build on Windows is to follow this guide here. Also, you will probably need to make the following changes to libavformat/os_support.h:
I can provide a build if needed. However, a static link pushes uzem out to 20MB.
The only way I know how to build on Windows is to follow this guide here. Also, you will probably need to make the following changes to libavformat/os_support.h:
Code: Select all
#if defined(__MINGW32__) && !defined(__MINGW32CE__)
# include <fcntl.h>
# define lseek(f,p,w) _lseeki64((f), (p), (w))
#endif /* defined(__MINGW32__) && !defined(__MINGW32CE__) */
+++ #if !defined(ETIMEDOUT) && defined(WSAETIMEDOUT)
+++ #define ETIMEDOUT WSAETIMEDOUT
+++ #endif
static inline int is_dos_path(const char *path)
{
#if HAVE_DOS_PATHS
if (path[0] && path[1] == ':')
return 1;
#endif
return 0;
}
Re: Support for Video Recording
I always prefer to have a single executable so let's use a static link. When we'll be at 200MB I'll perhaps reconsider...However, a static link pushes uzem out to 20MB.
-Uze
Re: Support for Video Recording
Looks like it strips down to 5.25MB, so no big deal after all.
Re: Support for Video Recording
Hi Chaps,
It has been more than one year and once a while (you know those boring raining days) I try to revamp this patch.
The previous patch had only the video stream, this time I've added a proper muxer(container?) but audio is still not working properly.
There is an audio stream but I didn't find a format which accepts Uzebox's sample rate (15.7KHz) so we need to scale.
Please find attached the latest patch.
Patch was rebased on r184 and I've tested on Linux only.
I'm using the latest FFMPEG version:
configuration: --enable-shared --enable-pic --prefix=/usr/local/ffmpeg/
libavutil 51. 8. 0 / 51. 8. 0
libavcodec 53. 7. 0 / 53. 7. 0
libavformat 53. 3. 1 / 53. 3. 1
libavdevice 53. 1. 1 / 53. 1. 1
libavfilter 2. 15. 1 / 2. 15. 1
libswscale 0. 14. 1 / 0. 14. 1
If you are feeling brave to try it:
* Checkout Uzebox revision 184
* From the uzem directory: "patch < UzemVideo_r184.patch"
* Update Makefile with your FFMPEG installation if necessary ("PKG_CONFIG_PATH=/usr/local/ffmpeg/lib/pkgconfig/")
To run (you can try different formats by changing the filename, but try to use only avi):
./uzem -v <filename>.avi <rom.hex>
Cheers,
-Filipe
It has been more than one year and once a while (you know those boring raining days) I try to revamp this patch.
The previous patch had only the video stream, this time I've added a proper muxer(container?) but audio is still not working properly.
There is an audio stream but I didn't find a format which accepts Uzebox's sample rate (15.7KHz) so we need to scale.
Please find attached the latest patch.
Patch was rebased on r184 and I've tested on Linux only.
I'm using the latest FFMPEG version:
configuration: --enable-shared --enable-pic --prefix=/usr/local/ffmpeg/
libavutil 51. 8. 0 / 51. 8. 0
libavcodec 53. 7. 0 / 53. 7. 0
libavformat 53. 3. 1 / 53. 3. 1
libavdevice 53. 1. 1 / 53. 1. 1
libavfilter 2. 15. 1 / 2. 15. 1
libswscale 0. 14. 1 / 0. 14. 1
If you are feeling brave to try it:
* Checkout Uzebox revision 184
* From the uzem directory: "patch < UzemVideo_r184.patch"
* Update Makefile with your FFMPEG installation if necessary ("PKG_CONFIG_PATH=/usr/local/ffmpeg/lib/pkgconfig/")
To run (you can try different formats by changing the filename, but try to use only avi):
./uzem -v <filename>.avi <rom.hex>
Cheers,
-Filipe
- Attachments
-
- UzemVideo_r184.patch.zip
- UzemVideo v2
- (8.21 KiB) Downloaded 532 times
Re: Support for Video Recording
Hi,
I'm looking for a compiled executable for Windows of this UZEM with video patch?!
-Harty
I'm looking for a compiled executable for Windows of this UZEM with video patch?!
-Harty
Life's too short to remove usb safely
Web: www.hwhardsoft.de
http://www.facebook.com/hwhardsoft
YouTube: http://www.youtube.com/user/hwhardsoft
Web: www.hwhardsoft.de
http://www.facebook.com/hwhardsoft
YouTube: http://www.youtube.com/user/hwhardsoft
Re: Support for Video Recording
I used to have this, but I don't any longer. I also have no recollection of my previous posts in this thread, but maybe if you follow the link in my long-forgotten post, then you can get it working...I'm looking for a compiled executable for Windows of this UZEM with video patch?!
Re: Support for Video Recording
Hi Paul,
thx for your reply. Meanwhile I found another solution - a free screen recorder software called CAMSTUDIO. This works very fine with the standard emulator:
http://camstudio.org/
Here are some results:
It's also possible to record the sound with this tools...
-Harty
thx for your reply. Meanwhile I found another solution - a free screen recorder software called CAMSTUDIO. This works very fine with the standard emulator:
http://camstudio.org/
Here are some results:
It's also possible to record the sound with this tools...
-Harty
Life's too short to remove usb safely
Web: www.hwhardsoft.de
http://www.facebook.com/hwhardsoft
YouTube: http://www.youtube.com/user/hwhardsoft
Web: www.hwhardsoft.de
http://www.facebook.com/hwhardsoft
YouTube: http://www.youtube.com/user/hwhardsoft
Re: Support for Video Recording
Awesome find Hartmut! I've added a reference to the tool in the emulator's wiki page.
-Uze
-Uze